summaryrefslogtreecommitdiff
path: root/libs/pbd/pbd
diff options
context:
space:
mode:
Diffstat (limited to 'libs/pbd/pbd')
-rw-r--r--libs/pbd/pbd/command.h8
-rw-r--r--libs/pbd/pbd/properties.h4
-rw-r--r--libs/pbd/pbd/property_basics.h6
-rw-r--r--libs/pbd/pbd/stateful.h2
-rw-r--r--libs/pbd/pbd/stateful_diff_command.h8
-rw-r--r--libs/pbd/pbd/undo.h3
6 files changed, 17 insertions, 14 deletions
diff --git a/libs/pbd/pbd/command.h b/libs/pbd/pbd/command.h
index 5a7290bc89..c6c3c8d3fd 100644
--- a/libs/pbd/pbd/command.h
+++ b/libs/pbd/pbd/command.h
@@ -22,10 +22,12 @@
#ifndef __lib_pbd_command_h__
#define __lib_pbd_command_h__
+#include <string>
+
+#include "pbd/signals.h"
#include "pbd/statefuldestructible.h"
-#include <boost/utility.hpp>
-class Command : public PBD::StatefulDestructible, public boost::noncopyable
+class Command : public PBD::StatefulDestructible, public PBD::ScopedConnectionList
{
public:
virtual ~Command() { /* NOTE: derived classes must call drop_references() */ }
@@ -34,7 +36,7 @@ public:
void set_name (const std::string& str) { _name = str; }
const std::string& name() const { return _name; }
-
+
virtual void undo() = 0;
virtual void redo() { (*this)(); }
diff --git a/libs/pbd/pbd/properties.h b/libs/pbd/pbd/properties.h
index 784282ee9c..1914344db9 100644
--- a/libs/pbd/pbd/properties.h
+++ b/libs/pbd/pbd/properties.h
@@ -165,7 +165,7 @@ public:
: PropertyTemplate<T> (q, v)
{}
- void diff (PropertyList& undo, PropertyList& redo) const {
+ void diff (PropertyList& undo, PropertyList& redo, Command* /*ignored*/) const {
if (this->_have_old) {
undo.add (new Property<T> (this->property_id(), this->_old));
redo.add (new Property<T> (this->property_id(), this->_current));
@@ -227,7 +227,7 @@ public:
: PropertyTemplate<std::string> (q, v)
{}
- void diff (PropertyList& before, PropertyList& after) const {
+ void diff (PropertyList& before, PropertyList& after, Command* /*ignored*/) const {
if (this->_have_old) {
before.add (new Property<std::string> (PropertyDescriptor<std::string> (this->property_id()), this->_old));
after.add (new Property<std::string> (PropertyDescriptor<std::string> (this->property_id()), this->_current));
diff --git a/libs/pbd/pbd/property_basics.h b/libs/pbd/pbd/property_basics.h
index 5e94abdfc3..2dea20e251 100644
--- a/libs/pbd/pbd/property_basics.h
+++ b/libs/pbd/pbd/property_basics.h
@@ -25,6 +25,8 @@
#include "pbd/xml++.h"
+class Command;
+
namespace PBD {
class PropertyList;
@@ -83,7 +85,7 @@ public:
{}
virtual ~PropertyBase () {}
-
+
/** Forget about any old value for this state */
virtual void clear_history () = 0;
@@ -97,7 +99,7 @@ public:
* the last call to clear_history, and one that allows redo
* of those changes.
*/
- virtual void diff (PropertyList& undo, PropertyList& redo) const = 0;
+ virtual void diff (PropertyList& undo, PropertyList& redo, Command*) const = 0;
virtual PropertyBase* maybe_clone_self_if_found_in_history_node (const XMLNode&) const { return 0; }
diff --git a/libs/pbd/pbd/stateful.h b/libs/pbd/pbd/stateful.h
index 4352e88201..1272a735f9 100644
--- a/libs/pbd/pbd/stateful.h
+++ b/libs/pbd/pbd/stateful.h
@@ -67,7 +67,7 @@ class Stateful {
/* history management */
void clear_history ();
- void diff (PropertyList&, PropertyList&) const;
+ void diff (PropertyList&, PropertyList&, Command*) const;
bool changed() const;
/* create a property list from an XMLNode
diff --git a/libs/pbd/pbd/stateful_diff_command.h b/libs/pbd/pbd/stateful_diff_command.h
index 21245f029a..25cdfbba12 100644
--- a/libs/pbd/pbd/stateful_diff_command.h
+++ b/libs/pbd/pbd/stateful_diff_command.h
@@ -27,7 +27,7 @@
namespace PBD
{
-class Stateful;
+class StatefulDestructible;
class PropertyList;
/** A Command which stores its action as the differences between the before and after
@@ -36,13 +36,13 @@ class PropertyList;
class 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 ();
private:
diff --git a/libs/pbd/pbd/undo.h b/libs/pbd/pbd/undo.h
index 6eb9e00056..fb5152c293 100644
--- a/libs/pbd/pbd/undo.h
+++ b/libs/pbd/pbd/undo.h
@@ -27,12 +27,11 @@
#include <sigc++/bind.h>
#include <sys/time.h>
-#include "pbd/signals.h"
#include "pbd/command.h"
typedef sigc::slot<void> UndoAction;
-class UndoTransaction : public Command, public PBD::ScopedConnectionList
+class UndoTransaction : public Command
{
public:
UndoTransaction ();