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",
129 retval = obj.
get (
get (
"Name").string_value ());
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);
211 feval (set_fcn, args, 0);
214 args =
feval (set_fcn, args, 1);
216 if (args.
length () > 0 && args(0).is_defined ())
218 if (args(0).is_classdef_object ())
225 ::warning (
"set-method of property '%s' returned a non-classdef object",
static bool is_method_executing(const octave_value &ov, const cdef_object &obj)
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_object to_cdef(const octave_value &val)
octave_value to_ov(const cdef_object &obj)
std::size_t size(void) const
std::string get_name(void) const
octave_value get(const std::string &pname) const
bool is_partially_constructed_for(const cdef_class &cls) const
void put(const std::string &pname, const octave_value &val)
bool is_handle_object(void) const
bool is(const cdef_object &obj) const
octave_value get(const std::string &pname) const
bool is_constructed(void) const
octave_value get_value(bool do_check_access=true, const std::string &who="") const
OCTINTERP_API bool check_get_access(void) const
OCTINTERP_API bool is_recursive_set(const cdef_object &obj) const
void set_value(cdef_object &obj, const octave_value &val, bool do_check_access=true, const std::string &who="")
OCTINTERP_API bool check_set_access(void) const
OCTINTERP_API OCTAVE_NORETURN void err_property_access(const std::string &from, bool is_set=false) const
std::string get_name(void) const
bool check_get_access(void) const
bool check_set_access(void) 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
OCTINTERP_API octave_function * function_value(bool silent=false) const
bool is_string(void) const
bool is_defined(void) const
std::string string_value(bool force=false) const
std::string type_name(void) const
octave_value evaluate(tree_decl_elt *)
octave_function * current_function(bool skip_first=false) const
OCTAVE_BEGIN_NAMESPACE(octave) static octave_value daspk_fcn
void warning(const char *fmt,...)
void error(const char *fmt,...)
tree_evaluator & __get_evaluator__(void)
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.