Merge branch 'master' into cairocanvas
[ardour.git] / libs / pbd / pbd / stateful_diff_command.h
index 21245f029aa51cb9e8e5699e9a3c3c03fbe9c02b..2187c727edfaac8b971708268c9bcd12a4a3d180 100644 (file)
 
 #include <boost/shared_ptr.hpp>
 #include <boost/weak_ptr.hpp>
+
+#include "pbd/libpbd_visibility.h"
 #include "pbd/command.h"
 
 namespace PBD
 {
 
-class Stateful;        
+class StatefulDestructible;    
 class PropertyList;
 
 /** A Command which stores its action as the differences between the before and after
  *  state of a Stateful object.
  */
-class StatefulDiffCommand : public Command
+class LIBPBD_API StatefulDiffCommand : public Command
 {
 public:
-       StatefulDiffCommand (boost::shared_ptr<Stateful>);
-       StatefulDiffCommand (boost::shared_ptr<Stateful>, XMLNode const &);
+       StatefulDiffCommand (boost::shared_ptr<StatefulDestructible>);
+       StatefulDiffCommand (boost::shared_ptr<StatefulDestructible>, XMLNode const &);
        ~StatefulDiffCommand ();
 
        void operator() ();
        void undo ();
-
+        
        XMLNode& get_state ();
 
+       bool empty () const;
+
 private:
        boost::weak_ptr<Stateful> _object; ///< the object in question
-        PBD::PropertyList* _undo; ///< its (partial) state before the command, to allow undo
-        PBD::PropertyList* _redo;  ///< its (partial) state after the operation, to allow redo
+        PBD::PropertyList* _changes; ///< property changes to execute this command
 };
 
 };