26 #if ! defined (octave_classdef_h)
27 #define octave_classdef_h 1
29 #include "octave-config.h"
44 OCTAVE_END_NAMESPACE(
octave)
73 octave::cdef_object
get_object ()
const {
return m_object; }
85 OCTINTERP_API
void print (std::ostream& os,
bool pr_as_read_syntax =
false);
88 print_raw (std::ostream& os,
bool pr_as_read_syntax =
false)
const;
90 OCTINTERP_API
bool is_instance_of (
const std::string& cls_name)
const;
94 m_object.break_closure_cycles (frame);
98 subsref (
const std::string& type,
const std::list<octave_value_list>& idx,
102 const std::list<octave_value_list>& idx)
109 subsref (
const std::string& type,
const std::list<octave_value_list>& idx,
113 subsasgn (
const std::string& type,
const std::list<octave_value_list>& idx,
117 undef_subsasgn (
const std::string& type,
118 const std::list<octave_value_list>& idx,
121 OCTINTERP_API
Matrix size ();
134 m_object.set_property (idx, name, pval);
140 return m_object.get_property (idx, name);
144 superclass_ref (
const std::string& meth,
const std::string& cls);
146 static OCTINTERP_API
octave_value metaclass_query (
const std::string& cls);
152 std::string
class_name ()
const {
return m_object.class_name (); }
157 static OCTINTERP_API
void register_type (octave::type_info&);
161 octave::cdef_object m_object;
165 static const std::string s_t_name;
195 const std::list<octave_value_list>& idx,
198 return m_object.meta_subsref (type, idx, nargout);
207 return execute (tw, nargout, args);
215 std::list<octave_value_list> idx (1, args);
216 std::string type (
"(");
218 return subsref (type, idx, nargout);
222 {
return m_object.meta_accepts_postfix_index (type); }
229 OCTINTERP_API std::string
doc_string (
const std::string& meth_name)
const;
231 OCTINTERP_API std::string
file_name ()
const;
235 octave::cdef_meta_object m_object;
244 const std::string& cls)
262 return execute (tw, nargout, args);
266 execute (octave::tree_evaluator& tw,
int nargout,
272 is_constructed_object (octave::tree_evaluator& tw,
const std::string& nm);
276 std::string m_method_name;
277 std::string m_class_name;
Vector representing the dimensions (size) of an Array.
virtual octave_value subsref(const std::string &type, const std::list< octave_value_list > &idx)
~octave_classdef_superclass_ref()=default
octave_classdef_superclass_ref()=delete
octave_function * function_value(bool=false)
bool is_classdef_superclass_ref() const
octave_value_list call(octave::tree_evaluator &tw, int nargout, const octave_value_list &args)
octave_value_list execute(octave::tree_evaluator &tw, int nargout, const octave_value_list &idx)
octave_classdef_superclass_ref(const std::string &meth, const std::string &cls)
octave_base_value * clone() const
static std::string static_class_name()
octave_base_value * empty_clone() const
octave_map map_value() const
void break_closure_cycles(const std::shared_ptr< octave::stack_frame > &frame)
octave_value get_property(octave_idx_type idx, const std::string &name) const
octave_classdef(const octave::cdef_object &obj)
octave::cdef_object & get_object_ref()
bool is_classdef_object() const
octave::cdef_object get_object() const
static std::string static_type_name()
static int static_type_id()
octave_value subsref(const std::string &type, const std::list< octave_value_list > &idx)
std::string type_name() const
std::string class_name() const
void set_property(octave_idx_type idx, const std::string &name, const octave_value &pval)
string_vector map_keys() const
octave_classdef * classdef_object_value(bool=false)
~octave_classdef()=default
octave_idx_type length() const
OCTAVE_BEGIN_NAMESPACE(octave) static octave_value daspk_fcn
void install_classdef(octave::interpreter &interp)
int register_type(const std::string &t_name, const std::string &c_name, const octave_value &val)