26 #if ! defined (octave_cdef_property_h)
27 #define octave_cdef_property_h 1
29 #include "octave-config.h"
58 cdef_property_rep&
operator = (
const cdef_property_rep& p) =
delete;
60 ~cdef_property_rep () =
default;
64 return new cdef_property_rep (*
this);
71 void set_name (
const std::string& nm) {
put (
"Name", nm); }
73 bool is_constant ()
const {
return get(
"Constant").
bool_value (); }
76 const std::string& who =
"")
const;
79 bool do_check_access =
true,
80 const std::string& who =
"")
const;
83 bool do_check_access =
true,
84 const std::string& who =
"");
86 OCTINTERP_API
bool check_get_access ()
const;
88 OCTINTERP_API
bool check_set_access ()
const;
91 cdef_property_rep (
const cdef_property_rep& p)
95 OCTINTERP_API
bool is_recursive_set (
const cdef_object& obj)
const;
103 OCTINTERP_API OCTAVE_NORETURN
104 void err_property_access (
const std::string& from,
105 bool is_set =
false)
const;
115 get_rep ()->set_name (nm);
125 error (
"internal error: invalid assignment from %s to meta.property object",
139 const std::string& who =
"")
const
141 return get_rep ()->get_value (obj, do_check_access, who);
145 const std::string& who =
"")
const
147 return get_rep ()->get_value (do_check_access, who);
151 bool do_check_access =
true,
152 const std::string& who =
"")
154 get_rep ()->set_value (obj, val, do_check_access, who);
159 return get_rep ()->check_get_access ();
164 return get_rep ()->check_set_access ();
167 std::string
get_name ()
const {
return get_rep ()->get_name (); }
173 cdef_property_rep * get_rep ()
178 const cdef_property_rep * get_rep ()
const
184 OCTAVE_END_NAMESPACE(
octave)
cdef_class & operator=(const cdef_class &cls)
std::string get_name() const
const cdef_object_rep * get_rep() const
cdef_object & operator=(const cdef_object &obj)
void put(const std::string &pname, const octave_value &val)
std::string class_name() const
octave_value get(const std::string &pname) const
octave_value get_value(bool do_check_access=true, const std::string &who="") const
void set_value(cdef_object &obj, const octave_value &val, bool do_check_access=true, const std::string &who="")
std::string get_name() const
cdef_property(const cdef_object &obj)
cdef_property(const cdef_property &prop)
bool check_set_access() const
octave_value get_value(const cdef_object &obj, bool do_check_access=true, const std::string &who="") const
cdef_property(const std::string &nm)
bool check_get_access() 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,...)