summaryrefslogtreecommitdiff
path: root/gtk2_ardour/processor_selection.h
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2007-08-01 22:18:46 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2007-08-01 22:18:46 +0000
commit6698f5f686bef82b0c9568558c83a3b9b3344700 (patch)
treeb955303ea57c1105183bed2891533b06aebb8c24 /gtk2_ardour/processor_selection.h
parent4d1542d1e59737fb3f6464ebb5638ca64cb985e8 (diff)
use XML state to store processors in mixer (strips) and fixup crash caused by missing AutomationController for integer LADSPA plugin params
git-svn-id: svn://localhost/ardour2/trunk@2215 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/processor_selection.h')
-rw-r--r--gtk2_ardour/processor_selection.h43
1 files changed, 35 insertions, 8 deletions
diff --git a/gtk2_ardour/processor_selection.h b/gtk2_ardour/processor_selection.h
index e9abcea2dc..59354c05ac 100644
--- a/gtk2_ardour/processor_selection.h
+++ b/gtk2_ardour/processor_selection.h
@@ -20,13 +20,40 @@
#ifndef __ardour_gtk_processor_selection_h__
#define __ardour_gtk_processor_selection_h__
-#include <list>
-#include <boost/shared_ptr.hpp>
-
-namespace ARDOUR {
- class Processor;
-}
-
-struct ProcessorSelection : list<boost::shared_ptr<ARDOUR::Processor> > {};
+#include <pbd/xml++.h>
+
+class ProcessorSelection {
+ public:
+ ProcessorSelection() : node (0) {}
+ ~ProcessorSelection() { if (node) { delete node; } }
+
+ void set (XMLNode* n) {
+ if (node) {
+ delete node;
+ }
+ node = n;
+ }
+
+ void add (XMLNode* newchild) {
+ if (!node) {
+ node = new XMLNode ("add");
+ }
+ node->add_child_nocopy (*newchild);
+ }
+
+ void clear () {
+ if (node) {
+ delete node;
+ node = 0;
+ }
+ }
+
+ bool empty () const { return node == 0 || node->children().empty(); }
+
+ const XMLNode& get_node() const { return *node; }
+
+ private:
+ XMLNode* node;
+};
#endif /* __ardour_gtk_processor_selection_h__ */