32 #include <sigc++/slot.h>
53 template <
class obj_T>
68 template <
class obj_T>
78 void set_state (
XMLNode const & node ,
int version)
const { _object.set_state (node, version); }
102 template <
class obj_T>
114 : _binder (b), before (a_before), after (a_after)
133 _binder->set_state(*after, Stateful::current_state_version);
139 _binder->set_state(*before, Stateful::current_state_version);
145 if (before && after) {
146 name =
"MementoCommand";
148 name =
"MementoUndoCommand";
150 name =
"MementoRedoCommand";
154 _binder->add_state (node);
156 node->
set_property (
"type-name", _binder->type_name ());
virtual void add_state(XMLNode *)=0
virtual void set_state(XMLNode const &, int version) const =0
virtual std::string type_name() const =0
virtual XMLNode & get_state() const =0
MementoCommand(MementoCommandBinder< obj_T > *b, XMLNode *a_before, XMLNode *a_after)
virtual XMLNode & get_state() const
PBD::ScopedConnection _binder_death_connection
MementoCommandBinder< obj_T > * _binder
MementoCommand(obj_T &a_object, XMLNode *a_before, XMLNode *a_after)
virtual void drop_references()
std::string type_name() const
SimpleMementoCommandBinder(obj_T &o)
void add_state(XMLNode *node)
void set_state(XMLNode const &node, int version) const
XMLNode & get_state() const
PBD::ScopedConnection _object_death_connection
bool set_property(const char *name, const std::string &value)
XMLNode * add_child_copy(const XMLNode &)
GtkImageIconNameData name
#define LIBPBD_TEMPLATE_API
std::string demangled_name(T const &obj)