diff options
author | Carl Hetherington <carl@carlh.net> | 2010-08-25 17:31:57 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2010-08-25 17:31:57 +0000 |
commit | 21855b71d2eb8006fda96aefacfa60140ae747d3 (patch) | |
tree | a5a5148ef41be377a0670bf708845b7197baf5d4 /libs/pbd/pbd/property_basics.h | |
parent | 803f3a6a307bea4bdd804041a0e0a846f48938ee (diff) |
Modify StatefulDiffCommand undo record to only contain the changes in one direction, as the other direction can be inferred. Breaks session history file compatibility.
git-svn-id: svn://localhost/ardour2/branches/3.0@7684 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/pbd/pbd/property_basics.h')
-rw-r--r-- | libs/pbd/pbd/property_basics.h | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/libs/pbd/pbd/property_basics.h b/libs/pbd/pbd/property_basics.h index 433a25a59b..f329916284 100644 --- a/libs/pbd/pbd/property_basics.h +++ b/libs/pbd/pbd/property_basics.h @@ -87,6 +87,8 @@ public: {} virtual ~PropertyBase () {} + + virtual PropertyBase* clone () const = 0; /** Forget about any old value for this state */ virtual void clear_history () = 0; @@ -94,15 +96,10 @@ public: /** Tell any things we own to forget about their old values */ virtual void clear_owned_history () {} - /** Get any change in this property as XML and add it to a node */ - virtual void get_change (XMLNode *) const = 0; - - /** Add information to two property lists: one that allows - * undo of the changes in this property's state betwen now and - * the last call to clear_history, and one that allows redo - * of those changes. - */ - virtual void diff (PropertyList& undo, PropertyList& redo, Command*) const = 0; + /** Get any changes in this property as XML and add it to a node */ + virtual void get_changes_as_xml (XMLNode *) const = 0; + + virtual void get_changes_as_properties (PropertyList& changes, Command *) const = 0; /** Collect StatefulDiffCommands for changes to anything that we own */ virtual void rdiff (std::vector<StatefulDiffCommand*> &) const {} @@ -122,8 +119,11 @@ public: */ virtual bool changed() const = 0; - /** Apply a change contained in another Property to this one */ - virtual void apply_change (PropertyBase const *) = 0; + /** Apply changes contained in another Property to this one */ + virtual void apply_changes (PropertyBase const *) = 0; + + /** Invert the changes in this property */ + virtual void invert () = 0; const gchar*property_name () const { return g_quark_to_string (_property_id); } PropertyID property_id () const { return _property_id; } |