26#if ! defined (octave_cdef_property_h)
27#define octave_cdef_property_h 1
29#include "octave-config.h"
55 cdef_property_rep&
operator = (
const cdef_property_rep& p) =
delete;
57 ~cdef_property_rep () =
default;
61 return new cdef_property_rep (*
this);
64 bool is_property ()
const {
return true; }
66 std::string get_name ()
const {
return get(
"Name").string_value (); }
68 void set_name (
const std::string& nm) { put (
"Name", nm); }
70 bool is_constant ()
const {
return get(
"Constant").bool_value (); }
73 const std::string& who =
"")
const;
76 bool do_check_access =
true,
77 const std::string& who =
"")
const;
80 bool do_check_access =
true,
81 const std::string& who =
"");
83 OCTINTERP_API
bool check_get_access ()
const;
85 OCTINTERP_API
bool check_set_access ()
const;
88 cdef_property_rep (
const cdef_property_rep& p)
92 OCTINTERP_API
bool is_recursive_set (
const cdef_object& obj)
const;
100 OCTINTERP_API OCTAVE_NORETURN
101 void err_property_access (
const std::string& from,
102 bool is_set =
false)
const;
112 get_rep ()->set_name (nm);
121 if (! is_property ())
122 error (
"internal error: invalid assignment from %s to meta.property object",
123 class_name ().c_str ());
136 const std::string& who =
"")
const
138 return get_rep ()->get_value (obj, do_check_access, who);
142 const std::string& who =
"")
const
144 return get_rep ()->get_value (do_check_access, who);
148 bool do_check_access =
true,
149 const std::string& who =
"")
151 get_rep ()->set_value (obj, val, do_check_access, who);
156 return get_rep ()->check_get_access ();
161 return get_rep ()->check_set_access ();
164 std::string
get_name ()
const {
return get_rep ()->get_name (); }
170 cdef_property_rep * get_rep ()
175 const cdef_property_rep * get_rep ()
const
181OCTAVE_END_NAMESPACE(octave)
cdef_object & operator=(const cdef_object &obj)
const cdef_object_rep * get_rep() 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
OCTAVE_BEGIN_NAMESPACE(octave) static octave_value daspk_fcn
void error(const char *fmt,...)