Line | |
---|
1 | /*
|
---|
2 | * ActionSequenze.hpp
|
---|
3 | *
|
---|
4 | * Created on: Dec 17, 2009
|
---|
5 | * Author: crueger
|
---|
6 | */
|
---|
7 |
|
---|
8 | #ifndef ACTIONSEQUENZE_HPP_
|
---|
9 | #define ACTIONSEQUENZE_HPP_
|
---|
10 |
|
---|
11 | #include "Actions/Action.hpp"
|
---|
12 |
|
---|
13 | #include <deque>
|
---|
14 |
|
---|
15 | /**
|
---|
16 | * Store Actions for later use.
|
---|
17 | */
|
---|
18 | class ActionSequence
|
---|
19 | {
|
---|
20 | public:
|
---|
21 | typedef std::deque<Action*> actionSet;
|
---|
22 | typedef std::deque<Action::state_ptr> stateSet;
|
---|
23 |
|
---|
24 | ActionSequence();
|
---|
25 | virtual ~ActionSequence();
|
---|
26 |
|
---|
27 | void addAction(Action*);
|
---|
28 | Action* removeLastAction();
|
---|
29 |
|
---|
30 | stateSet callAll();
|
---|
31 | stateSet undoAll(stateSet);
|
---|
32 | stateSet redoAll(stateSet);
|
---|
33 |
|
---|
34 | bool canUndo();
|
---|
35 | bool shouldUndo();
|
---|
36 |
|
---|
37 | private:
|
---|
38 | actionSet actions;
|
---|
39 | };
|
---|
40 |
|
---|
41 | #endif /* ACTIONSEQUENZE_HPP_ */
|
---|
Note:
See
TracBrowser
for help on using the repository browser.