24 #if !defined (octave_action_container_h)
25 #define octave_action_container_h 1
45 virtual void run (
void) { }
68 void run (
void) { e_fptr (); }
71 void (*e_fptr) (void);
82 : e_fcn (fcn), e_arg (arg) { }
84 void run (
void) { e_fcn (e_arg); }
107 : e_fcn (fcn), e_arg (arg) { }
109 void run (
void) { e_fcn (e_arg); }
112 void (*e_fcn) (
const T&);
123 : e_obj (obj), e_method (method) { }
125 void run (
void) { (e_obj->*e_method) (); }
130 void (T::*e_method) (void);
141 template <
class T,
class A>
146 : e_obj (obj), e_method (method), e_arg (arg) { }
148 void run (
void) { (e_obj->*e_method) (e_arg); }
153 void (T::*e_method) (
A);
165 template <
class T,
class A>
170 : e_obj (obj), e_method (method), e_arg (arg) { }
172 void run (
void) { (e_obj->*e_method) (e_arg); }
177 void (T::*e_method) (
const A&);
194 : e_ptr (&ref), e_val (val) { }
196 void run (
void) { *e_ptr = e_val; }
218 void run (
void) {
delete e_ptr; }
235 virtual void add (
elem *new_elem) = 0;
252 void add_fcn (
void (*action) (
const T&),
const T& val)
265 template <
class T,
class A>
272 template <
class T,
class A>
300 operator bool (
void)
const {
return ! empty (); }
302 virtual void run_first (
void) = 0;
309 for (
size_t i = 0; i < num; i++)
315 virtual void discard_first (
void) = 0;
322 for (
size_t i = 0; i < num; i++)
328 virtual size_t size (
void)
const = 0;
elem & operator=(const elem &)
void add_method(T *obj, void(T::*method)(const A &), const A &arg)
F77_RET_T const octave_idx_type Complex * A
FloatComplex(* fptr)(const FloatComplex &, float, int, octave_idx_type &)
fcn_arg_elem(void(*fcn)(T), T arg)
void add_fcn(void(*action)(const T &), const T &val)
void add_method(T *obj, void(T::*method)(void))
fcn_elem(void(*fptr)(void))
void add_fcn(void(*fcn)(void))
restore_var_elem(T &ref, const T &val)
size_t size(T const (&)[z])
fcn_crefarg_elem(void(*fcn)(const T &), const T &arg)
virtual ~action_container(void)
method_arg_elem(T *obj, void(T::*method)(A), A arg)
void add_method(T *obj, void(T::*method)(A), A arg)
method_crefarg_elem(T *obj, void(T::*method)(const A &), const A &arg)
void protect_var(T &var, const T &val)
void add_fcn(void(*action)(T), T val)
method_elem(T *obj, void(T::*method)(void))