26 #if ! defined (octave_cdef_property_h)
27 #define octave_cdef_property_h 1
29 #include "octave-config.h"
68 std::string
get_name (
void)
const {
return get(
"Name").string_value (); }
70 void set_name (
const std::string& nm) { put (
"Name", nm); }
72 bool is_constant (
void)
const {
return get(
"Constant").bool_value (); }
75 const std::string& who =
"")
const;
78 bool do_check_access =
true,
79 const std::string& who =
"")
const;
82 bool do_check_access =
true,
83 const std::string& who =
"");
85 bool check_get_access (
void)
const;
87 bool check_set_access (
void)
const;
94 bool is_recursive_set (
const cdef_object& obj)
const;
103 void err_property_access (
const std::string& from,
104 bool is_set =
false)
const;
114 get_rep ()->set_name (nm);
123 if (! is_property ())
124 error (
"internal error: invalid assignment from %s to meta.property object",
125 class_name ().c_str ());
138 const std::string& who =
"")
const
140 return get_rep ()->get_value (obj, do_check_access, who);
144 const std::string& who =
"")
const
146 return get_rep ()->get_value (do_check_access, who);
150 bool do_check_access =
true,
151 const std::string& who =
"")
153 get_rep ()->set_value (obj, val, do_check_access, who);
158 return get_rep ()->check_get_access ();
163 return get_rep ()->check_set_access ();
166 std::string
get_name (
void)
const {
return get_rep ()->get_name (); }
168 bool is_constant (
void)
const {
return get_rep ()->is_constant (); }
cdef_object & operator=(const cdef_object &obj)
const cdef_object_rep * get_rep(void) const
std::string get_name(void) const
cdef_property_rep(const cdef_property_rep &p)
cdef_object_rep * copy(void) const
bool is_property(void) const
~cdef_property_rep(void)=default
void set_name(const std::string &nm)
bool is_constant(void) 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="")
cdef_property(const std::string &nm)
octave_value get_value(const cdef_object &obj, bool do_check_access=true, const std::string &who="") const
octave_value get_value(bool do_check_access=true, const std::string &who="") const
bool is_constant(void) const
const cdef_property_rep * get_rep(void) const
cdef_property(const cdef_property &prop)
bool check_set_access(void) const
~cdef_property(void)=default
cdef_property(const cdef_object &obj)
cdef_property_rep * get_rep(void)
std::string get_name(void) const
void error(const char *fmt,...)