mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-15 19:16:40 +01:00
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:
parent
7b29752441
commit
fde848282d
8 changed files with 90 additions and 78 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue