Changeset 8423 for code/trunk/src/libraries/core/Core.h
- Timestamp:
- May 9, 2011, 5:06:49 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/libraries/core/Core.h
r8366 r8423 45 45 46 46 #include <string> 47 #include <boost/scoped_ptr.hpp>48 47 #include <loki/ScopeGuard.h> 49 48 49 #include "util/DestructionHelper.h" 50 50 #include "util/Singleton.h" 51 51 #include "OrxonoxClass.h" … … 61 61 class _CoreExport Core : public Singleton<Core>, public OrxonoxClass 62 62 { 63 typedef Loki::ScopeGuardImpl0<void (*)()> SimpleScopeGuard;64 63 friend class Singleton<Core>; 65 64 friend class Game; … … 74 73 */ 75 74 Core(const std::string& cmdLine); 76 ~Core(); 75 76 /// Leave empty and use destroy() instead 77 ~Core() {} 78 /// Destructor that also executes when the object fails to construct 79 void destroy(); 77 80 78 81 void setConfigValues(); … … 108 111 109 112 void setThreadAffinity(int limitToCPU); 110 // MANAGED SINGLETONS/OBJECTS 111 // Mind the order for the destruction! 112 scoped_ptr<PathConfig> pathConfig_; 113 scoped_ptr<DynLibManager> dynLibManager_; 114 scoped_ptr<SignalHandler> signalHandler_; 115 SimpleScopeGuard identifierDestroyer_; 116 SimpleScopeGuard consoleCommandDestroyer_; 117 scoped_ptr<ConfigFileManager> configFileManager_; 118 scoped_ptr<Language> languageInstance_; 119 scoped_ptr<IOConsole> ioConsole_; 120 scoped_ptr<TclBind> tclBind_; 121 scoped_ptr<TclThreadManager> tclThreadManager_; 122 scoped_ptr<Scope<ScopeID::Root> > rootScope_; 113 114 PathConfig* pathConfig_; 115 DynLibManager* dynLibManager_; 116 SignalHandler* signalHandler_; 117 ConfigFileManager* configFileManager_; 118 Language* languageInstance_; 119 IOConsole* ioConsole_; 120 TclBind* tclBind_; 121 TclThreadManager* tclThreadManager_; 122 Scope<ScopeID::Root>* rootScope_; 123 123 // graphical 124 scoped_ptr<GraphicsManager> graphicsManager_;//!< Interface to OGRE125 scoped_ptr<InputManager> inputManager_;//!< Interface to OIS126 scoped_ptr<GUIManager> guiManager_;//!< Interface to GUI127 scoped_ptr<Scope<ScopeID::Graphics> >graphicsScope_;124 GraphicsManager* graphicsManager_; //!< Interface to OGRE 125 InputManager* inputManager_; //!< Interface to OIS 126 GUIManager* guiManager_; //!< Interface to GUI 127 Scope<ScopeID::Graphics>* graphicsScope_; 128 128 129 bool 130 int 131 std::string 132 bool 133 bool 134 long long 135 long long 136 bool 129 bool bGraphicsLoaded_; 130 int softDebugLevelLogFile_; //!< The debug level for the log file (belongs to OutputHandler) 131 std::string language_; //!< The language 132 bool bInitRandomNumberGenerator_; //!< If true, srand(time(0)) is called 133 bool bStartIOConsole_; //!< Set to false if you don't want to use the IOConsole 134 long long lastLevelTimestamp_; ///< Timestamp when the last level was started 135 long long ogreConfigTimestamp_; ///< Timestamp wehen the ogre config level was modified 136 bool bDevMode_; //!< Developers bit. If set to false, some options are not available as to not confuse the normal user. 137 137 138 static Core* singletonPtr_s; 138 /// Helper object that executes the surrogate destructor destroy() 139 DestructionHelper<Core> destructionHelper_; 140 141 static Core* singletonPtr_s; 139 142 }; 140 143 }
Note: See TracChangeset
for help on using the changeset viewer.