| Line | |
|---|
| 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 |
|
|---|
| 14 | #include "Patterns/Singleton.hpp"
|
|---|
| 15 |
|
|---|
| 16 | class Action;
|
|---|
| 17 |
|
|---|
| 18 | class ActionRegistry : public Singleton<ActionRegistry>
|
|---|
| 19 | {
|
|---|
| 20 | friend class Singleton<ActionRegistry>;
|
|---|
| 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.