|
Last change
on this file since 3e8325 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:
408 bytes
|
| Line | |
|---|
| 1 | /*
|
|---|
| 2 | * Action.cpp
|
|---|
| 3 | *
|
|---|
| 4 | * Created on: Dec 8, 2009
|
|---|
| 5 | * Author: crueger
|
|---|
| 6 | */
|
|---|
| 7 |
|
|---|
| 8 | #include <string>
|
|---|
| 9 |
|
|---|
| 10 | #include "Actions/Action.hpp"
|
|---|
| 11 | #include "Actions/ActionRegistry.hpp"
|
|---|
| 12 |
|
|---|
| 13 | using namespace std;
|
|---|
| 14 |
|
|---|
| 15 | Action::Action(std::string _name,bool _doRegister) :
|
|---|
| 16 | name(_name)
|
|---|
| 17 | {
|
|---|
| 18 | if(_doRegister){
|
|---|
| 19 | ActionRegistry::getRegistry()->registerAction(this);
|
|---|
| 20 | }
|
|---|
| 21 | }
|
|---|
| 22 |
|
|---|
| 23 | Action::~Action()
|
|---|
| 24 | {}
|
|---|
| 25 |
|
|---|
| 26 | const string Action::getName(){
|
|---|
| 27 | return name;
|
|---|
| 28 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.