26 #if defined (HAVE_CONFIG_H)
46 std::string::size_type pos = nm.find_last_of (
'.');
48 if (pos != std::string::npos)
49 return nm.substr (pos + 1);
81 bool load_if_not_found)
85 return cdm.
find_class (
name, error_if_not_found, load_if_not_found);
112 std::list<cdef_class>
115 std::list<cdef_class>
retval;
117 for (
int i = 0; i < cls_list.
numel (); i++)
146 error (
"cannot convert '%s' into 'object'", val.
type_name().c_str ());
155 error (
"cannot convert '%s' into 'object'", val.
type_name().c_str ());
167 to_ov (
const std::list<cdef_class>& class_list)
169 Cell cls (class_list.size (), 1);
172 for (
const auto& cdef_cls : class_list)
173 cls(i++) =
to_ov (cdef_cls);
189 if (! uf || ! uf->
body ())
201 bool allow_equal,
int max_depth)
205 if (allow_equal && clsa == clsb)
207 else if (max_depth != 0)
218 max_depth < 0 ? max_depth : max_depth-1);
239 bool load_if_not_found)
250 in_constructor =
false;
264 if (! dispatch_class.empty ())
287 std::string dummy_string;
295 const std::string& meth_name,
const std::string& prop_name,
302 if (acc_s ==
"public")
312 if (acc_s ==
"private")
314 else if (acc_s ==
"protected")
325 if (! meth_name.empty ())
334 else if (! prop_name.empty ())
345 prop_name, is_prop_set);
389 for (
int i = 0; i < acc.
numel (); i++)
399 error (
"invalid property/method access in class '%s'",
octave_idx_type numel(void) const
Number of elements in the array.
cdef_method find_method(const std::string &nm, bool local=false)
cdef_property find_property(const std::string &nm)
std::string get_name(void) const
cdef_class find_class(const std::string &name, bool error_if_not_found=true, bool load_if_not_found=true)
cdef_package find_package(const std::string &name, bool error_if_not_found=true, bool load_if_not_found=true)
octave_value get(const std::string &pname) const
octave_function * current_function(bool skip_first=false) const
std::string get_dispatch_class(void) const
virtual octave_user_function * user_function_value(bool silent=false)
octave_value get_property(octave_idx_type idx, const std::string &name) const
std::string dispatch_class(void) const
virtual bool is_anonymous_function_of_class(const std::string &="") const
bool is_private_function(void) const
bool is_class_method(const std::string &cname="") const
virtual bool is_classdef_constructor(const std::string &="") const
void stash_dispatch_class(const std::string &nm)
std::string name(void) const
octave::tree_statement_list * body(void)
void mark_as_classdef_method(void)
void mark_as_classdef_constructor(void)
octave_user_function * user_function_value(bool silent=false) const
octave_idx_type numel(void) const
octave_base_value * internal_rep(void) const
bool is_string(void) const
bool is_defined(void) const
Cell cell_value(void) const
octave_function * function_value(bool silent=false) const
std::string string_value(bool force=false) const
bool isobject(void) const
bool is_user_function(void) const
std::string type_name(void) const
void error(const char *fmt,...)
#define panic_impossible()
bool is_superclass(const cdef_class &clsa, const cdef_class &clsb, bool allow_equal, int max_depth)
std::list< cdef_class > lookup_classes(const Cell &cls_list)
void make_function_of_class(const std::string &class_name, const octave_value &fcn)
bool is_dummy_method(const octave_value &fcn)
octave_value to_ov(const cdef_object &obj)
bool is_direct_superclass(const cdef_class &clsa, const cdef_class &clsb)
cdef_object to_cdef(const octave_value &val)
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)
cdef_class get_class_context(std::string &name, bool &in_constructor)
cdef_package lookup_package(const std::string &name, bool error_if_not_found, bool load_if_not_found)
tree_evaluator & __get_evaluator__(const std::string &who)
cdef_class lookup_class(const std::string &name, bool error_if_not_found, bool load_if_not_found)
cdef_object & to_cdef_ref(const octave_value &val)
cdef_manager & __get_cdef_manager__(const std::string &who)
bool is_strict_superclass(const cdef_class &clsa, const cdef_class &clsb)
std::string get_base_name(const std::string &nm)
return octave_value(v1.char_array_value() . concat(v2.char_array_value(), ra_idx),((a1.is_sq_string()||a2.is_sq_string()) ? '\'' :'"'))
octave_value::octave_value(const Array< char > &chm, char type) return retval