26 #if ! defined (octave_ov_class_h)
27 #define octave_ov_class_h 1
29 #include "octave-config.h"
60 m_parent_list (), m_obsolete_copies (0)
65 m_parent_list (), m_obsolete_copies (0)
69 const std::list<std::string>& plist)
71 m_parent_list (plist), m_obsolete_copies (0)
79 m_parent_list (s.m_parent_list), m_obsolete_copies (0) { }
92 void break_closure_cycles (
const std::shared_ptr<octave::stack_frame>& frame);
96 OCTINTERP_API
Matrix size (
void);
106 const std::list<octave_value_list>& idx)
113 subsref (
const std::string& type,
const std::list<octave_value_list>& idx,
117 numeric_conv (
const Cell& val,
const std::string& type);
120 { m_map.assign (k, rhs); };
123 subsasgn (
const std::string& type,
const std::list<octave_value_list>& idx,
127 undef_subsasgn (
const std::string& type,
128 const std::list<octave_value_list>& idx,
132 index_vector (
bool require_integers =
false)
const;
136 OCTINTERP_API std::size_t byte_size (
void)
const;
148 std::size_t
nparents (
void)
const {
return m_parent_list.size (); }
170 OCTINTERP_API
bool is_true (
void)
const;
177 {
return m_parent_list; }
186 OCTINTERP_API
bool is_instance_of (
const std::string&)
const;
188 OCTINTERP_API
string_vector string_vector_value (
bool pad)
const;
190 OCTINTERP_API
void print (std::ostream& os,
bool pr_as_read_syntax =
false);
192 OCTINTERP_API
void print_raw (std::ostream& os,
193 bool pr_as_read_syntax =
false)
const;
195 OCTINTERP_API
bool reconstruct_exemplar (
void);
197 OCTINTERP_API
static void clear_exemplar_map (
void);
199 OCTINTERP_API
bool reconstruct_parents (
void);
201 OCTINTERP_API
bool save_ascii (std::ostream& os);
203 OCTINTERP_API
bool load_ascii (std::istream& is);
205 OCTINTERP_API
bool save_binary (std::ostream& os,
bool save_as_floats);
208 load_binary (std::istream& is,
bool swap,
212 save_hdf5 (
octave_hdf5_id loc_id,
const char *name,
bool save_as_floats);
217 OCTINTERP_API
mxArray * as_mxArray (
bool interleaved)
const;
230 static OCTINTERP_API
void register_type (octave::type_info&);
240 OCTINTERP_API std::string get_current_method_class (
void);
243 subsasgn_common (
const octave_value& obj,
const std::string& type,
244 const std::list<octave_value_list>& idx,
261 : m_field_names (
x.m_field_names),
262 m_parent_class_names (
x.m_parent_class_names) { }
268 m_field_names =
x.m_field_names;
269 m_parent_class_names =
x.m_parent_class_names;
276 std::size_t
nparents (
void)
const {
return m_parent_class_names.size (); }
280 std::list<std::string>
parents (
void)
const {
return m_parent_class_names; }
282 OCTINTERP_API
bool compare (
const octave_value& obj)
const;
293 typedef std::map<std::string, exemplar_info>::iterator
295 typedef std::map<std::string, exemplar_info>::const_iterator
Vector representing the dimensions (size) of an Array.
octave_idx_type numel(int n=0) const
Number of elements that a matrix with this dimensions would have.
virtual octave_value subsref(const std::string &type, const std::list< octave_value_list > &idx)
octave_idx_type nfields(void) const
string_vector m_field_names
std::list< std::string > m_parent_class_names
string_vector fields(void) const
std::size_t nparents(void) const
exemplar_info(const exemplar_info &x)
std::list< std::string > parents(void) const
string_vector parent_class_names(void) const
static std::string static_class_name(void)
std::string type_name(void) const
octave_value subsref(const std::string &type, const std::list< octave_value_list > &idx)
bool isstruct(void) const
std::map< std::string, exemplar_info >::iterator exemplar_iterator
std::list< std::string > m_parent_list
octave_value resize(const dim_vector &dv, bool=false) const
std::list< std::string > parent_class_name_list(void) const
static std::map< std::string, exemplar_info > exemplar_map
octave_idx_type numel(void) const
octave_class(const octave_map &m, const std::string &id, const std::list< std::string > &plist)
std::string class_name(void) const
octave_base_value * clone(void) const
static const std::string t_name
bool is_defined(void) const
octave_map map_value(void) const
~octave_class(void)=default
static int static_type_id(void)
std::size_t nparents(void) const
octave_value reshape(const dim_vector &new_dims) const
static std::string static_type_name(void)
octave_idx_type nfields(void) const
dim_vector dims(void) const
octave_base_value * empty_clone(void) const
std::map< std::string, exemplar_info >::const_iterator exemplar_const_iterator
bool isobject(void) const
octave_class(const octave_class &s)
void assign(const std::string &k, const octave_value &rhs)
octave_class(const octave_map &m, const std::string &id)
void resize(const dim_vector &dv, bool fill=false)
octave_map reshape(const dim_vector &dv) const
octave_idx_type length(void) const
OCTAVE_BEGIN_NAMESPACE(octave) static octave_value daspk_fcn
octave::idx_vector idx_vector
F77_RET_T const F77_DBLE * x
bool is_true(const std::string &s)
return octave_value(v1.char_array_value() . concat(v2.char_array_value(), ra_idx),((a1.is_sq_string()||a2.is_sq_string()) ? '\'' :'"'))
static bool in_class_method(const octave::cdef_class &cls)
int register_type(const std::string &t_name, const std::string &c_name, const octave_value &val)