13
0

add a C++ lifetime MementoCommand API

This commit is contained in:
Robin Gareus 2016-04-10 17:13:00 +02:00
parent fcb9092e2c
commit de23c3d3ae
2 changed files with 9 additions and 0 deletions

View File

@ -111,6 +111,8 @@ class LIBARDOUR_API AutomationList : public PBD::StatefulDestructible, public Ev
XMLNode& state (bool full);
XMLNode& serialize_events ();
Command* memento_command (XMLNode* before, XMLNode* after);
bool operator!= (const AutomationList &) const;
XMLNode* before () { return _before; }

View File

@ -27,6 +27,7 @@
#include "ardour/event_type_map.h"
#include "ardour/parameter_descriptor.h"
#include "evoral/Curve.hpp"
#include "pbd/memento_command.h"
#include "pbd/stacktrace.h"
#include "pbd/enumwriter.h"
@ -278,6 +279,12 @@ AutomationList::thaw ()
}
}
Command*
AutomationList::memento_command (XMLNode* before, XMLNode* after)
{
return new MementoCommand<AutomationList> (*this, before, after);
}
XMLNode&
AutomationList::get_state ()
{