summaryrefslogtreecommitdiff
path: root/libs/pbd/stateful.cc
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2010-08-25 17:31:41 +0000
committerCarl Hetherington <carl@carlh.net>2010-08-25 17:31:41 +0000
commitfde848282d43db6f7b337a959b5268236d377404 (patch)
tree0ee65ec91cccb654c99d40dc64fd3f8ce829d278 /libs/pbd/stateful.cc
parent7b2975244165b4ffd1dcf4080c1be4c8dcbc6708 (diff)
Move various code up the Property / Stateful hierarchies.
git-svn-id: svn://localhost/ardour2/branches/3.0@7682 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/pbd/stateful.cc')
-rw-r--r--libs/pbd/stateful.cc33
1 files changed, 33 insertions, 0 deletions
diff --git a/libs/pbd/stateful.cc b/libs/pbd/stateful.cc
index f58c64603e..6ea8f19128 100644
--- a/libs/pbd/stateful.cc
+++ b/libs/pbd/stateful.cc
@@ -314,4 +314,37 @@ Stateful::apply_change (const PropertyBase& prop)
return true;
}
+PropertyList*
+Stateful::property_factory (const XMLNode& history_node) const
+{
+ PropertyList* prop_list = new PropertyList;
+
+ for (OwnedPropertyList::const_iterator i = _properties->begin(); i != _properties->end(); ++i) {
+ PropertyBase* prop = i->second->maybe_clone_self_if_found_in_history_node (history_node);
+
+ if (prop) {
+ prop_list->add (prop);
+ }
+ }
+
+ return prop_list;
+}
+
+void
+Stateful::rdiff (vector<StatefulDiffCommand*>& cmds) const
+{
+ for (OwnedPropertyList::const_iterator i = _properties->begin(); i != _properties->end(); ++i) {
+ i->second->rdiff (cmds);
+ }
+}
+
+void
+Stateful::clear_owned_history ()
+{
+ for (OwnedPropertyList::iterator i = _properties->begin(); i != _properties->end(); ++i) {
+ i->second->clear_owned_history ();
+ }
+}
+
+
} // namespace PBD