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 ())
172 fcn_handle.do_multi_index_op (0, args);
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);
235 iterator
end (
void) {
return fcn_map.end (); }
237 const_iterator
end (
void)
const {
return fcn_map.end (); }
239 void erase (iterator
p) { fcn_map.erase (p); }
243 iterator
p = fcn_map.begin ();
245 while (p != fcn_map.end ())
253 hook_fcn.
eval (initial_args);
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 F77_REAL &F77_RET_T F77_DBLE &F77_RET_T F77_REAL &F77_RET_T F77_DBLE &F77_RET_T F77_REAL &F77_RET_T F77_DBLE &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 F77_REAL &F77_RET_T F77_DBLE &F77_RET_T F77_DBLE &F77_RET_T F77_REAL &F77_RET_T F77_REAL &F77_RET_T F77_DBLE &F77_RET_T const F77_DBLE F77_DBLE &F77_RET_T const F77_REAL F77_REAL &F77_RET_T F77_REAL F77_REAL &F77_RET_T F77_DBLE F77_DBLE &F77_RET_T const F77_DBLE const F77_DBLE * f
const_iterator find(const std::string &id) const
octave_value_list & append(const octave_value &val)
virtual ~base_hook_function(void)
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 F77_REAL &F77_RET_T F77_DBLE &F77_RET_T F77_REAL &F77_RET_T F77_DBLE &F77_RET_T F77_REAL &F77_RET_T F77_DBLE &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 F77_REAL &F77_RET_T F77_DBLE &F77_RET_T F77_DBLE &F77_RET_T F77_REAL &F77_RET_T F77_REAL &F77_RET_T F77_DBLE &F77_RET_T const F77_DBLE F77_DBLE &F77_RET_T const F77_REAL F77_REAL &F77_RET_T F77_REAL F77_REAL &F77_RET_T F77_DBLE F77_DBLE &F77_RET_T const F77_DBLE const F77_DBLE F77_DBLE * d
~hook_function_list(void)
void insert(const std::string &id, const hook_function &f)
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
std::string fcn_name(void) const