24 #if defined (HAVE_CONFIG_H) 64 size_t pos =
name.rfind (
'.');
69 if (pos != std::string::npos)
141 bool clear_breakpoints =
false;
146 bool is_same_file =
false;
157 && (
nm.substr (nm_len-4) ==
".oct" 158 ||
nm.substr (nm_len-4) ==
".mex"))
160 &&
nm.substr (nm_len-2) ==
".m")))
168 if (! dispatch_type.empty ())
183 const std::list<std::string>& plist
186 std::list<std::string>::const_iterator it
189 while (it != plist.end ())
234 clear_breakpoints =
true;
236 else if (is_same_file)
260 clear_breakpoints =
true;
267 clear_breakpoints =
true;
277 dispatch_type, pack);
279 clear_breakpoints =
true;
284 if (clear_breakpoints)
352 const std::set<std::string>& inferior_classes =
p->second;
353 std::set<std::string>::const_iterator q = inferior_classes.find (
b);
354 return (q != inferior_classes.end ());
359 bool skip_variables,
bool local_funcs)
372 return p->second.builtin_find ();
395 return p->second.find (args, local_funcs);
417 if (!
name.empty () &&
name[0] ==
'@')
425 if (pos != std::string::npos)
432 size_t pos =
name.find_first_of (
'>');
434 if (pos == std::string::npos)
473 size_t pos = full_name.find_first_of (
'>');
475 if (pos != std::string::npos)
502 template <
template <
typename,
typename...>
class C,
typename V,
507 if (container_map.empty ())
510 std::map<std::string, octave_value> info_map;
512 for (
const auto& nm_container : container_map)
515 const C<
V,
A...>& container = nm_container.second;
516 info_map[
nm] =
Cell (container);
525 std::map<std::string, octave_value> m
549 std::map<std::string, octave_value> info_map;
554 const fcn_info& finfo = nm_finfo.second;
555 info_map[
nm] = finfo.
dump ();
581 int nargin = args.length ();
608 std::string sval = args(0).xstring_value (
"ignore_function_time_stamp: first argument must be a string");
612 else if (sval ==
"system")
614 else if (sval ==
"none")
617 error (R
"(ignore_function_time_stamp: argument must be one of "all", "system", or "none")"); 641 DEFMETHOD (__current_scope__, interp, , ,
657 DEFMETHOD (__dump_symtab_info__, interp, args, ,
665 int nargin = args.length ();
673 return symtab.
dump ();
676 std::string fname = args(0).xstring_value (
"__dump_symtab_info__: argument must be a function name");
681 return finfo->
dump ();
687 DEFMETHOD (__get_cmdline_fcn_txt__, interp, args, ,
693 if (args.length () != 1)
696 std::string name = args(0).xstring_value (
"__get_cmd_line_function_text__: first argument must be function name");
708 std::ostringstream buf;
virtual octave::symbol_scope scope(void)
octave_value find_function(const std::string &name, const octave_value_list &args=octave_value_list(), bool local_funcs=true)
F77_RET_T const F77_INT const F77_INT const F77_INT const F77_DBLE const F77_DBLE F77_INT F77_DBLE * V
For example cd octave end example noindent changes the current working directory to file
virtual octave::sys::time time_parsed(void) const
bool same_file(const std::string &f, const std::string &g)
symbol_record::context_id current_context(void) const
#define DEFMETHOD(name, interp_name, args_name, nargout_name, doc)
Macro to define a builtin method.
static void split_name_with_package(const std::string &name, std::string &fname, std::string &pname)
OCTINTERP_API void print_usage(void)
octave_value fcn_table_find(const std::string &name, const octave_value_list &args=octave_value_list(), bool local_funcs=true)
F77_RET_T const F77_REAL const F77_REAL F77_REAL &F77_RET_T const F77_DBLE const F77_DBLE F77_DBLE &F77_RET_T const F77_DBLE F77_DBLE &F77_RET_T const F77_REAL F77_REAL &F77_RET_T const F77_DBLE const F77_DBLE * f
symbol_scope current_scope(void)
bool is_relative(void) const
std::map< std::string, fcn_info >::iterator fcn_table_iterator
octave_value dump_fcn_table_map(void) const
OCTINTERP_API octave_value 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=false)
#define DEFUN(name, args_name, nargout_name, doc)
Macro to define a builtin function.
void error(const char *fmt,...)
void clear_all(bool force=false)
bool is_superiorto(const std::string &a, const std::string &b)
std::map< std::string, std::set< std::string > >::const_iterator class_precedence_table_const_iterator
void clear_variable(const std::string &name)
bool is_defined(void) const
OCTINTERP_API std::string lookup_autoload(const std::string &nm)
void clear_global_pattern(const std::string &pattern)
std::string find_method(const std::string &class_name, const std::string &meth, std::string &dir_name, const std::string &pack_name="")
virtual std::string fcn_file_name(void) const
std::string dir_sep_str(void)
std::list< std::string > parent_classes(const std::string &dispatch_type)
static octave_value dump_container_map(const std::map< std::string, C< V, A... >> &container_map)
bool is_defined(void) const
static bool load_out_of_date_fcn(const std::string &ff, const std::string &dir_name, octave_value &function, const std::string &dispatch_type="", const std::string &package_name="")
calling an anonymous function involves an overhead quite comparable to the overhead of an m file function Passing a handle to a built in function is because the interpreter is not involved in the internal loop For a
std::map< std::string, std::list< std::string > > m_parent_map
symbol_table & __get_symbol_table__(const std::string &who)
nd deftypefn *std::string name
OCTAVE_EXPORT octave_value_list isdir nd deftypefn *std::string nm
F77_RET_T const F77_INT F77_CMPLX * A
OCTAVE_EXPORT octave_value_list return the number of command line arguments passed to Octave If called with the optional argument the function xample nargout(@histc)
std::string find_fcn(const std::string &fcn, std::string &dir_name, const std::string &pack_name="")
std::map< std::string, std::set< std::string > > m_class_precedence_table
bool set_class_relationship(const std::string &sup_class, const std::string &inf_class)
virtual bool is_subfunction(void) const
intmap remove_all_breakpoints_in_file(const std::string &fname, bool silent=false)
static int Vignore_function_time_stamp
octave_value dump(void) const
static bool absolute_pathname(const std::string &s)
octave_function * function_value(bool silent=false) const
octave_user_function * user_function_value(bool silent=false) const
octave_value find_method(const std::string &name, const std::string &dispatch_type)
virtual octave::sys::time time_checked(void) const
time_t unix_time(void) const
symbol_scope m_global_scope
is longer than or if then or only for unique occurrences of the complete pattern(false). The default is true. If a cell array of strings ar
octave_value find(const std::string &name, const octave_value_list &args=octave_value_list(), bool skip_variables=false, bool local_funcs=true)
load_path & __get_load_path__(const std::string &who)
octave::sys::time Vlast_chdir_time
std::string canonical_name(void) const
virtual bool is_system_fcn_file(void) const
std::string package_name(void) const
return octave_value(v1.char_array_value() . concat(v2.char_array_value(), ra_idx),((a1.is_sq_string()||a2.is_sq_string()) ? '\'' :'"'))
fcn_info * get_fcn_info(const std::string &name)
std::map< std::string, fcn_info > m_fcn_table
virtual void mark_fcn_file_up_to_date(const octave::sys::time &)
OCTAVE_EXPORT octave_value_list isa nd deftypefn *return ovl(args(0).isinteger())
bp_table & __get_bp_table__(const std::string &who)
octave_value find(const octave_value_list &args=octave_value_list(), bool local_funcs=true)
bool out_of_date_check(octave_value &function, const std::string &dispatch_type, bool check_relative)
octave_idx_type length(void) const
symbol_scope m_current_scope
octave_value builtin_find(const std::string &name)
octave::sys::file_stat fs(filename)
octave_value dump(void) const
void clear_global(const std::string &name)
virtual octave_function * function_value(bool silent=false)
octave_value find_cmdline_function(const std::string &name)
std::string name(void) const
std::string name(void) const
If this string is the system will ring the terminal sometimes it is useful to be able to print the original representation of the string
octave_value find(const std::string &name, const octave_value_list &args, bool skip_variables, bool local_funcs)
octave_value find_submethod(const std::string &name, const std::string &dispatch_type)
bool is_newer(const sys::time &time) const
octave_value builtin_find(void)
void clear_variable_pattern(const std::string &pat)