source: molecuilder/src/Actions/MakroAction.cpp@ 7bfc19

Last change on this file since 7bfc19 was 3e8325, checked in by Tillmann Crueger <crueger@…>, 16 years ago

Added a central registry that allows access to actions by name.

  • Property mode set to 100644
File size: 663 bytes
Line 
1/*
2 * MakroAction.cpp
3 *
4 * Created on: Dec 17, 2009
5 * Author: crueger
6 */
7
8#include <string>
9
10#include "Actions/MakroAction.hpp"
11#include "Actions/Action.hpp"
12#include "Actions/ActionSequence.hpp"
13
14using namespace std;
15
16MakroAction::MakroAction(string _name,ActionSequence* _actions,bool _doRegister) :
17Action(_name,_doRegister),
18actions(_actions)
19{
20}
21
22MakroAction::~MakroAction()
23{
24 Action* action;
25 while(action=actions->removeLastAction()){
26 delete action;
27 }
28 delete actions;
29}
30
31
32void MakroAction::call(){
33 actions->callAll();
34}
35
36void MakroAction::undo() {
37 actions->undoAll();
38}
39
40bool MakroAction::canUndo() {
41 return actions->canUndo();
42}
Note: See TracBrowser for help on using the repository browser.