]> Shamusworld >> Repos - architektonas/blob - src/base/undoable.h
Fixed problem with MDI activation.
[architektonas] / src / base / undoable.h
1 #ifndef __UNDOABLE_H__
2 #define __UNDOABLE_H__
3
4 #include "enums.h"
5 #include "flags.h"
6
7 class UndoCycle;
8
9 /**
10  * Base class for something that can be added and deleted and every
11  * addition and deletion can be undone.
12  *
13  * @see Undo
14  * @author Andrew Mustun
15  */
16 class Undoable: public Flags
17 {
18         public:
19                 Undoable();
20                 virtual ~Undoable();
21
22                 virtual RS2::UndoableType undoRtti();
23                 virtual void setUndoCycle(UndoCycle * cycle);
24                 virtual void changeUndoState();
25                 virtual void setUndoState(bool undone);
26                 virtual bool isUndone() const;
27                 virtual void undoStateChanged(bool /*undone*/);
28                 //friend std::ostream& operator << (std::ostream& os, Undoable& a);
29
30         private:
31                 UndoCycle * cycle;
32 };
33
34 #endif