(1) remove most uses of MementoCommand for Playlist and Region (2) move frozen state...
[ardour.git] / libs / pbd / pbd / stateful_diff_command.h
index 41c0c70f69d332550386759a1db83779a2dd3947..cab1ae40cfb742554034bedfbbdaf5430793aeb0 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 PropertyList;
 
 /** A Command which stores its action as the differences between the before and after
  *  state of a Stateful object.
@@ -30,8 +36,8 @@ class Stateful;
 class StatefulDiffCommand : public Command
 {
 public:
-       StatefulDiffCommand (Stateful *);
-       StatefulDiffCommand (Stateful *, XMLNode const &);
+       StatefulDiffCommand (boost::shared_ptr<Stateful>);
+       StatefulDiffCommand (boost::shared_ptr<Stateful>, XMLNode const &);
        ~StatefulDiffCommand ();
 
        void operator() ();
@@ -40,9 +46,11 @@ public:
        XMLNode& get_state ();
 
 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* _before; ///< its (partial) state before the command
+        PBD::PropertyList* _after;  ///< its (partial) state after the operation
 };
 
 };
+
+#endif /* __pbd_stateful_diff_command_h__ */