Merge branch 'master' into cairocanvas
[ardour.git] / libs / pbd / pbd / stateful_diff_command.h
index b02d7a669ecd8cd78f5d1a52ba30aeb5330deabf..2a213d7a17e7fcea73be991cf6d3316e2d921727 100644 (file)
 
 */
 
+#ifndef __pbd_stateful_diff_command_h__
+#define __pbd_stateful_diff_command_h__
+
+#include <boost/shared_ptr.hpp>
+#include <boost/weak_ptr.hpp>
 #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.
@@ -30,18 +36,22 @@ class Stateful;
 class StatefulDiffCommand : public Command
 {
 public:
-       StatefulDiffCommand (Stateful* s);
+       StatefulDiffCommand (boost::shared_ptr<StatefulDestructible>);
+       StatefulDiffCommand (boost::shared_ptr<StatefulDestructible>, XMLNode const &);
        ~StatefulDiffCommand ();
 
        void operator() ();
        void undo ();
-
+        
        XMLNode& get_state ();
 
+       bool empty () const;
+
 private:
-       Stateful* _object; ///< the object in question
-       XMLNode* _before; ///< XML node containing the previous values of XML properties which changed
-       XMLNode* _after; ///< XML node containing the new values of XML properties which changed
+       boost::weak_ptr<Stateful> _object; ///< the object in question
+        PBD::PropertyList* _changes; ///< property changes to execute this command
 };
 
 };
+
+#endif /* __pbd_stateful_diff_command_h__ */