Move various code up the Property / Stateful hierarchies.

git-svn-id: svn://localhost/ardour2/branches/3.0@7682 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Carl Hetherington 2010-08-25 17:31:41 +00:00
parent 7b29752441
commit fde848282d
8 changed files with 90 additions and 78 deletions

View file

@ -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