23 #if ! defined (octave_hook_fcn_h) 24 #define octave_hook_fcn_h 1 26 #include "octave-config.h" 128 if (data.is_defined ())
151 : ident (), valid (
false), fcn_handle (fh_arg), data (
d)
159 std::ostringstream buf;
161 ident = fh->
fcn_name () +
':' + buf.str ();
169 if (data.is_defined ())
195 typedef std::map<std::string, hook_function>
map_type;
205 : fcn_map (lst.fcn_map)
216 bool empty (
void)
const {
return fcn_map.empty (); }
218 void clear (
void) { fcn_map.clear (); }
227 return fcn_map.find (
id);
232 return fcn_map.find (
id);
245 while (
p != fcn_map.end ())
253 hook_fcn.
eval (initial_args);
OCTINTERP_API octave_value_list feval(const std::string &name, const octave_value_list &args=octave_value_list(), int nargout=0)
void eval(const octave_value_list &initial_args)
void eval(const octave_value_list &initial_args)
std::map< std::string, hook_function > map_type
octave_fcn_handle * fcn_handle_value(bool=false)
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
octave_value_list & append(const octave_value &val)
const_iterator find(const std::string &id) const
virtual void eval(const octave_value_list &)
iterator find(const std::string &id)
map_type::const_iterator const_iterator
named_hook_function(const std::string &n, const octave_value &d)
fcn_handle_hook_function(const octave_value &fh_arg, const octave_value &d)
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 F77_DBLE * d
void insert(const std::string &id, const hook_function &f)
nd deftypefn *std::string name
std::string fcn_name(void) const
const_iterator end(void) const
virtual bool is_valid(void)
virtual std::string id(void)
hook_function & operator=(const hook_function &hf)
hook_function_list(const hook_function_list &lst)
base_hook_function(const base_hook_function &)
hook_function(const hook_function &hf)
octave_function * is_valid_function(const std::string &fcn_name, const std::string &warn_for, bool warn)
void eval(const octave_value_list &initial_args)
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
void run(const octave_value_list &initial_args=octave_value_list())
map_type::iterator iterator