LRT13  1.0
 All Classes Namespaces Functions Variables Enumerations Enumerator
ComponentManager.h
1 #ifndef COMPONENT_MANAGER_H_
2 #define COMPONENT_MANAGER_H_
3 
4 #include <string>
5 #include <map>
6 
7 #include "Component.h"
8 #include "../Utils/Util.h"
9 
10 using namespace std;
11 
17 {
18 public:
21 
22  void Update();
23 
24  void CreateComponents();
25 
26  void AddComponent(Component* comp);
27  void AddComponent(string id, Component* comp);
28  Component* GetComponent(string id);
29 
30  void EnableComponent(string id);
31  void DisableComponent(string id);
32 
33  bool IsComponentEnabled(string id);
34  bool HasComponent(string id);
35 
36 private:
37  static bool deleteAllComponents(Component* comp);
38 
39  map<string, Component*> m_components;
40 };
41 
42 #endif