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] ==
'.')
411 retval(0) = (t.
numel () == 1 ? t(0)
420 m_c_name, m_parent_list);
426 if (m_map.
numel () > 0)
436 err_invalid_index_type (
type_name (), type[0]);
440 error (
"unpexpected: index not '(', '{', or '.' in - octave_class::subsref please report this bug");
448 retval = retval(0).next_subsref (nargout, type, idx, skip);
452 octave::interpreter& interp = octave::__get_interpreter__ ();
454 octave::symbol_table& symtab = interp.get_symbol_table ();
468 = symtab.find_method (
"numArgumentsFromSubscript",
class_name ());
473 args_nargout(0) = args(0);
474 args_nargout(1) = args(1);
481 nargout = retval(0).strict_int_value
482 (
"subsref: return value of 'numArgumentsFromSubscript' must be integer");
484 else if (nargout <= 0)
489 bool maybe_cs_list_query = (type[0] ==
'.' || type[0] ==
'{'
490 || (type.length () > 1 && type[0] ==
'('
493 if (maybe_cs_list_query)
505 if (type[0] !=
'.' || nout != 1 || nargout < 0)
508 else if (nargout < 0)
518 if (retval.
length () > 1 && (nargout < 0 || nargout > 1))
520 if (nargout <= 0 || nargout >= retval.
length ())
530 if (type.length () == 1 && type[0] ==
'(')
534 err_invalid_index1 ();
546 if (val.
numel () != 1)
547 err_invalid_index_for_assignment ();
551 if (type.length () > 0 && type[0] ==
'.' && ! retval.
isstruct ())
559 const std::list<octave_value_list>& idx,
563 return subsasgn_common (
octave_value (
this), type, idx, rhs);
568 const std::list<octave_value_list>& idx,
575 return subsasgn_common (
Matrix (), type, idx, rhs);
580 const std::string& type,
581 const std::list<octave_value_list>& idx,
588 octave::interpreter& interp = octave::__get_interpreter__ ();
590 octave::symbol_table& symtab = interp.get_symbol_table ();
629 octave::unwind_protect_var<int> restore_var (m_obsolete_copies);
630 m_obsolete_copies = 2;
641 error (
"@%s/subsasgn returned more than one value",
654 std::string method_class = get_current_method_class ();
661 error (
"malformed class");
679 if (n > 1 && ! (type.length () == 2 && type[0] ==
'(' && type[1] ==
'.'))
685 if (type.length () > 1 && type[1] ==
'.')
691 std::string key = key_idx(0).xstring_value (
"invalid index for class assignment");
701 Cell map_elt = map_val.
index (idx.front (),
true);
706 std::list<octave_value_list> next_idx (std::next (idx.begin (), 2),
714 t_rhs = u.
subsasgn (type.substr (2), next_idx, rhs);
717 err_invalid_index_for_assignment ();
727 std::string key = key_idx(0).string_value ();
729 std::list<octave_value_list> next_idx (std::next (idx.begin ()),
732 std::string next_type = type.substr (1);
735 auto pkey = m_map.
seek (key);
736 if (pkey != m_map.
end ())
743 if (tmpc.numel () != 1)
757 t_rhs = tmp.
subsasgn (next_type, next_idx, rhs);
762 err_invalid_index_type (
type_name (), type[0]);
766 error (
"unpexpected: index not '(', '{', or '.' in - octave_class::subsasgn_common please report this bug");
774 if (n > 1 && type[1] ==
'.')
780 std::string key = key_idx(0).xstring_value (
"assignment to class element failed");
782 m_map.
assign (idx.front (), key, t_rhs);
793 m_map.
assign (idx.front (), rhs_map);
801 error (
"invalid class assignment");
818 std::string key = key_idx(0).string_value ();
846 err_invalid_index_type (
type_name (), type[0]);
850 error (
"unpexpected: index not '(', '{', or '.' in - octave_class::subsref please report this bug");
859 octave::interpreter& interp = octave::__get_interpreter__ ();
861 octave::symbol_table& symtab = interp.get_symbol_table ();
866 error (
"no subsindex method defined for class %s",
875 error (
"subsindex function must return a valid index vector");
890 std::size_t retval = 0;
892 for (
auto it = m_map.
cbegin (); it != m_map.
cend (); it++)
894 std::string key = m_map.
key (it);
909 octave::interpreter& interp = octave::__get_interpreter__ ();
911 octave::symbol_table& symtab = interp.get_symbol_table ();
920 retval = tmp(0).is_true ();
941 for (
auto& par : m_parent_list)
970 for (
auto& par : m_parent_list)
972 auto smap = m_map.
seek (par);
1000 bool retval =
false;
1006 for (
auto& par : m_parent_list)
1029 octave::interpreter& interp = octave::__get_interpreter__ ();
1031 octave::symbol_table& symtab = interp.get_symbol_table ();
1036 error (
"no char method defined for class %s",
class_name ().c_str ());
1046 error (
"cname/char method did not return a string");
1048 retval = tmp(0).string_vector_value (pad);
1074 bool retval =
false;
1083 octave::interpreter& interp = octave::__get_interpreter__ ();
1085 octave::symbol_table& symtab = interp.get_symbol_table ();
1087 octave_value ctor = symtab.find_method (m_c_name, m_c_name);
1089 bool have_ctor =
false;
1106 octave::unwind_protect frame;
1110 octave::interpreter_try (frame);
1112 bool execution_error =
false;
1118 result = interp.feval (ctor,
ovl (), 1);
1120 catch (
const octave::execution_exception&)
1122 interp.recover_from_exception ();
1124 execution_error =
true;
1127 if (! execution_error && result.
length () == 1)
1131 warning (
"no constructor for class %s", m_c_name.c_str ());
1154 bool might_have_inheritance =
false;
1155 std::string dbgstr =
"dork";
1158 for (
auto it = m_map.
cbegin (); it != m_map.
cend (); it++)
1160 std::string key = m_map.
key (it);
1162 if (val(0).isobject ())
1165 if (key == val(0).class_name ())
1167 might_have_inheritance =
true;
1174 if (might_have_inheritance)
1184 m_parent_list = exmplr.
parents ();
1185 for (
auto& par : m_parent_list)
1188 bool dbgbool = m_map.
contains (par);
1204 os <<
"# classname: " <<
class_name () <<
"\n";
1207 octave::interpreter& interp = octave::__get_interpreter__ ();
1209 octave::load_path& lp = interp.get_load_path ();
1211 if (lp.find_method (
class_name (),
"saveobj") !=
"")
1217 m = tmp(0).map_value ();
1222 os <<
"# length: " << m.
nfields () <<
"\n";
1224 auto i = m.
begin ();
1225 while (i != m.
end ())
1232 return ! os.fail ();
1244 std::string classname;
1246 if (!
extract_keyword (is,
"classname", classname) || classname.empty ())
1247 error (
"load: failed to extract name of class");
1250 error (
"load: failed to extract number of elements in class");
1274 error (
"load: failed to load class");
1276 m_c_name = classname;
1282 warning (
"load: unable to reconstruct object inheritance");
1284 octave::interpreter& interp = octave::__get_interpreter__ ();
1286 octave::load_path& lp = interp.get_load_path ();
1288 if (lp.find_method (classname,
"loadobj") !=
"")
1293 m_map = tmp(0).map_value ();
1299 m_c_name = classname;
1302 error (
"unexpected: len < 0 in octave_class::load_ascii - please report this bug");
1310 int32_t classname_len =
class_name ().length ();
1312 os.write (
reinterpret_cast<char *
> (&classname_len), 4);
1317 octave::interpreter& interp = octave::__get_interpreter__ ();
1319 octave::load_path& lp = interp.get_load_path ();
1321 if (lp.find_method (
class_name (),
"saveobj") !=
"")
1326 m = tmp(0).map_value ();
1332 os.write (
reinterpret_cast<char *
> (&
len), 4);
1334 auto i = m.
begin ();
1335 while (i != m.
end ())
1342 return ! os.fail ();
1352 octave::mach_info::float_format fmt)
1354 bool success =
true;
1356 int32_t classname_len;
1358 is.read (
reinterpret_cast<char *
> (&classname_len), 4);
1366 classname[classname_len] =
'\0';
1367 if (! is.read (
reinterpret_cast<char *
> (classname), classname_len))
1369 m_c_name = classname;
1374 if (! is.read (
reinterpret_cast<char *
> (&
len), 4))
1406 warning (
"load: unable to reconstruct object inheritance");
1408 octave::interpreter& interp = octave::__get_interpreter__ ();
1410 octave::load_path& lp = interp.get_load_path ();
1412 if (lp.find_method (m_c_name,
"loadobj") !=
"")
1417 m_map = tmp(0).map_value ();
1422 warning (
"load: failed to load class");
1429 error (
"unexpected: len < 0 in octave_class::load_binary - please report this bug");
1436 bool save_as_floats)
1438#if defined (HAVE_HDF5)
1441 hid_t group_hid = -1;
1442 hid_t type_hid = -1;
1443 hid_t space_hid = -1;
1444 hid_t class_hid = -1;
1445 hid_t data_hid = -1;
1449 octave::interpreter& interp = octave::__get_interpreter__ ();
1451 octave::load_path& lp = interp.get_load_path ();
1453#if defined (HAVE_HDF5_18)
1457 group_hid = H5Gcreate (loc_id, name, 0);
1463 type_hid = H5Tcopy (H5T_C_S1);
1464 H5Tset_size (type_hid, m_c_name.length () + 1);
1469 space_hid = H5Screate_simple (0, hdims,
nullptr);
1472#if defined (HAVE_HDF5_18)
1473 class_hid = H5Dcreate (group_hid,
"classname", type_hid, space_hid,
1477 class_hid = H5Dcreate (group_hid,
"classname", type_hid, space_hid,
1480 if (class_hid < 0 || H5Dwrite (class_hid, type_hid,
octave_H5S_ALL,
1482 m_c_name.c_str ()) < 0)
1485#if defined (HAVE_HDF5_18)
1489 data_hid = H5Gcreate (group_hid,
"value", 0);
1494 if (lp.find_method (
class_name (),
"saveobj") !=
"")
1499 m = tmp(0).map_value ();
1506 while (i != m.
end ())
1522 H5Gclose (data_hid);
1525 H5Dclose (class_hid);
1528 H5Sclose (space_hid);
1531 H5Tclose (type_hid);
1534 H5Gclose (group_hid);
1539 octave_unused_parameter (loc_id);
1540 octave_unused_parameter (name);
1541 octave_unused_parameter (save_as_floats);
1552 bool retval =
false;
1554#if defined (HAVE_HDF5)
1556 hid_t group_hid = -1;
1557 hid_t data_hid = -1;
1558 hid_t type_hid = -1;
1559 hid_t type_class_hid = -1;
1560 hid_t space_hid = -1;
1561 hid_t subgroup_hid = -1;
1568 int current_item = 0;
1569 hsize_t num_obj = 0;
1573#if defined (HAVE_HDF5_18)
1576 group_hid = H5Gopen (loc_id, name);
1581#if defined (HAVE_HDF5_18)
1584 data_hid = H5Dopen (group_hid,
"classname");
1590 type_hid = H5Dget_type (data_hid);
1592 type_class_hid = H5Tget_class (type_hid);
1594 if (type_class_hid != H5T_STRING)
1597 space_hid = H5Dget_space (data_hid);
1598 rank = H5Sget_simple_extent_ndims (space_hid);
1603 slen = H5Tget_size (type_hid);
1613 st_id = H5Tcopy (H5T_C_S1);
1614 H5Tset_size (st_id, slen);
1621 H5Dclose (data_hid);
1622 H5Gclose (group_hid);
1627 H5Dclose (data_hid);
1630 m_c_name = classname;
1635#if defined (HAVE_HDF5_18)
1638 subgroup_hid = H5Gopen (group_hid, name);
1640 H5Gget_num_objs (subgroup_hid, &num_obj);
1641 H5Gclose (subgroup_hid);
1643 while (current_item <
static_cast<int> (num_obj)
1660 warning (
"load: unable to reconstruct object inheritance");
1662 octave::interpreter& interp = octave::__get_interpreter__ ();
1664 octave::load_path& lp = interp.get_load_path ();
1666 if (lp.find_method (m_c_name,
"loadobj") !=
"")
1671 m_map = tmp(0).map_value ();
1678 H5Dclose (data_hid);
1681 H5Gclose (group_hid);
1684 octave_unused_parameter (loc_id);
1685 octave_unused_parameter (name);
1700octave_class::in_class_method ()
1702 octave::tree_evaluator& tw = octave::__get_evaluator__ ();
1715 : m_field_names (), m_parent_class_names ()
1718 error (
"invalid call to exemplar_info constructor");
1721 m_field_names = m.
keys ();
1734 error (
"invalid comparison of class exemplar to non-class object");
1737 error (
"mismatch in number of fields");
1745 if (obj_fnames[i] != fnames[i])
1746 error (
"mismatch in field names");
1750 error (
"mismatch in number of parent classes");
1752 const std::list<std::string> obj_parents
1754 const std::list<std::string> pnames = parents ();
1756 auto p = obj_parents.begin ();
1757 auto q = pnames.begin ();
1759 while (p != obj_parents.end ())
1762 error (
"mismatch in parent classes");
1783 int nargin = args.
length ();
1792 retval = args(0).class_name ();
1796 std::string
id = args(1).xstring_value (
"class: ID (class name) must be a string");
1803 error (
"class: invalid call from outside class constructor or method");
1806 error (
"class: '%s' is invalid as a class name in this context",
1809 octave_map m = args(0).xmap_value (
"class: S must be a valid structure");
1826 else if (! it->second.compare (retval))
1827 error (
"class: object of class '%s' does not match previously constructed objects",
1877 Array<std::string> clsnames = args(1).xcellstr_value (
"isa: CLASSNAME must be a string or cell array of strings");
1883 std::string cls = clsnames(idx);
1885 || (cls ==
"float" && obj.
isfloat ())
1886 || (cls ==
"integer" && obj.
isinteger ())
1887 || (cls ==
"numeric" && obj.
isnumeric ())
1889 matches(idx) =
true;
1892 return ovl (matches);
1955DEFUN (__parent_classes__, args, ,
1986is_built_in_class (
const std::string& cn)
1988 static std::set<std::string> built_in_class_names;
1990 if (built_in_class_names.empty ())
1992 built_in_class_names.insert (
"double");
1993 built_in_class_names.insert (
"single");
1994 built_in_class_names.insert (
"cell");
1995 built_in_class_names.insert (
"struct");
1996 built_in_class_names.insert (
"logical");
1997 built_in_class_names.insert (
"char");
1998 built_in_class_names.insert (
"function handle");
1999 built_in_class_names.insert (
"int8");
2000 built_in_class_names.insert (
"uint8");
2001 built_in_class_names.insert (
"int16");
2002 built_in_class_names.insert (
"uint16");
2003 built_in_class_names.insert (
"int32");
2004 built_in_class_names.insert (
"uint32");
2005 built_in_class_names.insert (
"int64");
2006 built_in_class_names.insert (
"uint64");
2009 return built_in_class_names.find (cn) != built_in_class_names.end ();
2028 error (
"superiorto: invalid call from outside class constructor");
2030 for (
int i = 0; i < args.
length (); i++)
2032 std::string inf_class = args(i).xstring_value (
"superiorto: CLASS_NAME must be a string");
2036 if (is_built_in_class (inf_class))
2041 std::string sup_class = fcn->
name ();
2043 error (
"superiorto: opposite precedence already set for %s and %s",
2044 sup_class.c_str (), inf_class.c_str ());
2066 error (
"inferiorto: invalid call from outside class constructor");
2068 for (
int i = 0; i < args.
length (); i++)
2070 std::string sup_class = args(i).xstring_value (
"inferiorto: CLASS_NAME must be a string");
2072 if (is_built_in_class (sup_class))
2073 error (
"inferiorto: cannot give user-defined class lower "
2074 "precedence than built-in class");
2078 std::string inf_class = fcn->
name ();
2080 error (
"inferiorto: opposite precedence already set for %s and %s",
2081 inf_class.c_str (), sup_class.c_str ());
2111 octave_inline_fcn (octave_inline *obj) : m_inline_obj (obj) { }
2113 OCTAVE_DISABLE_COPY_MOVE (octave_inline_fcn)
2115 ~octave_inline_fcn () =
default;
2124 return execute (tw, nargout, args);
2133 octave_inline *m_inline_obj;
2150 :
octave_class (m,
"inline"), m_fcn_obj (new octave_inline_fcn (this))
2153 octave_inline (
const octave_inline&) =
default;
2155 ~octave_inline () =
default;
2161 return new octave_inline (
octave_map (map_keys ()));
2164 bool is_inline_function ()
const {
return true; }
2168 return m_fcn_obj.get ();
2173 std::shared_ptr<octave_inline_fcn> m_fcn_obj;
2186DEFUN (__inline_ctor__, args, ,
2196OCTAVE_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()
bool add_hdf5_data(octave_hdf5_id loc_id, const octave_value &tc_in, const std::string &name, const std::string &doc, bool mark_global, bool save_as_floats)
octave_hdf5_err hdf5_h5g_iterate(octave_hdf5_id loc_id, const char *name, int *idx, void *operator_data)
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_in, 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)