1 #ifndef INCLUDED_IGAMEMANAGER_H
2 #define INCLUDED_IGAMEMANAGER_H
3 
4 #include "generic/constant.h"
5 #include "moduleobserver.h"
6 
7 /**
8  * The "global" interface of DarkRadiant's camera module.
9  */
10 class IGameManager
11 {
12 	public:
13 		INTEGER_CONSTANT(Version, 1);
14 		STRING_CONSTANT(Name, "gamemanager");
15 
~IGameManager()16 		virtual ~IGameManager ()
17 		{
18 		}
19 
20 		virtual const std::string& getKeyValue(const std::string& key) const = 0;
21 
22 		virtual const std::string& getEnginePath() const = 0;
23 
24 		virtual void init() = 0;
25 		virtual void destroy() = 0;
26 };
27 
28 // Module definitions
29 
30 #include "modulesystem.h"
31 
32 template<typename Type>
33 class GlobalModule;
34 typedef GlobalModule<IGameManager> GlobalGameManagerModule;
35 
36 template<typename Type>
37 class GlobalModuleRef;
38 typedef GlobalModuleRef<IGameManager> GlobalGameManagerModuleRef;
39 
40 // This is the accessor for the registry
GlobalGameManager()41 inline IGameManager& GlobalGameManager ()
42 {
43 	return GlobalGameManagerModule::getTable();
44 }
45 
46 #endif
47