Home | Namespaces | Hierarchy | Alphabetical List | Class list | Files | Namespace Members | Class members | File members |
00001 // Copyright 2006-2011 by Kat'Oun 00002 00003 #ifndef _ENGINE_MANAGER_H_ 00004 #define _ENGINE_MANAGER_H_ 00005 00006 #include <EngineConfig.h> 00007 #include <core/Types.h> 00008 #include <core/Singleton.h> 00009 #include <engine/Object.h> 00010 00011 #include <string> 00012 #include <list> 00013 #include <map> 00014 00015 namespace core 00016 { 00017 class ConfigFile; 00018 } 00019 00020 namespace platform 00021 { 00022 class Timer; 00023 class PlatformManager; 00024 } 00025 00026 namespace input 00027 { 00028 class InputManager; 00029 } 00030 00031 namespace resource 00032 { 00033 class ResourceManager; 00034 } 00035 00036 namespace script 00037 { 00038 class ScriptManager; 00039 } 00040 00041 namespace scene 00042 { 00043 class SceneManager; 00044 } 00045 00046 namespace render 00047 { 00048 class RenderManager; 00049 } 00050 00051 namespace sound 00052 { 00053 class SoundManager; 00054 } 00055 00056 namespace physics 00057 { 00058 class PhysicsManager; 00059 } 00060 00061 namespace engine 00062 { 00063 00064 class Log; 00065 class LogManager; 00066 class PluginManager; 00067 class EngineSettings; 00068 class EngineEventReceiver; 00069 struct EngineEvent; 00070 00071 class ENGINE_PUBLIC_EXPORT EngineManager: public Object, public core::Singleton<EngineManager> 00072 { 00073 public: 00075 EngineManager(); 00076 00078 ~EngineManager(); 00079 00080 LogManager* getLogManager(); 00081 00082 platform::PlatformManager* getPlatformManager(); 00083 00084 input::InputManager* getInputManager(); 00085 00086 resource::ResourceManager* getResourceManager(); 00087 00088 render::RenderManager* getRenderManager(); 00089 00090 sound::SoundManager* getSoundManager(); 00091 00092 physics::PhysicsManager* getPhysicsManager(); 00093 00094 scene::SceneManager* getSceneManager(); 00095 00096 script::ScriptManager* getScriptManager(); 00097 00098 void start(); 00099 00100 bool isRunning(); 00101 00102 void stopRunning(); 00103 00104 void stop(); 00105 00106 void addEngineEventReceiver(EngineEventReceiver* newEventReceiver); 00107 void removeEngineEventReceiver(EngineEventReceiver* oldEventReceiver); 00108 00109 const std::string& getVersion() const; 00110 const std::string& getVersionString() const; 00111 00112 void setOptionsFile(const std::string& optionsFile); 00113 void setPluginsFile(const std::string& pluginsFile); 00114 void setResourcesFile(const std::string& resourcesFile); 00115 00116 static EngineManager* getInstance(); 00117 00118 protected: 00119 00120 void initializeImpl(); 00121 void uninitializeImpl(); 00122 void updateImpl(f32 elapsedTime); 00123 00124 std::string mVersion; 00125 std::string mVersionString; 00126 00127 static EngineEvent* mEngineEvent; 00128 static std::list<EngineEventReceiver*> mEngineEventReceivers; 00129 00130 LogManager* mLogManager; 00131 00132 PluginManager* mPluginManager; 00133 00134 platform::PlatformManager* mPlatformManager; 00135 00136 input::InputManager* mInputManager; 00137 00138 resource::ResourceManager* mResourceManager; 00139 00140 render::RenderManager* mRenderManager; 00141 00142 sound::SoundManager* mSoundManager; 00143 00144 physics::PhysicsManager* mPhysicsManager; 00145 00146 scene::SceneManager* mSceneManager; 00147 00148 script::ScriptManager* mScriptManager; 00149 00150 EngineSettings* mEngineSettings; 00151 00153 bool mUpdateGame; 00154 00155 Log* mLog; 00156 00157 std::string mPluginsFile; 00158 std::string mOptionsFile; 00159 std::string mResourcesFile; 00160 00161 // Internal timer 00162 platform::Timer* mTimer; 00163 00164 u32 mLastUpdateStartTime; 00165 u32 mLastUpdateEndTime; 00166 00167 void fireEngineInitialized(); 00168 00169 void fireEngineUninitialized(); 00170 00171 void fireEngineStarted(); 00172 00173 void fireEngineStopped(); 00174 00175 void fireEngineUpdateStarted(); 00176 00177 void fireEngineUpdateEnded(); 00178 00180 void registerDefaultFactories(); 00181 00183 void removeDefaultFactories(); 00184 00186 void loadPlugins(); 00187 00189 void unloadPlugins(); 00190 00192 void loadOptions(); 00193 00195 void saveOptions(); 00196 00198 void setPaths(); 00199 }; 00200 00201 } // end namespace engine 00202 00203 #endif
The KG Game Engine
Documentation © 2006-2011 by Kat'Oun. Generated on Sat Jul 2 2011 00:50:04 by
Doxygen
(1.7.4)
|