ardour
Public Member Functions | Protected Attributes | List of all members
MementoCommand< obj_T > Class Template Reference

#include <memento_command.h>

Inheritance diagram for MementoCommand< obj_T >:
Command PBD::StatefulDestructible PBD::ScopedConnectionList PBD::Stateful PBD::Destructible

Public Member Functions

 MementoCommand (obj_T &a_object, XMLNode *a_before, XMLNode *a_after)
 
 MementoCommand (MementoCommandBinder< obj_T > *b, XMLNode *a_before, XMLNode *a_after)
 
 ~MementoCommand ()
 
void binder_dying ()
 
void operator() ()
 
void undo ()
 
virtual XMLNodeget_state ()
 
- Public Member Functions inherited from Command
virtual ~Command ()
 
void set_name (const std::string &str)
 
const std::string & name () const
 
virtual void redo ()
 
virtual int set_state (const XMLNode &, int)
 
virtual bool empty () const
 
- Public Member Functions inherited from PBD::Stateful
 Stateful ()
 
virtual ~Stateful ()
 
virtual bool apply_changes (PropertyBase const &)
 
PropertyChange apply_changes (PropertyList const &)
 
const OwnedPropertyListproperties () const
 
void add_property (PropertyBase &s)
 
void add_extra_xml (XMLNode &)
 
XMLNodeextra_xml (const std::string &str, bool add_if_missing=false)
 
void save_extra_xml (const XMLNode &)
 
const PBD::IDid () const
 
bool set_id (const XMLNode &)
 
void set_id (const std::string &)
 
void reset_id ()
 
void clear_changes ()
 
virtual void clear_owned_changes ()
 
PropertyListget_changes_as_properties (Command *) const
 
virtual void rdiff (std::vector< Command * > &) const
 
bool changed () const
 
virtual PropertyListproperty_factory (const XMLNode &) const
 
virtual void suspend_property_changes ()
 
virtual void resume_property_changes ()
 
bool property_changes_suspended () const
 
- Public Member Functions inherited from PBD::Destructible
 Destructible ()
 
virtual ~Destructible ()
 
void drop_references ()
 
- Public Member Functions inherited from PBD::ScopedConnectionList
 ScopedConnectionList ()
 
virtual ~ScopedConnectionList ()
 
void add_connection (const UnscopedConnection &c)
 
void drop_connections ()
 

Protected Attributes

MementoCommandBinder< obj_T > * _binder
 
XMLNodebefore
 
XMLNodeafter
 
PBD::ScopedConnection _binder_death_connection
 
- Protected Attributes inherited from Command
std::string _name
 
- Protected Attributes inherited from PBD::Stateful
XMLNode_extra_xml
 
XMLNode_instant_xml
 
PBD::PropertyChange _pending_changed
 
Glib::Threads::Mutex _lock
 
std::string _xml_node_name
 name of node to use for this object in XML More...
 
OwnedPropertyList_properties
 

Additional Inherited Members

- Public Attributes inherited from PBD::Stateful
PBD::Signal1< void, const
PropertyChange & > 
PropertyChanged
 
- Public Attributes inherited from PBD::Destructible
PBD::Signal0< void > Destroyed
 
PBD::Signal0< void > DropReferences
 
- Static Public Attributes inherited from PBD::Stateful
static int current_state_version = 0
 
static int loading_state_version = 0
 
- Protected Member Functions inherited from Command
 Command ()
 
 Command (const std::string &name)
 
- Protected Member Functions inherited from PBD::Stateful
void add_instant_xml (XMLNode &, const std::string &directory_path)
 
XMLNodeinstant_xml (const std::string &str, const std::string &directory_path)
 
void add_properties (XMLNode &)
 
PropertyChange set_values (XMLNode const &)
 
virtual void post_set (const PropertyChange &)
 
virtual void send_change (const PropertyChange &)
 
virtual void mid_thaw (const PropertyChange &)
 

Detailed Description

template<class obj_T>
class MementoCommand< obj_T >

This command class is initialized with before and after mementos (from Stateful::get_state()), so undo becomes restoring the before memento, and redo is restoring the after memento.

Definition at line 103 of file memento_command.h.

Constructor & Destructor Documentation

template<class obj_T>
MementoCommand< obj_T >::MementoCommand ( obj_T &  a_object,
XMLNode a_before,
XMLNode a_after 
)
inline

Definition at line 106 of file memento_command.h.

template<class obj_T>
MementoCommand< obj_T >::MementoCommand ( MementoCommandBinder< obj_T > *  b,
XMLNode a_before,
XMLNode a_after 
)
inline

Definition at line 113 of file memento_command.h.

template<class obj_T>
MementoCommand< obj_T >::~MementoCommand ( )
inline

Definition at line 120 of file memento_command.h.

Member Function Documentation

template<class obj_T>
void MementoCommand< obj_T >::binder_dying ( )
inline

Definition at line 127 of file memento_command.h.

template<class obj_T>
virtual XMLNode& MementoCommand< obj_T >::get_state ( void  )
inlinevirtual

Reimplemented from Command.

Definition at line 143 of file memento_command.h.

template<class obj_T>
void MementoCommand< obj_T >::operator() ( )
inlinevirtual

Implements Command.

Definition at line 131 of file memento_command.h.

template<class obj_T>
void MementoCommand< obj_T >::undo ( )
inlinevirtual

Implements Command.

Definition at line 137 of file memento_command.h.

Member Data Documentation

template<class obj_T>
MementoCommandBinder<obj_T>* MementoCommand< obj_T >::_binder
protected

Definition at line 170 of file memento_command.h.

template<class obj_T>
PBD::ScopedConnection MementoCommand< obj_T >::_binder_death_connection
protected

Definition at line 173 of file memento_command.h.

template<class obj_T>
XMLNode* MementoCommand< obj_T >::after
protected

Definition at line 172 of file memento_command.h.

template<class obj_T>
XMLNode* MementoCommand< obj_T >::before
protected

Definition at line 171 of file memento_command.h.


The documentation for this class was generated from the following file: