Last change
on this file since 7a9881 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:
575 bytes
|
Line | |
---|
1 | /*
|
---|
2 | * MethodAction.cpp
|
---|
3 | *
|
---|
4 | * Created on: Dec 11, 2009
|
---|
5 | * Author: crueger
|
---|
6 | */
|
---|
7 |
|
---|
8 | #include <iostream>
|
---|
9 | #include <boost/function.hpp>
|
---|
10 | #include <string>
|
---|
11 |
|
---|
12 | #include "MethodAction.hpp"
|
---|
13 |
|
---|
14 | using namespace std;
|
---|
15 |
|
---|
16 | MethodAction::MethodAction(string _name,boost::function<void()> _executeMethod,bool _doRegister) :
|
---|
17 | Action(_name,_doRegister),
|
---|
18 | executeMethod(_executeMethod)
|
---|
19 | {
|
---|
20 | }
|
---|
21 |
|
---|
22 | MethodAction::~MethodAction()
|
---|
23 | {
|
---|
24 | // TODO Auto-generated destructor stub
|
---|
25 | }
|
---|
26 |
|
---|
27 |
|
---|
28 | void MethodAction::call() {
|
---|
29 | executeMethod();
|
---|
30 | }
|
---|
31 | void MethodAction::undo() {
|
---|
32 |
|
---|
33 | }
|
---|
34 |
|
---|
35 | bool MethodAction::canUndo() {
|
---|
36 | return false;
|
---|
37 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.