26 #if defined (HAVE_CONFIG_H)
64 int octave_class::s_t_id (-1);
66 const 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");
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;
227 octave_class::get_current_method_class ()
246 OCTAVE_NORETURN
static
248 err_invalid_index1 ()
250 error (
"invalid index for class");
253 OCTAVE_NORETURN
static
255 err_invalid_index_for_assignment ()
257 error (
"invalid index for class assignment");
260 OCTAVE_NORETURN
static
262 err_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);
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++)
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]);
449 retval = retval(0).next_subsref (nargout, type, idx, skip);
455 octave::symbol_table& symtab = interp.get_symbol_table ();
473 bool maybe_cs_list_query = (type[0] ==
'.' || type[0] ==
'{'
474 || (type.length () > 1 && type[0] ==
'('
477 if (maybe_cs_list_query)
482 if (type[0] !=
'.') tmp = idx.front ();
484 if (nargout != 0 || nout > 1)
487 else if (nargout < 0)
497 if (retval.
length () > 1 && (nargout < 0 || nargout > 1))
499 if (nargout <= 0 || nargout >= retval.
length ())
509 if (type.length () == 1 && type[0] ==
'(')
513 err_invalid_index1 ();
525 if (val.
numel () != 1)
526 err_invalid_index_for_assignment ();
530 if (type.length () > 0 && type[0] ==
'.' && ! retval.
isstruct ())
538 const std::list<octave_value_list>& idx,
542 return subsasgn_common (
octave_value (
this), type, idx, rhs);
547 const std::list<octave_value_list>& idx,
554 return subsasgn_common (
Matrix (), type, idx, rhs);
559 const std::string& type,
560 const std::list<octave_value_list>& idx,
569 octave::symbol_table& symtab = interp.get_symbol_table ();
608 octave::unwind_protect_var<int> restore_var (m_obsolete_copies);
609 m_obsolete_copies = 2;
620 error (
"@%s/subsasgn returned more than one value",
633 std::string method_class = get_current_method_class ();
640 error (
"malformed class");
654 int n = type.length ();
658 if (
n > 1 && ! (type.length () == 2 && type[0] ==
'(' && type[1] ==
'.'))
664 if (type.length () > 1 && type[1] ==
'.')
666 auto p = idx.begin ();
673 std::string key = key_idx(0).xstring_value (
"invalid index for class assignment");
683 Cell map_elt = map_val.
index (idx.front (),
true);
688 std::list<octave_value_list> next_idx (idx);
693 next_idx.erase (next_idx.begin ());
694 next_idx.erase (next_idx.begin ());
698 t_rhs = u.
subsasgn (type.substr (2), next_idx, rhs);
701 err_invalid_index_for_assignment ();
711 std::string key = key_idx(0).string_value ();
713 std::list<octave_value_list> next_idx (idx);
715 next_idx.erase (next_idx.begin ());
717 std::string next_type = type.substr (1);
720 auto pkey = m_map.
seek (key);
721 if (pkey != m_map.
end ())
728 if (tmpc.numel () != 1)
742 t_rhs = tmp.
subsasgn (next_type, next_idx, rhs);
747 err_invalid_index_type (
type_name (), type[0]);
759 if (
n > 1 && type[1] ==
'.')
761 auto p = idx.begin ();
766 std::string key = key_idx(0).xstring_value (
"assignment to class element failed");
768 m_map.
assign (idx.front (), key, t_rhs);
779 m_map.
assign (idx.front (), rhs_map);
787 error (
"invalid class assignment");
804 std::string key = key_idx(0).string_value ();
832 err_invalid_index_type (
type_name (), type[0]);
847 octave::symbol_table& symtab = interp.get_symbol_table ();
852 error (
"no subsindex method defined for class %s",
861 error (
"subsindex function must return a valid index vector");
876 std::size_t retval = 0;
878 for (
auto it = m_map.
cbegin (); it != m_map.
cend (); it++)
880 std::string key = m_map.
key (it);
897 octave::symbol_table& symtab = interp.get_symbol_table ();
906 retval = tmp(0).is_true ();
927 for (
auto& par : m_parent_list)
956 for (
auto& par : m_parent_list)
958 auto smap = m_map.
seek (par);
992 for (
auto& par : m_parent_list)
1017 octave::symbol_table& symtab = interp.get_symbol_table ();
1022 error (
"no char method defined for class %s",
class_name ().c_str ());
1032 error (
"cname/char method did not return a string");
1034 retval = tmp(0).string_vector_value (pad);
1060 bool retval =
false;
1071 octave::symbol_table& symtab = interp.get_symbol_table ();
1073 octave_value ctor = symtab.find_method (m_c_name, m_c_name);
1075 bool have_ctor =
false;
1092 octave::unwind_protect frame;
1098 bool execution_error =
false;
1104 result = interp.feval (ctor,
ovl (), 1);
1106 catch (
const octave::execution_exception&)
1108 interp.recover_from_exception ();
1110 execution_error =
true;
1113 if (! execution_error && result.
length () == 1)
1117 warning (
"no constructor for class %s", m_c_name.c_str ());
1140 bool might_have_inheritance =
false;
1141 std::string dbgstr =
"dork";
1144 for (
auto it = m_map.
cbegin (); it != m_map.
cend (); it++)
1146 std::string key = m_map.
key (it);
1153 might_have_inheritance =
true;
1160 if (might_have_inheritance)
1170 m_parent_list = exmplr.
parents ();
1171 for (
auto& par : m_parent_list)
1174 bool dbgbool = m_map.
contains (par);
1190 os <<
"# classname: " <<
class_name () <<
"\n";
1195 octave::load_path& lp = interp.get_load_path ();
1197 if (lp.find_method (
class_name (),
"saveobj") !=
"")
1203 m = tmp(0).map_value ();
1208 os <<
"# length: " <<
m.nfields () <<
"\n";
1210 auto i =
m.begin ();
1211 while (i !=
m.end ())
1218 return ! os.fail ();
1230 std::string classname;
1232 if (!
extract_keyword (is,
"classname", classname) || classname.empty ())
1233 error (
"load: failed to extract name of class");
1236 error (
"load: failed to extract number of elements in class");
1256 m.assign (nm, tcell);
1260 error (
"load: failed to load class");
1262 m_c_name = classname;
1268 warning (
"load: unable to reconstruct object inheritance");
1272 octave::load_path& lp = interp.get_load_path ();
1274 if (lp.find_method (classname,
"loadobj") !=
"")
1279 m_map = tmp(0).map_value ();
1285 m_c_name = classname;
1296 int32_t classname_len =
class_name ().length ();
1298 os.write (
reinterpret_cast<char *
> (&classname_len), 4);
1305 octave::load_path& lp = interp.get_load_path ();
1307 if (lp.find_method (
class_name (),
"saveobj") !=
"")
1312 m = tmp(0).map_value ();
1317 int32_t
len =
m.nfields ();
1318 os.write (
reinterpret_cast<char *
> (&
len), 4);
1320 auto i =
m.begin ();
1321 while (i !=
m.end ())
1328 return ! os.fail ();
1340 bool success =
true;
1342 int32_t classname_len;
1344 is.read (
reinterpret_cast<char *
> (&classname_len), 4);
1352 classname[classname_len] =
'\0';
1353 if (! is.read (
reinterpret_cast<char *
> (classname), classname_len))
1355 m_c_name = classname;
1360 if (! is.read (
reinterpret_cast<char *
> (&
len), 4))
1384 m.assign (nm, tcell);
1392 warning (
"load: unable to reconstruct object inheritance");
1396 octave::load_path& lp = interp.get_load_path ();
1398 if (lp.find_method (m_c_name,
"loadobj") !=
"")
1403 m_map = tmp(0).map_value ();
1408 warning (
"load: failed to load class");
1422 bool save_as_floats)
1424 #if defined (HAVE_HDF5)
1427 hid_t group_hid = -1;
1428 hid_t type_hid = -1;
1429 hid_t space_hid = -1;
1430 hid_t class_hid = -1;
1431 hid_t data_hid = -1;
1437 octave::load_path& lp = interp.get_load_path ();
1439 #if defined (HAVE_HDF5_18)
1443 group_hid = H5Gcreate (loc_id, name, 0);
1449 type_hid = H5Tcopy (H5T_C_S1);
1450 H5Tset_size (type_hid, m_c_name.length () + 1);
1455 space_hid = H5Screate_simple (0, hdims,
nullptr);
1458 #if defined (HAVE_HDF5_18)
1459 class_hid = H5Dcreate (group_hid,
"classname", type_hid, space_hid,
1463 class_hid = H5Dcreate (group_hid,
"classname", type_hid, space_hid,
1466 if (class_hid < 0 || H5Dwrite (class_hid, type_hid,
octave_H5S_ALL,
1468 m_c_name.c_str ()) < 0)
1471 #if defined (HAVE_HDF5_18)
1475 data_hid = H5Gcreate (group_hid,
"value", 0);
1480 if (lp.find_method (
class_name (),
"saveobj") !=
"")
1485 m = tmp(0).map_value ();
1492 while (i !=
m.end ())
1496 bool retval2 =
add_hdf5_data (data_hid, val,
m.key (i),
"",
false,
1508 H5Gclose (data_hid);
1511 H5Dclose (class_hid);
1514 H5Sclose (space_hid);
1517 H5Tclose (type_hid);
1520 H5Gclose (group_hid);
1525 octave_unused_parameter (loc_id);
1526 octave_unused_parameter (name);
1527 octave_unused_parameter (save_as_floats);
1538 bool retval =
false;
1540 #if defined (HAVE_HDF5)
1542 hid_t group_hid = -1;
1543 hid_t data_hid = -1;
1544 hid_t type_hid = -1;
1545 hid_t type_class_hid = -1;
1546 hid_t space_hid = -1;
1547 hid_t subgroup_hid = -1;
1554 int current_item = 0;
1555 hsize_t num_obj = 0;
1559 #if defined (HAVE_HDF5_18)
1562 group_hid = H5Gopen (loc_id, name);
1567 #if defined (HAVE_HDF5_18)
1570 data_hid = H5Dopen (group_hid,
"classname");
1576 type_hid = H5Dget_type (data_hid);
1578 type_class_hid = H5Tget_class (type_hid);
1580 if (type_class_hid != H5T_STRING)
1583 space_hid = H5Dget_space (data_hid);
1584 rank = H5Sget_simple_extent_ndims (space_hid);
1589 slen = H5Tget_size (type_hid);
1599 st_id = H5Tcopy (H5T_C_S1);
1600 H5Tset_size (st_id, slen);
1607 H5Dclose (data_hid);
1608 H5Gclose (group_hid);
1613 H5Dclose (data_hid);
1616 m_c_name = classname;
1621 #if defined (HAVE_HDF5_18)
1624 subgroup_hid = H5Gopen (group_hid, name);
1626 H5Gget_num_objs (subgroup_hid, &num_obj);
1627 H5Gclose (subgroup_hid);
1629 while (current_item <
static_cast<int> (num_obj)
1637 m.assign (dsub.
name, tcell);
1646 warning (
"load: unable to reconstruct object inheritance");
1650 octave::load_path& lp = interp.get_load_path ();
1652 if (lp.find_method (m_c_name,
"loadobj") !=
"")
1657 m_map = tmp(0).map_value ();
1664 H5Dclose (data_hid);
1667 H5Gclose (group_hid);
1670 octave_unused_parameter (loc_id);
1671 octave_unused_parameter (name);
1686 octave_class::in_class_method ()
1701 : m_field_names (), m_parent_class_names ()
1704 error (
"invalid call to exemplar_info constructor");
1707 m_field_names =
m.keys ();
1720 error (
"invalid comparison of class exemplar to non-class object");
1723 error (
"mismatch in number of fields");
1731 if (obj_fnames[i] != fnames[i])
1732 error (
"mismatch in field names");
1736 error (
"mismatch in number of parent classes");
1738 const std::list<std::string> obj_parents
1740 const std::list<std::string> pnames = parents ();
1742 auto p = obj_parents.begin ();
1743 auto q = pnames.begin ();
1745 while (p != obj_parents.end ())
1748 error (
"mismatch in parent classes");
1769 int nargin = args.
length ();
1778 retval = args(0).class_name ();
1782 std::string
id = args(1).xstring_value (
"class: ID (class name) must be a string");
1789 error (
"class: invalid call from outside class constructor or method");
1792 error (
"class: '%s' is invalid as a class name in this context",
1795 octave_map m = args(0).xmap_value (
"class: S must be a valid structure");
1812 else if (! it->second.compare (retval))
1813 error (
"class: object of class '%s' does not match previously constructed objects",
1863 Array<std::string> clsnames = args(1).xcellstr_value (
"isa: CLASSNAME must be a string or cell array of strings");
1869 std::string cls = clsnames(idx);
1871 || (cls ==
"float" && obj.
isfloat ())
1872 || (cls ==
"integer" && obj.
isinteger ())
1873 || (cls ==
"numeric" && obj.
isnumeric ())
1875 matches(idx) =
true;
1878 return ovl (matches);
1941 DEFUN (__parent_classes__, args, ,
1972 is_built_in_class (
const std::string& cn)
1974 static std::set<std::string> built_in_class_names;
1976 if (built_in_class_names.empty ())
1978 built_in_class_names.insert (
"double");
1979 built_in_class_names.insert (
"single");
1980 built_in_class_names.insert (
"cell");
1981 built_in_class_names.insert (
"struct");
1982 built_in_class_names.insert (
"logical");
1983 built_in_class_names.insert (
"char");
1984 built_in_class_names.insert (
"function handle");
1985 built_in_class_names.insert (
"int8");
1986 built_in_class_names.insert (
"uint8");
1987 built_in_class_names.insert (
"int16");
1988 built_in_class_names.insert (
"uint16");
1989 built_in_class_names.insert (
"int32");
1990 built_in_class_names.insert (
"uint32");
1991 built_in_class_names.insert (
"int64");
1992 built_in_class_names.insert (
"uint64");
1995 return built_in_class_names.find (cn) != built_in_class_names.end ();
2014 error (
"superiorto: invalid call from outside class constructor");
2016 for (
int i = 0; i < args.
length (); i++)
2018 std::string inf_class = args(i).xstring_value (
"superiorto: CLASS_NAME must be a string");
2022 if (is_built_in_class (inf_class))
2027 std::string sup_class = fcn->
name ();
2029 error (
"superiorto: opposite precedence already set for %s and %s",
2030 sup_class.c_str (), inf_class.c_str ());
2052 error (
"inferiorto: invalid call from outside class constructor");
2054 for (
int i = 0; i < args.
length (); i++)
2056 std::string sup_class = args(i).xstring_value (
"inferiorto: CLASS_NAME must be a string");
2058 if (is_built_in_class (sup_class))
2059 error (
"inferiorto: cannot give user-defined class lower "
2060 "precedence than built-in class");
2064 std::string inf_class = fcn->
name ();
2066 error (
"inferiorto: opposite precedence already set for %s and %s",
2067 inf_class.c_str (), sup_class.c_str ());
2088 class octave_inline;
2098 octave_inline_fcn (octave_inline *obj) : m_inline_obj (obj) { }
2100 OCTAVE_DISABLE_COPY_MOVE (octave_inline_fcn)
2102 ~octave_inline_fcn () =
default;
2111 return execute (tw, nargout, args);
2120 octave_inline *m_inline_obj;
2138 :
octave_class (
m,
"inline"), m_fcn_obj (new octave_inline_fcn (this))
2141 octave_inline (
const octave_inline&) =
default;
2143 ~octave_inline () =
default;
2156 return m_fcn_obj.get ();
2161 std::shared_ptr<octave_inline_fcn> m_fcn_obj;
2174 DEFUN (__inline_ctor__, args, ,
2184 OCTAVE_END_NAMESPACE(
octave)
bool isvector(const dim_vector &dim)
void swap_bytes< 4 >(void *ptr)
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
virtual octave_base_value * unique_parent_class(const std::string &)
void indent(std::ostream &os) const
void newline(std::ostream &os) const
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_base_value * find_parent_class(const std::string &)
virtual bool is_inline_function() const
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)
virtual octave_function * function_value(bool silent=false)
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
virtual octave_value subsref(const std::string &type, const std::list< octave_value_list > &idx)
void print(std::ostream &os, bool pr_as_read_syntax=false)
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
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
octave_base_value * empty_clone() 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)
std::map< std::string, exemplar_info >::const_iterator exemplar_const_iterator
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)
octave_base_value * clone() const
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
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 Cell & contents(const_iterator p) 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_base_value * internal_rep() const
octave_value_list list_value() const
Cell xcell_value(const char *fmt,...) const
std::string class_name() const
octave_map xmap_value(const char *fmt,...) const
bool is_instance_of(const std::string &cls_name) const
octave_user_function * user_function_value(bool silent=false) const
octave::idx_vector index_vector(bool require_integers=false) 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_function * function_value(bool silent=false) const
octave_idx_type nfields() const
octave_idx_type numel() const
octave_map map_value() const
bool is_user_function() const
std::size_t byte_size() const
std::list< std::string > parent_class_name_list() 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 interpreter_try(octave::unwind_protect &)
#define panic_impossible()
#define panic_unless(cond)
void err_wrong_type_arg(const char *name, const char *s)
void err_indexed_cs_list()
octave::idx_vector idx_vector
interpreter & __get_interpreter__()
tree_evaluator & __get_evaluator__()
symbol_table & __get_symbol_table__()
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 binary_op(type_info &ti, octave_value::binary_op op, const octave_value &a, const octave_value &b)
octave_value_list ovl(const OV_Args &... args)
Construct an octave_value_list with less typing.