Rev | Line | |
---|
[3e8325] | 1 | /*
|
---|
| 2 | * ActionRegistry.hpp
|
---|
| 3 | *
|
---|
| 4 | * Created on: Jan 7, 2010
|
---|
| 5 | * Author: crueger
|
---|
| 6 | */
|
---|
| 7 |
|
---|
| 8 | #ifndef ACTIONREGISTRY_HPP_
|
---|
| 9 | #define ACTIONREGISTRY_HPP_
|
---|
| 10 |
|
---|
| 11 | #include <string>
|
---|
| 12 | #include <map>
|
---|
| 13 |
|
---|
[8a4f12] | 14 | #include "Patterns/Singleton.hpp"
|
---|
| 15 |
|
---|
[3e8325] | 16 | class Action;
|
---|
| 17 |
|
---|
[8a4f12] | 18 | class ActionRegistry : public Singleton<ActionRegistry>
|
---|
[3e8325] | 19 | {
|
---|
[8a4f12] | 20 | friend class Singleton<ActionRegistry>;
|
---|
[3e8325] | 21 | public:
|
---|
| 22 | Action* getActionByName(const std::string);
|
---|
| 23 | void registerAction(Action*);
|
---|
| 24 |
|
---|
| 25 | private:
|
---|
| 26 | std::map<const std::string,Action*> actionMap;
|
---|
| 27 |
|
---|
| 28 | private:
|
---|
| 29 | ActionRegistry();
|
---|
| 30 | virtual ~ActionRegistry();
|
---|
| 31 | };
|
---|
| 32 |
|
---|
| 33 | #endif /* ACTIONREGISTRY_HPP_ */
|
---|
Note:
See
TracBrowser
for help on using the repository browser.