Changeset 6121 for code/branches/presentation2/src/libraries/core/Core.h
- Timestamp:
- Nov 23, 2009, 6:19:58 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentation2/src/libraries/core/Core.h
r6105 r6121 35 35 #include <cassert> 36 36 #include <boost/scoped_ptr.hpp> 37 #include "util/OutputHandler.h"38 #include "util/Scope.h"39 37 #include "util/ScopeGuard.h" 40 38 #include "util/Singleton.h" 39 #include "core/OrxonoxClass.h" 41 40 42 41 namespace orxonox 43 42 { 44 class CoreConfiguration;45 46 43 /** 47 44 @brief … … 50 47 You should only create this singleton once because it destroys the identifiers! 51 48 */ 52 class _CoreExport Core : public Singleton<Core> 49 class _CoreExport Core : public Singleton<Core>, public OrxonoxClass 53 50 { 54 51 typedef Loki::ScopeGuardImpl0<void (*)()> SimpleScopeGuard; … … 69 66 void setConfigValues(); 70 67 71 static const std::string& getLanguage(); 72 static void resetLanguage(); 68 //! Returns the configured language. 69 const std::string& getLanguage() 70 { return this->language_; } 71 void resetLanguage(); 73 72 74 73 private: 75 74 Core(const Core&); //!< Don't use (undefined symbol) 75 76 void languageChanged(); 77 void initRandomNumberGenerator(); 76 78 77 79 void preUpdate(const Clock& time); … … 82 84 83 85 void setThreadAffinity(int limitToCPU); 84 86 // MANAGED SINGLETONS/OBJECTS 85 87 // Mind the order for the destruction! 86 88 scoped_ptr<PathConfig> pathConfig_; … … 92 94 scoped_ptr<Language> languageInstance_; 93 95 scoped_ptr<IOConsole> ioConsole_; 94 scoped_ptr<CoreConfiguration> configuration_;95 96 scoped_ptr<TclBind> tclBind_; 96 97 scoped_ptr<TclThreadManager> tclThreadManager_; 98 scoped_ptr<Scope<ScopeID::Root> > rootScope_; 97 99 // graphical 98 100 scoped_ptr<GraphicsManager> graphicsManager_; //!< Interface to OGRE 99 101 scoped_ptr<InputManager> inputManager_; //!< Interface to OIS 100 102 scoped_ptr<GUIManager> guiManager_; //!< Interface to GUI 101 scoped_ptr<Scope<ScopeID::Root> > rootScope_;102 103 scoped_ptr<Scope<ScopeID::Graphics> > graphicsScope_; 103 104 104 105 bool bGraphicsLoaded_; 105 static Core* singletonPtr_s; 106 int softDebugLevelLogFile_; //!< The debug level for the log file (belongs to OutputHandler) 107 std::string language_; //!< The language 108 bool bInitRandomNumberGenerator_; //!< If true, srand(time(0)) is called 109 110 static Core* singletonPtr_s; 106 111 }; 107 112 }
Note: See TracChangeset
for help on using the changeset viewer.