77 : fcn (f), nm (n), has_overloads (false)
85 ::
error (
"handles to nested functions are not yet supported");
90 const std::list<octave_value_list>& idx,
98 const std::list<octave_value_list>& idx,
100 const std::list<octave_lvalue>* lvalue_list)
108 int tmp_nargout = (type.length () > 1 && nargout == 0) ? 1 : nargout;
111 idx.size () == 1 ? lvalue_list : 0);
119 error (
"%s cannot be indexed with %c", tnm.c_str (), type[0]);
132 retval = retval(0).next_subsref (nargout, type, idx);
147 const std::list<octave_lvalue>* lvalue_list)
170 str_ov_map::iterator it =
overloads.find (dispatch_type);
176 std::list<std::string> plist
179 std::list<std::string>::const_iterator pit = plist.begin ();
181 while (pit != plist.end ())
183 std::string pname = *pit;
214 error (
"%s: no method for class %s",
215 nm.c_str (), dispatch_type.c_str ());
223 error (
"%s: no longer valid function handle",
nm.c_str ());
240 str_ov_map::const_iterator iter =
overloads.begin ();
241 str_ov_map::const_iterator hiter = h.
overloads.begin ();
242 for (; iter !=
overloads.end () && retval; iter++, hiter++)
243 retval = (iter->first == hiter->first)
244 && (iter->second.is_copy_of (hiter->second));
252 const std::string& fpath)
256 if (octaveroot.length () != 0
257 && fpath.length () >= octaveroot.length ()
258 && fpath.substr (0, octaveroot.length ()) == octaveroot
263 fpath.substr (octaveroot.length ());
270 std::string dir_name = str.substr (0, xpos);
283 error (
"function handle points to non-existent function");
301 std::string dir_name = str.substr (0, xpos);
313 error (
"function handle points to non-existent function");
320 if (fpath.length () > 0)
324 std::string dir_name = fpath.substr (0, xpos);
336 error (
"function handle points to non-existent function");
346 error (
"function handle points to non-existent function");
370 std::list<symbol_table::symbol_record>
vars
373 size_t varlen = vars.size ();
377 os <<
"# length: " << varlen <<
"\n";
379 for (std::list<symbol_table::symbol_record>::const_iterator
380 p = vars.begin (); p != vars.end (); p++)
394 os <<
"# path: " << fnm <<
"\n";
406 std::streampos pos = is.tellg ();
408 if (octaveroot.length () == 0)
415 if (fpath.length () == 0)
469 error (
"load: failed to load anonymous function handle");
489 if (parse_status == 0)
513 success =
set_fcn (octaveroot, fpath);
523 std::ostringstream nmbuf;
530 std::list<symbol_table::symbol_record>
vars
533 size_t varlen = vars.size ();
536 nmbuf <<
nm <<
" " << varlen;
540 std::string buf_str = nmbuf.str ();
541 int32_t tmp = buf_str.length ();
542 os.write (reinterpret_cast<char *> (&tmp), 4);
543 os.write (buf_str.c_str (), buf_str.length ());
545 std::ostringstream buf;
547 std::string stmp = buf.str ();
548 tmp = stmp.length ();
549 os.write (reinterpret_cast<char *> (&tmp), 4);
550 os.write (stmp.c_str (), stmp.length ());
554 for (std::list<symbol_table::symbol_record>::const_iterator
555 p = vars.begin (); p != vars.end (); p++)
558 "", 0, save_as_floats))
565 std::ostringstream nmbuf;
572 std::string buf_str = nmbuf.str ();
573 int32_t tmp = buf_str.length ();
574 os.write (reinterpret_cast<char *> (&tmp), 4);
575 os.write (buf_str.c_str (), buf_str.length ());
588 if (! is.read (reinterpret_cast<char *> (&tmp), 4))
596 is.read (ctmp1, tmp);
598 nm = std::string (ctmp1);
609 if (
nm.length () > anl)
611 std::istringstream nm_is (
nm.substr (anl));
613 nm =
nm.substr (0, anl);
616 if (! is.read (reinterpret_cast<char *> (&tmp), 4))
624 is.read (ctmp2, tmp);
654 error (
"load: failed to load anonymous function handle");
668 if (parse_status == 0)
690 std::string octaveroot;
693 if (
nm.find_first_of (
"\n") != std::string::npos)
695 size_t pos1 =
nm.find_first_of (
"\n");
696 size_t pos2 =
nm.find_first_of (
"\n", pos1 + 1);
697 octaveroot =
nm.substr (pos1 + 1, pos2 - pos1 - 1);
698 fpath =
nm.substr (pos2 + 1);
699 nm =
nm.substr (0, pos1);
702 success =
set_fcn (octaveroot, fpath);
712 #if defined (HAVE_HDF5)
716 hid_t group_hid = -1;
718 group_hid = H5Gcreate (loc_id, name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
720 group_hid = H5Gcreate (loc_id, name, 0);
725 hid_t space_hid, data_hid, type_hid;
726 space_hid = data_hid = type_hid = -1;
729 type_hid = H5Tcopy (H5T_C_S1);
730 H5Tset_size (type_hid,
nm.length () + 1);
733 H5Gclose (group_hid);
740 space_hid = H5Screate_simple (0 , hdims, 0);
744 H5Gclose (group_hid);
748 data_hid = H5Dcreate (group_hid,
"nm", type_hid, space_hid,
749 H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
751 data_hid = H5Dcreate (group_hid,
"nm", type_hid, space_hid, H5P_DEFAULT);
753 if (data_hid < 0 || H5Dwrite (data_hid, type_hid, H5S_ALL, H5S_ALL,
754 H5P_DEFAULT,
nm.c_str ()) < 0)
756 H5Sclose (space_hid);
758 H5Gclose (group_hid);
765 std::ostringstream buf;
767 std::string stmp = buf.str ();
770 H5Tset_size (type_hid, stmp.length () + 1);
773 H5Sclose (space_hid);
774 H5Gclose (group_hid);
779 data_hid = H5Dcreate (group_hid,
"fcn", type_hid, space_hid,
780 H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
782 data_hid = H5Dcreate (group_hid,
"fcn", type_hid, space_hid,
785 if (data_hid < 0 || H5Dwrite (data_hid, type_hid, H5S_ALL, H5S_ALL,
786 H5P_DEFAULT, stmp.c_str ()) < 0)
788 H5Sclose (space_hid);
790 H5Gclose (group_hid);
798 std::list<symbol_table::symbol_record>
vars
801 size_t varlen = vars.size ();
805 hid_t as_id = H5Screate (H5S_SCALAR);
810 hid_t a_id = H5Acreate (group_hid,
"SYMBOL_TABLE",
812 H5P_DEFAULT, H5P_DEFAULT);
815 hid_t a_id = H5Acreate (group_hid,
"SYMBOL_TABLE",
833 data_hid = H5Gcreate (group_hid,
"symbol table",
834 H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
836 data_hid = H5Gcreate (group_hid,
"symbol table", 0);
840 H5Sclose (space_hid);
842 H5Gclose (group_hid);
846 for (std::list<symbol_table::symbol_record>::const_iterator
847 p = vars.begin (); p != vars.end (); p++)
850 "",
false, save_as_floats))
861 std::string fpath = f ? f->
fcn_file_name () : std::string ();
863 H5Sclose (space_hid);
865 hdims[1] = octaveroot.length ();
866 space_hid = H5Screate_simple (0 , hdims, 0);
870 H5Gclose (group_hid);
875 type_hid = H5Tcopy (H5T_C_S1);
876 H5Tset_size (type_hid, octaveroot.length () + 1);
878 hid_t a_id = H5Acreate (group_hid,
"OCTAVEROOT",
879 type_hid, space_hid, H5P_DEFAULT, H5P_DEFAULT);
881 hid_t a_id = H5Acreate (group_hid,
"OCTAVEROOT",
882 type_hid, space_hid, H5P_DEFAULT);
887 retval = (H5Awrite (a_id, type_hid, octaveroot.c_str ()) >= 0);
893 H5Sclose (space_hid);
895 H5Gclose (group_hid);
899 H5Sclose (space_hid);
901 hdims[1] = fpath.length ();
902 space_hid = H5Screate_simple (0 , hdims, 0);
906 H5Gclose (group_hid);
911 type_hid = H5Tcopy (H5T_C_S1);
912 H5Tset_size (type_hid, fpath.length () + 1);
915 a_id = H5Acreate (group_hid,
"FILE", type_hid, space_hid,
916 H5P_DEFAULT, H5P_DEFAULT);
918 a_id = H5Acreate (group_hid,
"FILE", type_hid, space_hid, H5P_DEFAULT);
923 retval = (H5Awrite (a_id, type_hid, fpath.c_str ()) >= 0);
931 H5Sclose (space_hid);
933 H5Gclose (group_hid);
946 #if defined (HAVE_HDF5)
950 hid_t group_hid, data_hid, space_hid, type_hid, type_class_hid, st_id;
955 group_hid = H5Gopen (loc_id, name, H5P_DEFAULT);
957 group_hid = H5Gopen (loc_id, name);
963 data_hid = H5Dopen (group_hid,
"nm", H5P_DEFAULT);
965 data_hid = H5Dopen (group_hid,
"nm");
970 H5Gclose (group_hid);
974 type_hid = H5Dget_type (data_hid);
975 type_class_hid = H5Tget_class (type_hid);
977 if (type_class_hid != H5T_STRING)
981 H5Gclose (group_hid);
985 space_hid = H5Dget_space (data_hid);
986 rank = H5Sget_simple_extent_ndims (space_hid);
990 H5Sclose (space_hid);
993 H5Gclose (group_hid);
997 slen = H5Tget_size (type_hid);
1000 H5Sclose (space_hid);
1001 H5Tclose (type_hid);
1002 H5Dclose (data_hid);
1003 H5Gclose (group_hid);
1010 st_id = H5Tcopy (H5T_C_S1);
1011 H5Tset_size (st_id, slen);
1013 if (H5Dread (data_hid, st_id, H5S_ALL, H5S_ALL, H5P_DEFAULT, nm_tmp) < 0)
1016 H5Sclose (space_hid);
1017 H5Tclose (type_hid);
1018 H5Dclose (data_hid);
1019 H5Gclose (group_hid);
1023 H5Dclose (data_hid);
1029 data_hid = H5Dopen (group_hid,
"fcn", H5P_DEFAULT);
1031 data_hid = H5Dopen (group_hid,
"fcn");
1036 H5Sclose (space_hid);
1037 H5Tclose (type_hid);
1038 H5Gclose (group_hid);
1042 H5Tclose (type_hid);
1043 type_hid = H5Dget_type (data_hid);
1044 type_class_hid = H5Tget_class (type_hid);
1046 if (type_class_hid != H5T_STRING)
1048 H5Sclose (space_hid);
1049 H5Tclose (type_hid);
1050 H5Dclose (data_hid);
1051 H5Gclose (group_hid);
1055 H5Sclose (space_hid);
1056 space_hid = H5Dget_space (data_hid);
1057 rank = H5Sget_simple_extent_ndims (space_hid);
1061 H5Sclose (space_hid);
1062 H5Tclose (type_hid);
1063 H5Dclose (data_hid);
1064 H5Gclose (group_hid);
1068 slen = H5Tget_size (type_hid);
1071 H5Sclose (space_hid);
1072 H5Tclose (type_hid);
1073 H5Dclose (data_hid);
1074 H5Gclose (group_hid);
1081 st_id = H5Tcopy (H5T_C_S1);
1082 H5Tset_size (st_id, slen);
1084 if (H5Dread (data_hid, st_id, H5S_ALL, H5S_ALL, H5P_DEFAULT, fcn_tmp) < 0)
1087 H5Sclose (space_hid);
1088 H5Tclose (type_hid);
1089 H5Dclose (data_hid);
1090 H5Gclose (group_hid);
1094 H5Dclose (data_hid);
1102 H5E_auto_t err_func;
1103 void *err_func_data;
1108 H5Eget_auto (H5E_DEFAULT, &err_func, &err_func_data);
1109 H5Eset_auto (H5E_DEFAULT, 0, 0);
1111 H5Eget_auto (&err_func, &err_func_data);
1115 hid_t attr_id = H5Aopen_name (group_hid,
"SYMBOL_TABLE");
1127 H5Eset_auto (H5E_DEFAULT, err_func, err_func_data);
1129 H5Eset_auto (err_func, err_func_data);
1145 if (len > 0 && success)
1147 hsize_t num_obj = 0;
1149 data_hid = H5Gopen (group_hid,
"symbol table", H5P_DEFAULT);
1151 data_hid = H5Gopen (group_hid,
"symbol table");
1153 H5Gget_num_objs (data_hid, &num_obj);
1154 H5Gclose (data_hid);
1156 if (num_obj != static_cast<hsize_t>(len))
1158 error (
"load: failed to load anonymous function handle");
1165 int current_item = 0;
1168 if (H5Giterate (group_hid,
"symbol table", ¤t_item,
1171 error (
"load: failed to load anonymous function handle");
1187 if (parse_status == 0)
1211 std::string octaveroot;
1218 H5E_auto_t err_func;
1219 void *err_func_data;
1224 H5Eget_auto (H5E_DEFAULT, &err_func, &err_func_data);
1225 H5Eset_auto (H5E_DEFAULT, 0, 0);
1227 H5Eget_auto (&err_func, &err_func_data);
1231 hid_t attr_id = H5Aopen_name (group_hid,
"OCTAVEROOT");
1234 H5Tclose (type_hid);
1235 type_hid = H5Aget_type (attr_id);
1236 type_class_hid = H5Tget_class (type_hid);
1238 if (type_class_hid != H5T_STRING)
1242 slen = H5Tget_size (type_hid);
1243 st_id = H5Tcopy (H5T_C_S1);
1244 H5Tset_size (st_id, slen);
1247 if (H5Aread (attr_id, st_id, root_tmp) < 0)
1250 octaveroot = root_tmp;
1260 attr_id = H5Aopen_name (group_hid,
"FILE");
1263 H5Tclose (type_hid);
1264 type_hid = H5Aget_type (attr_id);
1265 type_class_hid = H5Tget_class (type_hid);
1267 if (type_class_hid != H5T_STRING)
1271 slen = H5Tget_size (type_hid);
1272 st_id = H5Tcopy (H5T_C_S1);
1273 H5Tset_size (st_id, slen);
1276 if (H5Aread (attr_id, st_id, path_tmp) < 0)
1290 H5Eset_auto (H5E_DEFAULT, err_func, err_func_data);
1292 H5Eset_auto (err_func, err_func_data);
1295 success = (success ?
set_fcn (octaveroot, fpath) : success);
1298 H5Tclose (type_hid);
1299 H5Sclose (space_hid);
1300 H5Gclose (group_hid);
1410 bool printed =
false;
1457 std::string tnm = nm;
1459 size_t len = nm.
length ();
1461 if (len == 3 && nm ==
".**")
1498 else if (nm[1] ==
'=')
1520 else if (nm ==
"**")
1585 if (local_funcs && fptr
1597 bool any_match = fptr != 0 || classes.size () > 0;
1603 any_match = classes.size () > 0;
1611 for (std::list<std::string>::iterator iter = classes.begin ();
1612 iter != classes.end (); iter++)
1614 std::string class_name = *iter;
1617 bool is_builtin =
false;
1624 fh->
set_overload (static_cast<builtin_type_t> (i), fmeth);
1633 error (
"@%s: no function and no method found", tnm.c_str ());
1673 DEFUN (functions, args, ,
1675 @deftypefn {Built-in Function} {@var{s} =} functions (@var{fcn_handle})\n\
1676 Return a structure containing information about the function handle\n\
1677 @var{fcn_handle}.\n\
1679 The structure @var{s} always contains these three fields:\n\
1683 The function name. For an anonymous function (no name) this will be the\n\
1684 actual function definition.\n\
1687 Type of the function.\n\
1691 The function is anonymous.\n\
1694 The function is private.\n\
1697 The function overloads an existing function.\n\
1700 The function is a built-in or m-file function.\n\
1702 @item subfunction\n\
1703 The function is a subfunction within an m-file.\n\
1707 The m-file that will be called to perform the function. This field is empty\n\
1708 for anonymous and built-in functions.\n\
1711 In addition, some function types may return more information in additional\n\
1714 @strong{Warning:} @code{functions} is provided for debugging purposes only.\n\
1715 It's behavior may change in the future and programs should not depend on a\n\
1716 particular output.\n\
1722 if (args.length () == 1)
1734 std::string fh_nm = fh->
fcn_name ();
1738 std::ostringstream buf;
1740 m.
setfield (
"function", buf.str ());
1750 m.
setfield (
"type",
"subfunction");
1752 parentage.
elem (0) = fh_nm;
1772 std::list<symbol_table::symbol_record>
vars
1775 size_t varlen = vars.size ();
1780 for (std::list<symbol_table::symbol_record>::const_iterator
1781 p = vars.begin (); p != vars.end (); p++)
1783 ws.
assign (p->name (), p->varval (0));
1800 error (
"functions: FCN_HANDLE is not a valid function handle object");
1803 error (
"functions: FCN_HANDLE argument must be a function handle object");
1811 DEFUN (func2str, args, ,
1813 @deftypefn {Built-in Function} {} func2str (@var{fcn_handle})\n\
1814 Return a string containing the name of the function referenced by the\n\
1815 function handle @var{fcn_handle}.\n\
1816 @seealso{str2func, functions}\n\
1821 if (args.length () == 1)
1827 std::string fh_nm = fh->
fcn_name ();
1831 std::ostringstream buf;
1835 retval = buf.str ();
1841 error (
"func2str: FCN_HANDLE must be a valid function handle");
1849 DEFUN (str2func, args, ,
1851 @deftypefn {Built-in Function} {} str2func (@var{fcn_name})\n\
1852 @deftypefnx {Built-in Function} {} str2func (@var{fcn_name}, \"global\")\n\
1853 Return a function handle constructed from the string @var{fcn_name}.\n\
1855 If the optional @qcode{\"global\"} argument is passed, locally visible\n\
1856 functions are ignored in the lookup.\n\
1857 @seealso{func2str, inline}\n\
1861 int nargin = args.
length ();
1863 if (nargin == 1 || nargin == 2)
1865 if (args(0).is_string ())
1867 std::string nm = args(0).string_value ();
1871 error (
"str2func: FCN_NAME must be a string");
1895 DEFUN (is_function_handle, args, ,
1897 @deftypefn {Built-in Function} {} is_function_handle (@var{x})\n\
1898 Return true if @var{x} is a function handle.\n\
1899 @seealso{isa, typeinfo, class, functions}\n\
1904 int nargin = args.
length ();
1929 const std::vector<int>& mask,
1932 arg_mask (mask), expected_nargin (exp_nargin)
1949 cmd_list = usr_fcn->
body ();
1953 body_expr = (cmd_list->
length () == 1
1965 std::list<tree_argument_list *> arg_lists = idx_expr->
arg_lists ();
1966 std::string type_tags = idx_expr->
type_tags ();
1968 if (type_tags.length () == 1 && type_tags[0] ==
'('
1971 assert (arg_lists.size () == 1);
1979 std::map<std::string, int> arginmap;
1985 it != param_list->
end (); ++it, ++npar)
1990 arginmap[id->
name ()] = npar;
1994 if (arg_list && arg_list->
length () > 0)
1997 int nargs = arg_list->
length ();
2005 it != arg_list->
end (); ++it, ++iarg)
2011 arg_mask[iarg] = -1;
2017 if (arginmap.find (elt_id->
name ()) != arginmap.end ())
2019 arg_mask[iarg] = arginmap[elt_id->
name ()];
2024 arg_mask[iarg] = -1;
2044 if (head_id->is_defined ())
2045 root_val = head_id->rvalue1 ();
2049 std::string head_name = head_id->name ();
2070 std::list<string_vector> arg_names = idx_expr->
arg_names ();
2071 assert (arg_names.size () == 1);
2097 const std::list<octave_lvalue>* lvalue_list)
std::string read_until_newline(std::istream &is, bool keep_newline)
static std::string system_path(void)
octave_value subsref(const std::string &type, const std::list< octave_value_list > &idx)
std::string find_first_of(const string_vector &names)
size_t length(void) const
static const std::string anonymous
bool is_equal_to(const octave_fcn_handle &) const
octave_function * load_fcn_from_file(const std::string &file_name, const std::string &dir_name, const std::string &dispatch_type, const std::string &package_name, const std::string &fcn_name, bool autoload)
virtual bool is_constant(void) const
tree_parameter_list * parameter_list(void)
octave_fcn_handle * fcn_handle_value(bool=false)
static octave_value find_method(const std::string &name, const std::string &dispatch_type)
OCTINTERP_API void print_usage(void)
bool is_function(void) const
void gripe_load(const char *type) const
void print_raw(std::ostream &os, bool pr_as_read_syntax=false) const
bool set_fcn(const std::string &octaveroot, const std::string &fpath)
octave_idx_type length(void) const
static std::list< symbol_record > all_variables(scope_id scope=xcurrent_scope, context_id context=xdefault_context, bool defined_only=true, unsigned int exclude=symbol_record::hidden)
bool out_of_date_check(octave_value &function, const std::string &dispatch_type, bool check_relative)
bool is_defined(void) const
static void set_scope(scope_id scope)
std::vector< int > arg_mask
FloatComplex(* fptr)(const FloatComplex &, float, int, octave_idx_type &)
#define DEFUN(name, args_name, nargout_name, doc)
void error(const char *fmt,...)
symbol_table::scope_id scope(void)
static string_vector names(const map_type &lst)
void setfield(const std::string &key, const octave_value &val)
static std::map< std::string, std::string > vars
static scope_id alloc_scope(void)
#define DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA(t, n, c)
void gripe_save(const char *type) const
void interpreter_try(unwind_protect &frame)
void skip_preceeding_newline(std::istream &is)
T & elem(octave_idx_type n)
octave_value_list eval_string(const std::string &eval_str, bool silent, int &parse_status, int nargout)
herr_t hdf5_read_next_data(hid_t group_id, const char *name, void *dv)
tree_expression * expression(void)
bool load_ascii(std::istream &is)
bool is_copy_of(const octave_value &val) const
octave_fcn_handle * fcn_handle_value(bool silent=false) const
static octave_fcn_handle * maybe_binder(const octave_value &f)
bool is_overloaded(void) const
bool save_binary(std::ostream &os, bool &save_as_floats)
void newline(std::ostream &os) const
static octave_value find_function(const std::string &name, const octave_value_list &args=octave_value_list(), bool local_funcs=true)
std::string type_tags(void)
std::list< string_vector > arg_names(void)
bool is_function_handle(void) const
static void cache_name(scope_id scope, const std::string &name)
tree_identifier * ident(void)
octave_value make_fcn_handle(const std::string &nm, bool local_funcs)
octave_fcn_binder(const octave_value &f, const octave_value &root, const octave_value_list &templ, const std::vector< int > &mask, int exp_nargin)
octave_value_list do_multi_index_op(int nargout, const octave_value_list &idx)
std::list< tree_decl_elt * >::iterator iterator
virtual bool is_classdef_constructor(const std::string &=std::string()) const
std::string extract_keyword(std::istream &is, const char *keyword, const bool next_only)
void swap_bytes< 4 >(void *ptr)
std::list< tree_argument_list * > arg_lists(void)
F77_RET_T const double const double * f
void add_fcn(void(*fcn)(void))
bool save_ascii(std::ostream &os)
std::string name(void) const
static std::string make_absolute(const std::string &s, const std::string &dot_path=get_current_directory())
std::string btyp_class_name[btyp_num_types]
bool add_hdf5_data(hid_t loc_id, const octave_value &tc, const std::string &name, const std::string &doc, bool mark_as_global, bool save_as_floats)
bool save_ascii_data(std::ostream &os, const octave_value &val_arg, const std::string &name, bool mark_as_global, int precision)
octave_user_function * user_function_value(bool silent=false) const
virtual bool is_index_expression(void) const
bool save_hdf5(octave_hdf5_id loc_id, const char *name, bool save_as_floats)
octave_value_list arg_template
#define panic_impossible()
octave_value builtin_overloads[btyp_num_types]
virtual bool is_black_hole(void)
bool is_private_function(void) const
static fcn_info::dispatch_map_type get_dispatch(const std::string &name)
static void assign(const std::string &name, const octave_value &value=octave_value(), scope_id scope=xcurrent_scope, context_id context=xdefault_context, bool force_add=false)
std::string read_binary_data(std::istream &is, bool swap, oct_mach_info::float_format fmt, const std::string &filename, bool &global, octave_value &tc, std::string &doc)
virtual bool is_user_script(void) const
static void push(octave_function *f, symbol_table::scope_id scope=symbol_table::current_scope(), symbol_table::context_id context=symbol_table::current_context())
octave_idx_type length(void) const
virtual bool is_user_function(void) const
static std::list< std::string > parent_classes(const std::string &dispatch_type)
virtual Matrix size(void)
friend octave_value make_fcn_handle(const std::string &, bool)
bool load_binary(std::istream &is, bool swap, oct_mach_info::float_format fmt)
friend class octave_value
bool takes_varargs(void) const
octave_function * function_value(bool silent=false) const
octave_value rvalue1(int nargout=1)
virtual std::string parent_fcn_name(void) const
static std::string dir_sep_chars(void)
virtual octave_value rvalue1(int nargout=1)
virtual std::string fcn_file_name(void) const
static std::list< std::string > overloads(const std::string &meth)
octave_value_list do_multi_index_op(int nargout, const octave_value_list &args)
virtual bool is_subfunction(void) const
bool save_binary_data(std::ostream &os, const octave_value &tc, const std::string &name, const std::string &doc, bool mark_as_global, bool save_as_floats)
#define OCTAVE_EXEC_PREFIX
int current_print_indent_level(void) const
void assign(const std::string &k, const octave_value &val)
tree_expression * expression(void)
octave_value_list do_multi_index_op(int nargout, const octave_value_list &args)
OCTAVE_EMPTY_CPP_ARG std::string type_name(void) const
void octave_print_internal(std::ostream &, char, bool)
std::string get_dispatch_type(const octave_value_list &args, builtin_type_t &builtin_type)
#define OCTAVE_LOCAL_BUFFER(T, buf, size)
bool is_undefined(void) const
virtual bool is_class_constructor(const std::string &=std::string()) const
void set_overload(builtin_type_t btyp, const octave_value &ov_fcn)
void print_fcn_handle_body(tree_statement_list *)
tree_statement_list * body(void)
void print(std::ostream &os, bool pr_as_read_syntax=false)
void accept(tree_walker &tw)
bool load_hdf5(octave_hdf5_id loc_id, const char *name)
virtual bool is_identifier(void) const
octave_function * function_value(bool=false)
return octave_value(v1.char_array_value().concat(v2.char_array_value(), ra_idx),((a1.is_sq_string()||a2.is_sq_string())? '\'': '"'))
static void erase_scope(scope_id scope)
std::string fcn_name(void) const
std::string read_ascii_data(std::istream &is, const std::string &filename, bool &global, octave_value &tc, octave_idx_type count)
bool is_nested_function(void) const
void stash_name_tags(const string_vector &nm)
octave_user_function * user_function_value(bool=false)