26 #if ! defined (octave_fcn_info_h)
27 #define octave_fcn_info_h 1
29 #include "octave-config.h"
46 typedef std::map<std::string, octave_value>::const_iterator
62 size_t pos =
name.rfind (
'.');
64 if (pos != std::string::npos)
114 return find (search_scope, args);
123 const std::string& file_name)
140 template <
typename T>
142 clear_map (std::map<T, octave_value>& map,
bool force =
false)
144 auto p = map.begin ();
146 while (p != map.end ())
148 if (force || ! p->second.islocked ())
182 package = octave_value ();
255 return m_rep->find (search_scope, args);
261 return m_rep->builtin_find (search_scope);
266 return m_rep->find_scoped_function (search_scope);
271 return m_rep->find_private_function (dir_name);
276 return m_rep->find_method (dispatch_type);
281 return m_rep->built_in_function;
286 return m_rep->cmdline_function;
291 return m_rep->find_autoload ();
297 return m_rep->find_user_function ();
302 return m_rep->is_user_function_defined ();
309 return m_rep->find_function (search_scope, args);
314 m_rep->install_cmdline_function (
f);
318 const std::string& file_name)
320 m_rep->install_local_function (
f, file_name);
325 m_rep->install_user_function (
f);
330 m_rep->install_built_in_function (
f);
335 m_rep->install_built_in_dispatch (klass);
342 m_rep->clear_user_function (force);
347 m_rep->clear_autoload_function (force);
356 std::shared_ptr<fcn_info_rep>
m_rep;
359 extern OCTINTERP_API std::string
362 extern OCTINTERP_API std::string
void install_built_in_function(const octave_value &f)
octave_value function_on_path
octave_value load_private_function(const std::string &dir_name)
std::map< std::string, octave_value > local_functions
octave_value x_builtin_find(const symbol_scope &search_scope)
fcn_info_rep(const std::string &nm)
std::map< std::string, octave_value > class_constructors
bool is_user_function_defined(void) const
std::map< std::string, octave_value > class_methods
octave_value load_class_method(const std::string &dispatch_type)
std::string full_name(void) const
octave_value find_autoload(void)
~fcn_info_rep(void)=default
octave_value cmdline_function
octave_value autoload_function
void clear(bool force=false)
fcn_info_rep(const fcn_info_rep &)=delete
void install_local_function(const octave_value &f, const std::string &file_name)
void install_cmdline_function(const octave_value &f)
void clear_mex_function(void)
octave_value find_scoped_function(const symbol_scope &search_scope)
void install_user_function(const octave_value &f)
octave_value dump(void) const
octave_value find_function(const symbol_scope &search_scope, const octave_value_list &args)
fcn_info_rep & operator=(const fcn_info_rep &)=delete
octave_value builtin_find(const symbol_scope &search_scope)
void install_built_in_dispatch(const std::string &klass)
octave_value find_private_function(const std::string &dir_name)
octave_value install_local_function(const std::string &file_name)
octave_value find_package(void)
octave_value find_user_function(void)
octave_value load_class_constructor(void)
octave_value find(const symbol_scope &search_scope, const octave_value_list &args)
void clear_map(std::map< T, octave_value > &map, bool force=false)
void clear_user_function(bool force=false)
octave_value built_in_function
std::map< std::string, octave_value > private_functions
octave_value xfind(const symbol_scope &search_scope, const octave_value_list &args)
octave_value find_method(const std::string &dispatch_type)
void clear_autoload_function(bool force=false)
bool is_user_function_defined(void) const
void install_local_function(const octave_value &f, const std::string &file_name)
octave_value find_function(const symbol_scope &search_scope, const octave_value_list &args=octave_value_list())
void clear_user_function(bool force=false)
octave_value dump(void) const
void clear_autoload_function(bool force=false)
octave_value find(const symbol_scope &search_scope, const octave_value_list &args=octave_value_list())
octave_value find_built_in_function(void) const
octave_value builtin_find(const symbol_scope &search_scope)
std::map< std::string, octave_value >::iterator str_val_iterator
void clear(bool force=false)
octave_value find_user_function(void)
void clear_mex_function(void)
fcn_info(const std::string &nm="")
void install_built_in_dispatch(const std::string &klass)
octave_value find_private_function(const std::string &dir_name) const
void install_user_function(const octave_value &f)
void install_built_in_function(const octave_value &f)
octave_value find_cmdline_function(void) const
std::shared_ptr< fcn_info_rep > m_rep
fcn_info(const fcn_info &)=default
octave_value find_autoload(void)
octave_value find_scoped_function(const symbol_scope &search_scope) const
std::map< std::string, octave_value >::const_iterator str_val_const_iterator
octave_value find_method(const std::string &dispatch_type) const
void install_cmdline_function(const octave_value &f)
bool is_defined(void) const
bool islocked(void) const
bool is_mex_function(void) const
static double f(double k, double l_nu, double c_pm)
std::string get_dispatch_type(const octave_value_list &args, builtin_type_t &builtin_type)
octave_value dump_function_map(const std::map< std::string, octave_value > &fcn_map)
return octave_value(v1.char_array_value() . concat(v2.char_array_value(), ra_idx),((a1.is_sq_string()||a2.is_sq_string()) ? '\'' :'"'))