|
Last change
on this file since 0d111b was abd4a1, checked in by Tillmann Crueger <crueger@…>, 16 years ago |
|
Added detailed documentation for the Action class
|
-
Property mode
set to
100644
|
|
File size:
754 bytes
|
| 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 | friend class MakroAction;
|
|---|
| 21 | public:
|
|---|
| 22 | typedef std::deque<Action*> actionSet;
|
|---|
| 23 | typedef std::deque<Action::state_ptr> stateSet;
|
|---|
| 24 |
|
|---|
| 25 | ActionSequence();
|
|---|
| 26 | virtual ~ActionSequence();
|
|---|
| 27 |
|
|---|
| 28 | void addAction(Action*);
|
|---|
| 29 | Action* removeLastAction();
|
|---|
| 30 |
|
|---|
| 31 | void callAll();
|
|---|
| 32 |
|
|---|
| 33 | bool canUndo();
|
|---|
| 34 | bool shouldUndo();
|
|---|
| 35 |
|
|---|
| 36 | protected:
|
|---|
| 37 | stateSet callAll(bool); // Dummy parameter to allow overloading
|
|---|
| 38 | stateSet undoAll(stateSet);
|
|---|
| 39 | stateSet redoAll(stateSet);
|
|---|
| 40 | private:
|
|---|
| 41 | actionSet actions;
|
|---|
| 42 | };
|
|---|
| 43 |
|
|---|
| 44 | #endif /* ACTIONSEQUENZE_HPP_ */
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.