GNU Octave 10.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 
Loading...
Searching...
No Matches
cdef-utils.h
Go to the documentation of this file.
1////////////////////////////////////////////////////////////////////////
2//
3// Copyright (C) 2012-2025 The Octave Project Developers
4//
5// See the file COPYRIGHT.md in the top-level directory of this
6// distribution or <https://octave.org/copyright/>.
7//
8// This file is part of Octave.
9//
10// Octave is free software: you can redistribute it and/or modify it
11// under the terms of the GNU General Public License as published by
12// the Free Software Foundation, either version 3 of the License, or
13// (at your option) any later version.
14//
15// Octave is distributed in the hope that it will be useful, but
16// WITHOUT ANY WARRANTY; without even the implied warranty of
17// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18// GNU General Public License for more details.
19//
20// You should have received a copy of the GNU General Public License
21// along with Octave; see the file COPYING. If not, see
22// <https://www.gnu.org/licenses/>.
23//
24////////////////////////////////////////////////////////////////////////
25
26#if ! defined (octave_cdef_utils_h)
27#define octave_cdef_utils_h 1
28
29#include "octave-config.h"
30
31#include <list>
32#include <string>
33
34#include "cdef-fwd.h"
35
36class octave_value;
37class Cell;
38
40
41extern OCTINTERP_API std::string
42get_base_name (const std::string& nm);
43
44extern OCTINTERP_API void
45make_function_of_class (const std::string& class_name,
46 const octave_value& fcn);
47
48extern OCTINTERP_API void
49make_function_of_class (const cdef_class& cls, const octave_value& fcn);
50
51extern OCTINTERP_API cdef_class
52lookup_class (const std::string& name, bool error_if_not_found = true,
53 bool load_if_not_found = true);
54
55extern OCTINTERP_API cdef_class
56lookup_class (const cdef_class& cls);
57
58extern OCTINTERP_API cdef_class
59lookup_class (const octave_value& ov);
60
61extern OCTINTERP_API std::list<cdef_class>
62lookup_classes (const Cell& cls_list);
63
64extern OCTINTERP_API octave_value
65to_ov (const cdef_object& obj);
66
67extern OCTINTERP_API octave_value
68to_ov (const octave_value& ov);
69
70extern OCTINTERP_API cdef_object
71to_cdef (const octave_value& val);
72
73extern OCTINTERP_API cdef_object&
74to_cdef_ref (const octave_value& val);
75
76extern OCTINTERP_API cdef_object
77to_cdef (const cdef_object& obj);
78
79extern OCTINTERP_API octave_value
80to_ov (const std::list<cdef_class>& class_list);
81
82extern OCTINTERP_API bool
83is_dummy_method (const octave_value& fcn);
84
85extern OCTINTERP_API bool
86is_superclass (const cdef_class& clsa, const cdef_class& clsb,
87 bool allow_equal = true, int max_depth = -1);
88extern OCTINTERP_API bool
89is_strict_superclass (const cdef_class& clsa, const cdef_class& clsb);
90
91extern OCTINTERP_API bool
92is_direct_superclass (const cdef_class& clsa, const cdef_class& clsb);
93
94extern OCTINTERP_API cdef_package
95lookup_package (const std::string& name, bool error_if_not_found = true,
96 bool load_if_not_found = true);
97
98extern OCTINTERP_API cdef_class
99get_class_context (std::string& name, bool& in_constructor);
100
101extern OCTINTERP_API cdef_class
103
104extern OCTINTERP_API bool
105check_access (const cdef_class& cls, const octave_value& acc,
106 const std::string& meth_name = "",
107 const std::string& prop_name = "",
108 bool is_prop_set = false);
109
110OCTAVE_END_NAMESPACE(octave)
111
112#endif
cdef_class lookup_class(const std::string &name, bool error_if_not_found=true, bool load_if_not_found=true)
Definition cdef-utils.cc:80
bool is_strict_superclass(const cdef_class &clsa, const cdef_class &clsb)
bool is_dummy_method(const octave_value &fcn)
cdef_object to_cdef(const octave_value &val)
cdef_class get_class_context()
bool check_access(const cdef_class &cls, const octave_value &acc, const std::string &meth_name="", const std::string &prop_name="", bool is_prop_set=false)
std::string get_base_name(const std::string &nm)
Definition cdef-utils.cc:44
cdef_package lookup_package(const std::string &name, bool error_if_not_found=true, bool load_if_not_found=true)
octave_value to_ov(const cdef_object &obj)
bool is_superclass(const cdef_class &clsa, const cdef_class &clsb, bool allow_equal=true, int max_depth=-1)
void make_function_of_class(const std::string &class_name, const octave_value &fcn)
Definition cdef-utils.cc:55
cdef_object & to_cdef_ref(const octave_value &val)
bool is_direct_superclass(const cdef_class &clsa, const cdef_class &clsb)
std::list< cdef_class > lookup_classes(const Cell &cls_list)
Definition Cell.h:41
OCTAVE_BEGIN_NAMESPACE(octave) static octave_value daspk_fcn