26 #if ! defined (octave_cdef_method_h)
27 #define octave_cdef_method_h 1
29 #include "octave-config.h"
77 OCTINTERP_API std::string get_doc_string (
void);
81 bool is_external (
void)
const {
return ! m_dispatch_type.empty (); }
85 m_dispatch_type = dtype;
90 bool do_check_access =
true,
const std::string& who =
"");
95 bool do_check_access =
true,
const std::string& who =
"");
97 OCTINTERP_API
bool is_constructor (
void)
const;
99 OCTINTERP_API
bool is_defined_in_class (
const std::string& cname)
const;
103 const std::list<octave_value_list>& idx,
int nargout);
107 return (type ==
'(' || type ==
'.');
114 m_dispatch_type (
m.m_dispatch_type)
117 OCTINTERP_API
void check_method (
void);
150 error (
"internal error: invalid assignment from %s to meta.method object",
165 bool do_check_access =
true,
166 const std::string& who =
"")
168 return get_rep ()->execute (args, nargout, do_check_access, who);
174 bool do_check_access =
true,
175 const std::string& who =
"")
177 return get_rep ()->execute (obj, args, nargout, do_check_access, who);
188 get_rep ()->set_function (fcn);
193 return get_rep ()->get_function ();
198 return get_rep ()->get_doc_string ();
203 return get_rep ()->is_constructor ();
208 return get_rep ()->is_defined_in_class (cname);
215 get_rep ()->mark_as_external (dtype);
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)
std::string get_name(void) const
void set_name(const std::string &nm)
cdef_class_rep * get_rep(void)
cdef_class & operator=(const cdef_class &cls)
void set_function(const octave_value &fcn)
bool meta_accepts_postfix_index(char type) const
cdef_method_rep(const cdef_method_rep &m)
bool is_method(void) const
bool is_external(void) const
~cdef_method_rep(void)=default
cdef_object_rep * copy(void) const
bool is_static(void) const
void mark_as_external(const std::string &dtype)
std::string m_dispatch_type
void set_name(const std::string &nm)
octave_value get_function(void) const
std::string get_name(void) const
octave_value_list execute(const cdef_object &obj, const octave_value_list &args, int nargout, bool do_check_access=true, const std::string &who="")
~cdef_method(void)=default
cdef_method(const std::string &nm)
cdef_method(const cdef_method &meth)
bool is_constructor(void) const
octave_value_list execute(const octave_value_list &args, int nargout, bool do_check_access=true, const std::string &who="")
cdef_method_rep * get_rep(void)
bool check_access(void) const
bool is_defined_in_class(const std::string &cname) const
bool is_static(void) const
octave_value get_function(void) const
void set_function(const octave_value &fcn)
const cdef_method_rep * get_rep(void) const
std::string get_doc_string(void)
bool is_external(void) const
std::string get_name(void) const
cdef_method(const cdef_object &obj)
void mark_as_external(const std::string &dtype)
cdef_object & operator=(const cdef_object &obj)
void put(const std::string &pname, const octave_value &val)
const cdef_object_rep * get_rep(void) const
std::string class_name(void) const
octave_value get(const std::string &pname) const
bool bool_value(bool warn=false) const
std::string string_value(bool force=false) const
OCTAVE_BEGIN_NAMESPACE(octave) static octave_value daspk_fcn
void error(const char *fmt,...)