19 #ifndef __lib_pbd_functor_command_h__
20 #define __lib_pbd_functor_command_h__
29 #include "pbd/shiva.h"
38 template <
class obj_type,
class arg_type>
43 typedef std::map< std::string, functor_type >
FunctorMap;
47 FunctorCommand(std::string functor, obj_type&
object, arg_type b, arg_type a)
56 new PBD::Shiva< obj_type, FunctorCommand<obj_type, arg_type> > (
object, *
this);
75 node->add_property(
"type_name",
typeid(obj_type).
name());
78 node->add_property(
"before", ss.str());
81 node->add_property(
"after", ss.str());
111 template <
class obj_type,
class arg_type>
const std::string & name() const
static void register_functor(std::string name, functor_type f)
virtual XMLNode & get_state()
static FunctorMap functor_map
static functor_type find_functor(std::string name)
FunctorMap::iterator FunctorMapIterator
std::map< std::string, functor_type > FunctorMap
void(obj_type::* functor_type)(arg_type)
FunctorCommand(std::string functor, obj_type &object, arg_type b, arg_type a)