Game Develop C++ Platform: RuntimeContext.h Source File

| Game Develop C++ Platform Platform for developing native games based on OpenGL and SFML with Game Develop

- Main Page
- Modules
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Groups Pages
RuntimeContext.h
1 #ifndef RUNTIMECONTEXT_H
2 #define RUNTIMECONTEXT_H
3
4 #include <vector>
5 #include <string>
6 #include <map>
7 class RuntimeObject;
8 class RuntimeScene;
9 class RuntimeVariablesContainer;
10
15 class GD_API RuntimeContext
16 {
17 public:
22 RuntimeContext(RuntimeScene * scene_) : scene(scene_) {};
23 virtual ~RuntimeContext() {};
24
32 std::vector<RuntimeObject*> GetObjectsRawPointers(const std::string & name);
33
37 RuntimeVariablesContainer & GetSceneVariables();
38
42 RuntimeVariablesContainer & GetGameVariables();
43
48 bool TriggerOnce(unsigned int conditionId);
49
54 void StartNewFrame();
55
56 RuntimeContext & ClearObjectListsMap();
57 RuntimeContext & AddObjectListToMap(const std::string & objectName, std::vector<RuntimeObject*> & list);
58 std::map <std::string, std::vector<RuntimeObject*> *> ReturnObjectListsMap();
59
60 RuntimeScene * scene;
61
62 private:
63 std::map <std::string, std::vector<RuntimeObject*> *> temporaryMap;
64 std::map <unsigned int, bool> onceConditionsTriggered;
65 std::map <unsigned int, bool> onceConditionsTriggeredLastFrame;
66 };
67
68 #endif // RUNTIMECONTEXT_H
69