26#if defined (HAVE_CONFIG_H)
64int octave_class::s_t_id (-1);
66const std::string octave_class::s_t_name (
"class");
71 s_t_id = ti.register_type (octave_class::s_t_name,
"<unknown>",
86 error (
"parents must be objects");
91 error (
"duplicate class in parent tree");
93 m_parent_list.push_back (pcnm);
118 m_map.
assign (pcnm, parent);
129 else if (m_map.
nfields () == 0)
139 m_map.
resize (parent_dims);
141 Cell c (parent_dims);
145 std::list<std::string> plist
154 error (
"class: parent class dimension mismatch");
156 else if (nel == 1 && p_nel == 1)
160 m_map.
assign (pcnm, parent);
171 m_map.
assign (pcnm, pcell);
173 else if (nel == p_nel)
189 std::list<std::string> plist
198 error (
"class: parent class dimension mismatch");
202 octave::symbol_table& symtab = octave::__get_symbol_table__ ();
204 symtab.add_to_parent_map (
id, m_parent_list);
210 if (
m_count == m_obsolete_copies)
219 if (
m_count < m_obsolete_copies)
220 m_obsolete_copies = 0;
227octave_class::get_current_method_class ()
233 octave::tree_evaluator& tw = octave::__get_evaluator__ ();
246OCTAVE_NORETURN
static
250 error (
"invalid index for class");
253OCTAVE_NORETURN
static
255err_invalid_index_for_assignment ()
257 error (
"invalid index for class assignment");
260OCTAVE_NORETURN
static
262err_invalid_index_type (
const std::string& nm,
char t)
264 error (
"%s cannot be indexed with %c", nm.c_str (), t);
275 c(i).break_closure_cycles (frame);
284 std::string method_class = get_current_method_class ();
292 error (
"malformed class");
296 std::string nm = idx(0).xstring_value (
"invalid index for class");
300 if (p == my_map.
end ())
301 error (
"class has no member '%s'", nm.c_str ());
312 Matrix retval (1, 2, 1.0);
314 octave::interpreter& interp = octave::__get_interpreter__ ();
316 octave::symbol_table& symtab = interp.get_symbol_table ();
330 retval = lv(0).matrix_value ();
336 int nd = dv.
ndims ();
340 for (
int i = 0; i < nd; i++)
356 octave::interpreter& interp = octave::__get_interpreter__ ();
358 octave::symbol_table& symtab = interp.get_symbol_table ();
374 error (
"@%s/numel: invalid return value", cn.c_str ());
376 retval = lv(0).idx_type_value (
true);
386 const std::list<octave_value_list>& idx,
403 if (type.length () > 1 && type[1] ==
'.')
405 auto p = idx.begin ();
412 retval(0) = (t.
numel () == 1 ? t(0)
421 m_c_name, m_parent_list);
427 if (m_map.
numel () > 0)
437 err_invalid_index_type (
type_name (), type[0]);
441 error (
"unpexpected: index not '(', '{', or '.' in - octave_class::subsref please report this bug");
449 retval = retval(0).next_subsref (nargout, type, idx, skip);
453 octave::interpreter& interp = octave::__get_interpreter__ ();
455 octave::symbol_table& symtab = interp.get_symbol_table ();
469 = symtab.find_method (
"numArgumentsFromSubscript",
class_name ());
474 args_nargout(0) = args(0);
475 args_nargout(1) = args(1);
482 nargout = retval(0).strict_int_value
483 (
"subsref: return value of 'numArgumentsFromSubscript' must be integer");
485 else if (nargout <= 0)
490 bool maybe_cs_list_query = (type[0] ==
'.' || type[0] ==
'{'
491 || (type.length () > 1 && type[0] ==
'('
494 if (maybe_cs_list_query)
506 if (type[0] !=
'.' || nout != 1 || nargout < 0)
509 else if (nargout < 0)
519 if (retval.
length () > 1 && (nargout < 0 || nargout > 1))
521 if (nargout <= 0 || nargout >= retval.
length ())
531 if (type.length () == 1 && type[0] ==
'(')
535 err_invalid_index1 ();
547 if (val.
numel () != 1)
548 err_invalid_index_for_assignment ();
552 if (type.length () > 0 && type[0] ==
'.' && ! retval.
isstruct ())
560 const std::list<octave_value_list>& idx,
564 return subsasgn_common (
octave_value (
this), type, idx, rhs);
569 const std::list<octave_value_list>& idx,
576 return subsasgn_common (
Matrix (), type, idx, rhs);
581 const std::string& type,
582 const std::list<octave_value_list>& idx,
589 octave::interpreter& interp = octave::__get_interpreter__ ();
591 octave::symbol_table& symtab = interp.get_symbol_table ();
630 octave::unwind_protect_var<int> restore_var (m_obsolete_copies);
631 m_obsolete_copies = 2;
642 error (
"@%s/subsasgn returned more than one value",
655 std::string method_class = get_current_method_class ();
662 error (
"malformed class");
680 if (n > 1 && ! (type.length () == 2 && type[0] ==
'(' && type[1] ==
'.'))
686 if (type.length () > 1 && type[1] ==
'.')
688 auto p = idx.begin ();
695 std::string key = key_idx(0).xstring_value (
"invalid index for class assignment");
705 Cell map_elt = map_val.
index (idx.front (),
true);
710 std::list<octave_value_list> next_idx (idx);
715 next_idx.erase (next_idx.begin ());
716 next_idx.erase (next_idx.begin ());
720 t_rhs = u.
subsasgn (type.substr (2), next_idx, rhs);
723 err_invalid_index_for_assignment ();
733 std::string key = key_idx(0).string_value ();
735 std::list<octave_value_list> next_idx (idx);
737 next_idx.erase (next_idx.begin ());
739 std::string next_type = type.substr (1);
742 auto pkey = m_map.
seek (key);
743 if (pkey != m_map.
end ())
750 if (tmpc.numel () != 1)
764 t_rhs = tmp.
subsasgn (next_type, next_idx, rhs);
769 err_invalid_index_type (
type_name (), type[0]);
773 error (
"unpexpected: index not '(', '{', or '.' in - octave_class::subsasgn_common please report this bug");
781 if (n > 1 && type[1] ==
'.')
783 auto p = idx.begin ();
788 std::string key = key_idx(0).xstring_value (
"assignment to class element failed");
790 m_map.
assign (idx.front (), key, t_rhs);
801 m_map.
assign (idx.front (), rhs_map);
809 error (
"invalid class assignment");
826 std::string key = key_idx(0).string_value ();
854 err_invalid_index_type (
type_name (), type[0]);
858 error (
"unpexpected: index not '(', '{', or '.' in - octave_class::subsref please report this bug");
867 octave::interpreter& interp = octave::__get_interpreter__ ();
869 octave::symbol_table& symtab = interp.get_symbol_table ();
874 error (
"no subsindex method defined for class %s",
883 error (
"subsindex function must return a valid index vector");
898 std::size_t retval = 0;
900 for (
auto it = m_map.
cbegin (); it != m_map.
cend (); it++)
902 std::string key = m_map.
key (it);
917 octave::interpreter& interp = octave::__get_interpreter__ ();
919 octave::symbol_table& symtab = interp.get_symbol_table ();
928 retval = tmp(0).is_true ();
949 for (
auto& par : m_parent_list)
978 for (
auto& par : m_parent_list)
980 auto smap = m_map.
seek (par);
1008 bool retval =
false;
1014 for (
auto& par : m_parent_list)
1037 octave::interpreter& interp = octave::__get_interpreter__ ();
1039 octave::symbol_table& symtab = interp.get_symbol_table ();
1044 error (
"no char method defined for class %s",
class_name ().c_str ());
1054 error (
"cname/char method did not return a string");
1056 retval = tmp(0).string_vector_value (pad);
1082 bool retval =
false;
1091 octave::interpreter& interp = octave::__get_interpreter__ ();
1093 octave::symbol_table& symtab = interp.get_symbol_table ();
1095 octave_value ctor = symtab.find_method (m_c_name, m_c_name);
1097 bool have_ctor =
false;
1114 octave::unwind_protect frame;
1118 octave::interpreter_try (frame);
1120 bool execution_error =
false;
1126 result = interp.feval (ctor,
ovl (), 1);
1128 catch (
const octave::execution_exception&)
1130 interp.recover_from_exception ();
1132 execution_error =
true;
1135 if (! execution_error && result.
length () == 1)
1139 warning (
"no constructor for class %s", m_c_name.c_str ());
1162 bool might_have_inheritance =
false;
1163 std::string dbgstr =
"dork";
1166 for (
auto it = m_map.
cbegin (); it != m_map.
cend (); it++)
1168 std::string key = m_map.
key (it);
1170 if (val(0).isobject ())
1173 if (key == val(0).class_name ())
1175 might_have_inheritance =
true;
1182 if (might_have_inheritance)
1192 m_parent_list = exmplr.
parents ();
1193 for (
auto& par : m_parent_list)
1196 bool dbgbool = m_map.
contains (par);
1212 os <<
"# classname: " <<
class_name () <<
"\n";
1215 octave::interpreter& interp = octave::__get_interpreter__ ();
1217 octave::load_path& lp = interp.get_load_path ();
1219 if (lp.find_method (
class_name (),
"saveobj") !=
"")
1225 m = tmp(0).map_value ();
1230 os <<
"# length: " << m.
nfields () <<
"\n";
1232 auto i = m.
begin ();
1233 while (i != m.
end ())
1240 return ! os.fail ();
1252 std::string classname;
1254 if (!
extract_keyword (is,
"classname", classname) || classname.empty ())
1255 error (
"load: failed to extract name of class");
1258 error (
"load: failed to extract number of elements in class");
1282 error (
"load: failed to load class");
1284 m_c_name = classname;
1290 warning (
"load: unable to reconstruct object inheritance");
1292 octave::interpreter& interp = octave::__get_interpreter__ ();
1294 octave::load_path& lp = interp.get_load_path ();
1296 if (lp.find_method (classname,
"loadobj") !=
"")
1301 m_map = tmp(0).map_value ();
1307 m_c_name = classname;
1310 error (
"unexpected: len < 0 in octave_class::load_ascii - please report this bug");
1318 int32_t classname_len =
class_name ().length ();
1320 os.write (
reinterpret_cast<char *
> (&classname_len), 4);
1325 octave::interpreter& interp = octave::__get_interpreter__ ();
1327 octave::load_path& lp = interp.get_load_path ();
1329 if (lp.find_method (
class_name (),
"saveobj") !=
"")
1334 m = tmp(0).map_value ();
1340 os.write (
reinterpret_cast<char *
> (&
len), 4);
1342 auto i = m.
begin ();
1343 while (i != m.
end ())
1350 return ! os.fail ();
1360 octave::mach_info::float_format fmt)
1362 bool success =
true;
1364 int32_t classname_len;
1366 is.read (
reinterpret_cast<char *
> (&classname_len), 4);
1374 classname[classname_len] =
'\0';
1375 if (! is.read (
reinterpret_cast<char *
> (classname), classname_len))
1377 m_c_name = classname;
1382 if (! is.read (
reinterpret_cast<char *
> (&
len), 4))
1414 warning (
"load: unable to reconstruct object inheritance");
1416 octave::interpreter& interp = octave::__get_interpreter__ ();
1418 octave::load_path& lp = interp.get_load_path ();
1420 if (lp.find_method (m_c_name,
"loadobj") !=
"")
1425 m_map = tmp(0).map_value ();
1430 warning (
"load: failed to load class");
1437 error (
"unexpected: len < 0 in octave_class::load_binary - please report this bug");
1444 bool save_as_floats)
1446#if defined (HAVE_HDF5)
1449 hid_t group_hid = -1;
1450 hid_t type_hid = -1;
1451 hid_t space_hid = -1;
1452 hid_t class_hid = -1;
1453 hid_t data_hid = -1;
1457 octave::interpreter& interp = octave::__get_interpreter__ ();
1459 octave::load_path& lp = interp.get_load_path ();
1461#if defined (HAVE_HDF5_18)
1465 group_hid = H5Gcreate (loc_id, name, 0);
1471 type_hid = H5Tcopy (H5T_C_S1);
1472 H5Tset_size (type_hid, m_c_name.length () + 1);
1477 space_hid = H5Screate_simple (0, hdims,
nullptr);
1480#if defined (HAVE_HDF5_18)
1481 class_hid = H5Dcreate (group_hid,
"classname", type_hid, space_hid,
1485 class_hid = H5Dcreate (group_hid,
"classname", type_hid, space_hid,
1488 if (class_hid < 0 || H5Dwrite (class_hid, type_hid,
octave_H5S_ALL,
1490 m_c_name.c_str ()) < 0)
1493#if defined (HAVE_HDF5_18)
1497 data_hid = H5Gcreate (group_hid,
"value", 0);
1502 if (lp.find_method (
class_name (),
"saveobj") !=
"")
1507 m = tmp(0).map_value ();
1514 while (i != m.
end ())
1530 H5Gclose (data_hid);
1533 H5Dclose (class_hid);
1536 H5Sclose (space_hid);
1539 H5Tclose (type_hid);
1542 H5Gclose (group_hid);
1547 octave_unused_parameter (loc_id);
1548 octave_unused_parameter (name);
1549 octave_unused_parameter (save_as_floats);
1560 bool retval =
false;
1562#if defined (HAVE_HDF5)
1564 hid_t group_hid = -1;
1565 hid_t data_hid = -1;
1566 hid_t type_hid = -1;
1567 hid_t type_class_hid = -1;
1568 hid_t space_hid = -1;
1569 hid_t subgroup_hid = -1;
1576 int current_item = 0;
1577 hsize_t num_obj = 0;
1581#if defined (HAVE_HDF5_18)
1584 group_hid = H5Gopen (loc_id, name);
1589#if defined (HAVE_HDF5_18)
1592 data_hid = H5Dopen (group_hid,
"classname");
1598 type_hid = H5Dget_type (data_hid);
1600 type_class_hid = H5Tget_class (type_hid);
1602 if (type_class_hid != H5T_STRING)
1605 space_hid = H5Dget_space (data_hid);
1606 rank = H5Sget_simple_extent_ndims (space_hid);
1611 slen = H5Tget_size (type_hid);
1621 st_id = H5Tcopy (H5T_C_S1);
1622 H5Tset_size (st_id, slen);
1629 H5Dclose (data_hid);
1630 H5Gclose (group_hid);
1635 H5Dclose (data_hid);
1638 m_c_name = classname;
1643#if defined (HAVE_HDF5_18)
1646 subgroup_hid = H5Gopen (group_hid, name);
1648 H5Gget_num_objs (subgroup_hid, &num_obj);
1649 H5Gclose (subgroup_hid);
1651 while (current_item <
static_cast<int> (num_obj)
1668 warning (
"load: unable to reconstruct object inheritance");
1670 octave::interpreter& interp = octave::__get_interpreter__ ();
1672 octave::load_path& lp = interp.get_load_path ();
1674 if (lp.find_method (m_c_name,
"loadobj") !=
"")
1679 m_map = tmp(0).map_value ();
1686 H5Dclose (data_hid);
1689 H5Gclose (group_hid);
1692 octave_unused_parameter (loc_id);
1693 octave_unused_parameter (name);
1708octave_class::in_class_method ()
1710 octave::tree_evaluator& tw = octave::__get_evaluator__ ();
1723 : m_field_names (), m_parent_class_names ()
1726 error (
"invalid call to exemplar_info constructor");
1729 m_field_names = m.
keys ();
1742 error (
"invalid comparison of class exemplar to non-class object");
1745 error (
"mismatch in number of fields");
1753 if (obj_fnames[i] != fnames[i])
1754 error (
"mismatch in field names");
1758 error (
"mismatch in number of parent classes");
1760 const std::list<std::string> obj_parents
1762 const std::list<std::string> pnames = parents ();
1764 auto p = obj_parents.begin ();
1765 auto q = pnames.begin ();
1767 while (p != obj_parents.end ())
1770 error (
"mismatch in parent classes");
1791 int nargin = args.
length ();
1800 retval = args(0).class_name ();
1804 std::string
id = args(1).xstring_value (
"class: ID (class name) must be a string");
1811 error (
"class: invalid call from outside class constructor or method");
1814 error (
"class: '%s' is invalid as a class name in this context",
1817 octave_map m = args(0).xmap_value (
"class: S must be a valid structure");
1834 else if (! it->second.compare (retval))
1835 error (
"class: object of class '%s' does not match previously constructed objects",
1885 Array<std::string> clsnames = args(1).xcellstr_value (
"isa: CLASSNAME must be a string or cell array of strings");
1891 std::string cls = clsnames(idx);
1893 || (cls ==
"float" && obj.
isfloat ())
1894 || (cls ==
"integer" && obj.
isinteger ())
1895 || (cls ==
"numeric" && obj.
isnumeric ())
1897 matches(idx) =
true;
1900 return ovl (matches);
1963DEFUN (__parent_classes__, args, ,
1994is_built_in_class (
const std::string& cn)
1996 static std::set<std::string> built_in_class_names;
1998 if (built_in_class_names.empty ())
2000 built_in_class_names.insert (
"double");
2001 built_in_class_names.insert (
"single");
2002 built_in_class_names.insert (
"cell");
2003 built_in_class_names.insert (
"struct");
2004 built_in_class_names.insert (
"logical");
2005 built_in_class_names.insert (
"char");
2006 built_in_class_names.insert (
"function handle");
2007 built_in_class_names.insert (
"int8");
2008 built_in_class_names.insert (
"uint8");
2009 built_in_class_names.insert (
"int16");
2010 built_in_class_names.insert (
"uint16");
2011 built_in_class_names.insert (
"int32");
2012 built_in_class_names.insert (
"uint32");
2013 built_in_class_names.insert (
"int64");
2014 built_in_class_names.insert (
"uint64");
2017 return built_in_class_names.find (cn) != built_in_class_names.end ();
2036 error (
"superiorto: invalid call from outside class constructor");
2038 for (
int i = 0; i < args.
length (); i++)
2040 std::string inf_class = args(i).xstring_value (
"superiorto: CLASS_NAME must be a string");
2044 if (is_built_in_class (inf_class))
2049 std::string sup_class = fcn->
name ();
2051 error (
"superiorto: opposite precedence already set for %s and %s",
2052 sup_class.c_str (), inf_class.c_str ());
2074 error (
"inferiorto: invalid call from outside class constructor");
2076 for (
int i = 0; i < args.
length (); i++)
2078 std::string sup_class = args(i).xstring_value (
"inferiorto: CLASS_NAME must be a string");
2080 if (is_built_in_class (sup_class))
2081 error (
"inferiorto: cannot give user-defined class lower "
2082 "precedence than built-in class");
2086 std::string inf_class = fcn->
name ();
2088 error (
"inferiorto: opposite precedence already set for %s and %s",
2089 inf_class.c_str (), sup_class.c_str ());
2119 octave_inline_fcn (octave_inline *obj) : m_inline_obj (obj) { }
2121 OCTAVE_DISABLE_COPY_MOVE (octave_inline_fcn)
2123 ~octave_inline_fcn () =
default;
2132 return execute (tw, nargout, args);
2141 octave_inline *m_inline_obj;
2158 :
octave_class (m,
"inline"), m_fcn_obj (new octave_inline_fcn (this))
2161 octave_inline (
const octave_inline&) =
default;
2163 ~octave_inline () =
default;
2169 return new octave_inline (
octave_map (map_keys ()));
2172 bool is_inline_function ()
const {
return true; }
2176 return m_fcn_obj.get ();
2181 std::shared_ptr<octave_inline_fcn> m_fcn_obj;
2194DEFUN (__inline_ctor__, args, ,
2204OCTAVE_END_NAMESPACE(octave)
bool isvector(const dim_vector &dim)
void swap_bytes< 4 >(void *ptr)
N Dimensional Array with copy-on-write semantics.
const dim_vector & dims() const
Return a const-reference so that dims ()(i) works efficiently.
octave_idx_type numel() const
Number of elements in the array.
Cell reshape(const dim_vector &new_dims) const
Cell index(const octave_value_list &idx, bool resize_ok=false) const
void resize(octave_idx_type nr, octave_idx_type nc, double rfv=0)
Vector representing the dimensions (size) of an Array.
octave_idx_type ndims() const
Number of dimensions.
octave_value_list feval(const char *name, const octave_value_list &args=octave_value_list(), int nargout=0)
Evaluate an Octave function (built-in or interpreted) and return the list of result values.
virtual bool is_scalar_type() const
void indent(std::ostream &os) const
void newline(std::ostream &os) const
virtual octave_base_value * unique_parent_class(const std::string &)
virtual octave_base_value * find_parent_class(const std::string &)
static void register_type()
octave::refcount< octave_idx_type > m_count
void warn_load(const char *type) const
virtual bool is_string() const
virtual octave_idx_type xnumel(const octave_value_list &)
virtual octave_map map_value() const
virtual octave_value subsasgn(const std::string &type, const std::list< octave_value_list > &idx, const octave_value &rhs)
friend class octave_value
void warn_save(const char *type) const
virtual bool is_matrix_type() const
bool compare(const octave_value &obj) const
std::list< std::string > parents() const
string_vector map_keys() const
void print(std::ostream &os, bool pr_as_read_syntax=false)
octave_base_value * clone() const
octave_value subsref(const std::string &type, const std::list< octave_value_list > &idx)
octave_base_value * unique_clone()
octave_idx_type nfields() const
octave_base_value * unique_parent_class(const std::string &)
static void clear_exemplar_map()
octave_idx_type xnumel(const octave_value_list &)
octave_base_value * find_parent_class(const std::string &)
std::string type_name() const
std::map< std::string, exemplar_info >::const_iterator exemplar_const_iterator
bool load_binary(std::istream &is, bool swap, octave::mach_info::float_format fmt)
void print_raw(std::ostream &os, bool pr_as_read_syntax=false) const
Cell dotref(const octave_value_list &idx)
octave_value subsasgn(const std::string &type, const std::list< octave_value_list > &idx, const octave_value &rhs)
octave_idx_type numel() const
bool load_hdf5(octave_hdf5_id loc_id, const char *name)
std::string class_name() const
static std::map< std::string, exemplar_info > exemplar_map
std::size_t nparents() const
octave_map map_value() const
mxArray * as_mxArray(bool interleaved) const
bool save_hdf5(octave_hdf5_id loc_id, const char *name, bool save_as_floats)
bool reconstruct_parents()
bool reconstruct_exemplar()
octave::idx_vector index_vector(bool require_integers=false) const
bool save_ascii(std::ostream &os)
void break_closure_cycles(const std::shared_ptr< octave::stack_frame > &frame)
std::size_t byte_size() const
bool is_instance_of(const std::string &) const
string_vector string_vector_value(bool pad) const
bool load_ascii(std::istream &is)
bool save_binary(std::ostream &os, bool save_as_floats)
static octave_value numeric_conv(const Cell &val, const std::string &type)
octave_value undef_subsasgn(const std::string &type, const std::list< octave_value_list > &idx, const octave_value &rhs)
virtual bool is_anonymous_function_of_class(const std::string &="") const
std::string dispatch_class() const
virtual octave_value_list execute(octave::tree_evaluator &tw, int nargout=0, const octave_value_list &args=octave_value_list())=0
bool is_class_method(const std::string &cname="") const
bool is_class_constructor(const std::string &cname="") const
bool is_private_function_of_class(const std::string &nm) const
const_iterator cbegin() const
void resize(const dim_vector &dv, bool fill=false)
octave_idx_type nfields() const
const_iterator end() const
string_vector keys() const
octave_fields::const_iterator const_iterator
const Cell & contents(const_iterator p) const
void delete_elements(const octave::idx_vector &i)
void setfield(const std::string &key, const Cell &val)
octave_idx_type numel() const
const_iterator seek(const std::string &k) const
bool contains(const std::string &name) const
void assign(const std::string &k, const Cell &val)
std::string key(const_iterator p) const
const_iterator begin() const
const_iterator cend() const
octave_idx_type index(const_iterator p) const
bool subsasgn_optimization_ok()
void resize(octave_idx_type n, const octave_value &rfv=octave_value())
octave_value_list slice(octave_idx_type offset, octave_idx_type len, bool tags=false) const
octave_idx_type length() const
octave_value_list list_value() const
Cell xcell_value(const char *fmt,...) const
std::string class_name() const
octave_function * function_value(bool silent=false) const
octave_map xmap_value(const char *fmt,...) const
bool is_instance_of(const std::string &cls_name) const
static octave_value empty_conv(const std::string &type, const octave_value &rhs=octave_value())
string_vector parent_class_names() const
std::size_t nparents() const
octave_value storable_value() const
bool is_zero_by_zero() const
octave_idx_type nfields() const
octave_idx_type numel() const
octave_map map_value() const
bool is_user_function() const
octave_idx_type length() const
octave_user_function * user_function_value(bool silent=false) const
std::list< std::string > parent_class_name_list() const
std::size_t byte_size() const
octave_base_value * internal_rep() const
octave_value subsasgn(const std::string &type, const std::list< octave_value_list > &idx, const octave_value &rhs)
bool set_class_relationship(const std::string &sup_class, const std::string &inf_class)
interpreter & get_interpreter()
octave_function * caller_function() const
const octave_hdf5_id octave_H5P_DEFAULT
const octave_hdf5_id octave_H5S_ALL
OCTAVE_BEGIN_NAMESPACE(octave) static octave_value daspk_fcn
#define DEFMETHOD(name, interp_name, args_name, nargout_name, doc)
Macro to define a builtin method.
#define DEFUN(name, args_name, nargout_name, doc)
Macro to define a builtin function.
void warning(const char *fmt,...)
void error(const char *fmt,...)
void err_wrong_type_arg(const char *name, const char *s)
void err_indexed_cs_list()
octave_hdf5_err hdf5_h5g_iterate(octave_hdf5_id loc_id, const char *name, int *idx, void *operator_data)
bool add_hdf5_data(octave_hdf5_id loc_id, const octave_value &tc, const std::string &name, const std::string &doc, bool mark_global, bool save_as_floats)
std::string read_binary_data(std::istream &is, bool swap, octave::mach_info::float_format fmt, const std::string &filename, bool &global, octave_value &tc, std::string &doc)
bool save_binary_data(std::ostream &os, const octave_value &tc, const std::string &name, const std::string &doc, bool mark_global, bool save_as_floats)
std::string read_text_data(std::istream &is, const std::string &filename, bool &global, octave_value &tc, octave_idx_type count, const bool do_name_validation)
std::string extract_keyword(std::istream &is, const char *keyword, const bool next_only)
bool save_text_data(std::ostream &os, const octave_value &val_arg, const std::string &name, bool mark_global, int precision)
#define OCTAVE_LOCAL_BUFFER(T, buf, size)
octave_value make_idx_args(const std::string &type, const std::list< octave_value_list > &idx, const std::string &who)
bool called_from_builtin()
octave_value_list ovl(const OV_Args &... args)
Construct an octave_value_list with less typing.
#define panic_unless(cond)