X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fpbd%2Fpbd%2Fcommand.h;h=a9b313f4fa5ed7dee4414d0c82212f70dc80e7b4;hb=ae4e84fd51daa868f6f5f457935c2c186a2bb659;hp=4547b779fb4e736300305017012e6246dfa66ba9;hpb=c5115c9a3c8ce6639f37e0b429e0498bb522d913;p=ardour.git diff --git a/libs/pbd/pbd/command.h b/libs/pbd/pbd/command.h index 4547b779fb..a9b313f4fa 100644 --- a/libs/pbd/pbd/command.h +++ b/libs/pbd/pbd/command.h @@ -1,5 +1,5 @@ -/* +/* Copyright (C) 2006 Paul Davis Author: Hans Fugal @@ -28,19 +28,20 @@ #include "pbd/signals.h" #include "pbd/statefuldestructible.h" +/** Base class for Undo/Redo commands and changesets */ class LIBPBD_API Command : public PBD::StatefulDestructible, public PBD::ScopedConnectionList { public: virtual ~Command() { /* NOTE: derived classes must call drop_references() */ } virtual void operator() () = 0; - + void set_name (const std::string& str) { _name = str; } const std::string& name() const { return _name; } virtual void undo() = 0; virtual void redo() { (*this)(); } - + virtual XMLNode &get_state(); virtual int set_state(const XMLNode&, int /*version*/) { /* noop */ return 0; }