summaryrefslogtreecommitdiff
path: root/libs/pbd/pbd/stateful_diff_command.h
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2010-02-11 23:10:29 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2010-02-11 23:10:29 +0000
commita1e0dc13df3cdc7033c940f0f3311a2bd47d3b2e (patch)
tree72cf696511c00bb4dfc135f43f8c0ae0498140cf /libs/pbd/pbd/stateful_diff_command.h
parentf938687f8798d094c99cd4308ad6aa1c467e4a97 (diff)
tweak Stateful/StatefulDiffCommand changes so that SessionObject's actually get a name; make StatefulDiffCommand use a weak_ptr, not a raw ptr; use .val() rather than .get() to avoid confusion with boost:: smart ptr method of the same name
git-svn-id: svn://localhost/ardour2/branches/3.0@6678 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/pbd/pbd/stateful_diff_command.h')
-rw-r--r--libs/pbd/pbd/stateful_diff_command.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/libs/pbd/pbd/stateful_diff_command.h b/libs/pbd/pbd/stateful_diff_command.h
index 41c0c70f69..43efed445d 100644
--- a/libs/pbd/pbd/stateful_diff_command.h
+++ b/libs/pbd/pbd/stateful_diff_command.h
@@ -17,6 +17,11 @@
*/
+#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
@@ -30,8 +35,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 +45,11 @@ public:
XMLNode& get_state ();
private:
- Stateful* _object; ///< the object in question
+ boost::weak_ptr<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
};
};
+
+#endif /* __pbd_stateful_diff_command_h__ */