#ifndef ACTION_H #define ACTION_H #include "Action_base.h" template class Action: public Action_base{ public: Action(T *o, void(T::*f)()); void perform(); private: T *obj; void (T::*funk)(); }; template Action::Action(T *o, void(T::*f)()):obj(o), funk(f){ } template void Action::perform(){ (obj->*funk)(); } template Ptr > mk_action(T *o, void(T::*f)()){ return Ptr >(new Action(o, f)); } #endif