Hugintrunk  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Command.h
Go to the documentation of this file.
1 // -*- c-basic-offset: 4 -*-
24 #ifndef _COMMAND_H
25 #define _COMMAND_H
26 
27 #include <string>
28 #include <hugin_shared.h>
29 #include <panodata/Panorama.h>
30 
31 namespace PanoCommand
32 {
33 
39 {
40  public:
43  : m_pano(pano), m_memento(NULL), m_redoMemento(NULL), m_clearDirty(false), m_successful(false)
44  {};
45  PanoCommand(HuginBase::Panorama& pano, const std::string& commandName)
46  : m_pano(pano), m_memento(NULL), m_redoMemento(NULL), m_clearDirty(false), m_successful(false)
47  {};
48 
50  virtual ~PanoCommand();
51 
58  virtual void execute();
59 
65  virtual void undo();
66 
72  virtual void redo();
74  virtual std::string getName() const;
76  virtual void setName(const std::string& newName);
78  virtual bool wasSuccessful() const;
83  virtual bool processPanorama(HuginBase::Panorama& pano);
84 
85  protected:
87  virtual void setSuccessful(bool success = true);
88 
90  virtual void saveMemento();
92  virtual void saveRedoMemento();
93 
98 
99  // if true, the dirty tag is cleared, otherwise it is keep
101  private:
103  std::string m_name;
104 };
105 
106 } //namespace
107 
108 #endif // _H
HuginBase::PanoramaDataMemento * m_redoMemento
Definition: Command.h:97
Base class for all panorama commands.
Definition: Command.h:38
HuginBase::Panorama & m_pano
internal variables
Definition: Command.h:95
HuginBase::PanoramaDataMemento * m_memento
Definition: Command.h:96
Model for a panorama.
Definition: Panorama.h:152
#define WXIMPEX
Definition: hugin_shared.h:40
std::string m_name
Definition: Command.h:103
PanoCommand(HuginBase::Panorama &pano)
constructor
Definition: Command.h:42
Memento class for a PanoramaData object.
Definition: PanoramaData.h:443
PanoCommand(HuginBase::Panorama &pano, const std::string &commandName)
Definition: Command.h:45