source: molecuilder/src/Actions/MakroAction.cpp@ e65cc0

Last change on this file since e65cc0 was 98a2987, checked in by Tillmann Crueger <crueger@…>, 16 years ago

Added -Wall flag and fixed several small hickups

  • Property mode set to 100644
File size: 665 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.