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