source: molecuilder/src/Actions/ActionRegistry.hpp@ 2e06c4

Last change on this file since 2e06c4 was 2e06c4, checked in by Frederik Heber <heber@…>, 15 years ago

Added all commands defined in ParseCommandLineOptions() as Actions.

  • Actions are not yet used, except verbose, version and help.
  • Files are present and included in Makefile.am
  • not unit tests written so far
  • no action has been tested so far (except for MapOfActions)
  • structure introduced to to transition from ParseCommandLineOptions to actions.
  • program name and config file are fixed arguments.

Signed-off-by: Frederik Heber <heber@…>

  • Property mode set to 100644
File size: 728 bytes
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
16class Action;
17
18class ActionRegistry : public Singleton<ActionRegistry>
19{
20 friend class Singleton<ActionRegistry>;
21public:
22 Action* getActionByName(const std::string);
23 void registerAction(Action*);
24 void unregisterAction(Action*);
25
26 std::map<const std::string,Action*>::iterator getBeginIter();
27 std::map<const std::string,Action*>::iterator getEndIter();
28
29private:
30 std::map<const std::string,Action*> actionMap;
31
32private:
33 ActionRegistry();
34 virtual ~ActionRegistry();
35};
36
37#endif /* ACTIONREGISTRY_HPP_ */
Note: See TracBrowser for help on using the repository browser.