summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2016-04-10 17:13:00 +0200
committerRobin Gareus <robin@gareus.org>2016-04-10 17:13:00 +0200
commitde23c3d3aec7b6940cf60b85eb14920e17e5151d (patch)
tree449eb0e1a33f547f8d1195eb380a0bb7403cc657 /libs
parentfcb9092e2cfb00f2ee9a20001b73d74718dc6be9 (diff)
add a C++ lifetime MementoCommand API
Diffstat (limited to 'libs')
-rw-r--r--libs/ardour/ardour/automation_list.h2
-rw-r--r--libs/ardour/automation_list.cc7
2 files changed, 9 insertions, 0 deletions
diff --git a/libs/ardour/ardour/automation_list.h b/libs/ardour/ardour/automation_list.h
index 37a30acd03..f317820b7f 100644
--- a/libs/ardour/ardour/automation_list.h
+++ b/libs/ardour/ardour/automation_list.h
@@ -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; }
diff --git a/libs/ardour/automation_list.cc b/libs/ardour/automation_list.cc
index bc8ca8e642..636a1bbede 100644
--- a/libs/ardour/automation_list.cc
+++ b/libs/ardour/automation_list.cc
@@ -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 ()
{