Main Page | Modules | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages
hugin1/hugin/CommandHistory.h
Go to the documentation of this file.00001 // -*- c-basic-offset: 4 -*- 00024 #ifndef _COMMANDHISTORY_H 00025 #define _COMMANDHISTORY_H 00026 00027 #ifndef _Hgn1_COMMAND_H 00028 class Command; 00029 #endif 00030 00036 class CommandHistory 00037 { 00038 public: 00039 00042 CommandHistory(); 00043 00046 virtual ~CommandHistory(); 00047 00053 void clear(); 00054 00066 void addCommand(Command *command, bool execute=true); 00067 00071 virtual void undo(); 00075 virtual void redo(); 00076 00077 private: 00078 // our commands 00079 std::vector<Command*> commands; 00080 size_t nextCmd; 00081 00082 }; 00083 00084 00090 class GlobalCmdHist : public CommandHistory 00091 { 00092 public: 00093 static GlobalCmdHist & getInstance(); 00094 protected: 00095 GlobalCmdHist(); 00096 private: 00097 static GlobalCmdHist * instance; 00098 }; 00099 00100 #endif // _COMMANDHISTORY_H
1.3.9.1