26 #if defined (HAVE_CONFIG_H)
66 if (stack_fcn && stack_fcn == method_fcn)
86 if (pl && pl->
size () > 0)
96 return obj.
is (arg0_obj);
107 bool do_check_access,
108 const std::string& who)
const
120 error (
"cannot reference properties of class '%s' for non-constructed object",
134 args(0) =
to_ov (obj);
136 args =
feval (get_fcn, args, 1);
146 const std::string& who)
const
149 err_property_access (who,
false);
151 return get (
"DefaultValue");
163 (
const std::string& from,
bool is_set)
const
171 acc_s =
"class-restricted";
174 error (
"%s: property '%s' has %s access and cannot be set in this context",
175 from.c_str (),
get_name ().c_str (), acc_s.c_str ());
177 error (
"%s: property '%s' has %s access and cannot be obtained in this context",
178 from.c_str (),
get_name ().c_str (), acc_s.c_str ());
184 bool do_check_access,
185 const std::string& who)
188 err_property_access (who,
true);
195 error (
"cannot reference properties of class '%s' for non-constructed object",
202 obj.
put (
get (
"Name").string_value (), val);
207 args(0) =
to_ov (obj);
210 args =
feval (set_fcn, args, 1);
212 if (args.
length () > 0 && args(0).is_defined ())
214 if (args (0).is_classdef_object ())
221 ::warning (
"set-method of property '%s' returned a non-classdef object",
std::string get_name(void) const
octave_value get(const std::string &pname) const
bool is(const cdef_object &obj) const
bool is_constructed(void) const
void put(const std::string &pname, const octave_value &val)
bool is_partially_constructed_for(const cdef_class &cls) const
octave_value get(const std::string &pname) const
OCTAVE_NORETURN void err_property_access(const std::string &from, bool is_set=false) const
bool check_get_access(void) const
void set_value(cdef_object &obj, const octave_value &val, bool do_check_access=true, const std::string &who="")
bool check_set_access(void) const
bool is_recursive_set(const cdef_object &obj) const
octave_value get_value(bool do_check_access=true, const std::string &who="") const
bool check_get_access(void) const
bool check_set_access(void) const
std::string get_name(void) const
octave_value evaluate(tree_decl_elt *)
octave_function * current_function(bool skip_first=false) const
virtual octave_user_function * user_function_value(bool silent=false)
octave::tree_parameter_list * return_list(void)
bool is_classdef_constructor(const std::string &cname="") const
octave::tree_parameter_list * parameter_list(void)
octave_idx_type length(void) const
bool is_string(void) const
bool is_defined(void) const
octave_function * function_value(bool silent=false) const
std::string string_value(bool force=false) const
std::string type_name(void) const
void warning(const char *fmt,...)
void error(const char *fmt,...)
static bool is_method_executing(const octave_value &ov, const cdef_object &obj)
octave_value to_ov(const cdef_object &obj)
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)
tree_evaluator & __get_evaluator__(const std::string &who)
octave_value_list feval(const char *name, const octave_value_list &args, int nargout)
Evaluate an Octave function (built-in or interpreted) and return the list of result values.
octave_value::octave_value(const Array< char > &chm, char type) return retval