26 #if ! defined (octave_ov_class_h)
27 #define octave_ov_class_h 1
29 #include "octave-config.h"
47 OCTAVE_END_NAMESPACE(
octave)
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 ();
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 ()
const;
148 std::size_t
nparents ()
const {
return m_parent_list.size (); }
170 OCTINTERP_API
bool is_true ()
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 ();
197 OCTINTERP_API
static void clear_exemplar_map ();
199 OCTINTERP_API
bool reconstruct_parents ();
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&);
235 static const std::string s_t_name;
236 std::string m_c_name;
237 std::list<std::string> m_parent_list;
239 OCTINTERP_API
bool in_class_method ();
240 OCTINTERP_API std::string get_current_method_class ();
243 subsasgn_common (
const octave_value& obj,
const std::string& type,
244 const std::list<octave_value_list>& idx,
247 int m_obsolete_copies;
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 ()
const {
return m_parent_class_names.size (); }
280 std::list<std::string>
parents ()
const {
return m_parent_class_names; }
282 OCTINTERP_API
bool compare (
const octave_value& obj)
const;
287 std::list<std::string> m_parent_class_names;
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)
string_vector fields() const
octave_idx_type nfields() const
std::size_t nparents() const
exemplar_info(const exemplar_info &x)
std::list< std::string > parents() const
octave_value subsref(const std::string &type, const std::list< octave_value_list > &idx)
std::map< std::string, exemplar_info >::iterator exemplar_iterator
octave_idx_type nfields() const
string_vector parent_class_names() const
std::string type_name() const
static std::string static_type_name()
octave_idx_type numel() const
octave_value resize(const dim_vector &dv, bool=false) const
std::string class_name() const
octave_base_value * empty_clone() const
static std::map< std::string, exemplar_info > exemplar_map
static std::string static_class_name()
octave_class(const octave_map &m, const std::string &id, const std::list< std::string > &plist)
std::size_t nparents() const
octave_map map_value() const
static int static_type_id()
octave_value reshape(const dim_vector &new_dims) const
std::map< std::string, exemplar_info >::const_iterator exemplar_const_iterator
octave_class(const octave_class &s)
void assign(const std::string &k, const octave_value &rhs)
std::list< std::string > parent_class_name_list() const
octave_class(const octave_map &m, const std::string &id)
octave_base_value * clone() const
void resize(const dim_vector &dv, bool fill=false)
octave_map reshape(const dim_vector &dv) const
octave_idx_type length() 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()) ? '\'' :'"'))
int register_type(const std::string &t_name, const std::string &c_name, const octave_value &val)