source: molecuilder/src/Actions/ActionSequence.hpp@ 0d111b

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
RevLine 
[425da9]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
[521e29]11#include "Actions/Action.hpp"
[425da9]12
[521e29]13#include <deque>
[425da9]14
15/**
16 * Store Actions for later use.
17 */
18class ActionSequence
19{
[abd4a1]20 friend class MakroAction;
[425da9]21public:
[0012e6]22 typedef std::deque<Action*> actionSet;
[521e29]23 typedef std::deque<Action::state_ptr> stateSet;
[0012e6]24
[425da9]25 ActionSequence();
26 virtual ~ActionSequence();
27
28 void addAction(Action*);
29 Action* removeLastAction();
30
[abd4a1]31 void callAll();
[425da9]32
33 bool canUndo();
[0012e6]34 bool shouldUndo();
[425da9]35
[abd4a1]36protected:
37 stateSet callAll(bool); // Dummy parameter to allow overloading
38 stateSet undoAll(stateSet);
39 stateSet redoAll(stateSet);
[425da9]40private:
[0012e6]41 actionSet actions;
[425da9]42};
43
44#endif /* ACTIONSEQUENZE_HPP_ */
Note: See TracBrowser for help on using the repository browser.