Changeset 7908 for code/forks/sandbox_light/src/libraries/core/Core.h
- Timestamp:
- Feb 17, 2011, 5:47:22 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/forks/sandbox_light/src/libraries/core/Core.h
r7870 r7908 46 46 #include <string> 47 47 #include <boost/scoped_ptr.hpp> 48 #include <loki/ScopeGuard.h>49 48 50 49 #include "util/Singleton.h" 51 #include "OrxonoxClass.h"52 50 53 51 namespace orxonox … … 59 57 You should only create this singleton once because it destroys the identifiers! 60 58 */ 61 class _CoreExport Core : public Singleton<Core> , public OrxonoxClass59 class _CoreExport Core : public Singleton<Core> 62 60 { 63 typedef Loki::ScopeGuardImpl0<void (*)()> SimpleScopeGuard;64 61 friend class Singleton<Core>; 65 friend class Game;66 62 67 63 public: … … 76 72 ~Core(); 77 73 78 void setConfigValues();79 80 //! Returns the configured language.81 const std::string& getLanguage()82 { return this->language_; }83 void resetLanguage();84 85 void updateLastLevelTimestamp();86 inline long long getLastLevelTimestamp() const87 { return this->lastLevelTimestamp_; }88 89 void updateOgreConfigTimestamp();90 inline long long getOgreConfigTimestamp() const91 { return this->ogreConfigTimestamp_; }92 93 74 private: 94 75 Core(const Core&); //!< Don't use (undefined symbol) 95 76 96 void languageChanged();97 77 void initRandomNumberGenerator(); 98 78 99 void preUpdate(const Clock& time); 100 void postUpdate(const Clock& time); 79 void setThreadAffinity(int limitToCPU); 101 80 102 void loadGraphics();103 void unloadGraphics();104 105 void setThreadAffinity(int limitToCPU);106 81 // MANAGED SINGLETONS/OBJECTS 107 82 // Mind the order for the destruction! 108 83 scoped_ptr<PathConfig> pathConfig_; 109 scoped_ptr<DynLibManager> dynLibManager_;110 84 scoped_ptr<SignalHandler> signalHandler_; 111 SimpleScopeGuard identifierDestroyer_;112 SimpleScopeGuard consoleCommandDestroyer_;113 scoped_ptr<ConfigFileManager> configFileManager_;114 scoped_ptr<Language> languageInstance_;115 scoped_ptr<IOConsole> ioConsole_;116 scoped_ptr<TclBind> tclBind_;117 scoped_ptr<TclThreadManager> tclThreadManager_;118 scoped_ptr<Scope<ScopeID::Root> > rootScope_;119 // graphical120 scoped_ptr<GraphicsManager> graphicsManager_; //!< Interface to OGRE121 scoped_ptr<InputManager> inputManager_; //!< Interface to OIS122 scoped_ptr<GUIManager> guiManager_; //!< Interface to GUI123 scoped_ptr<Scope<ScopeID::Graphics> > graphicsScope_;124 85 125 bool bGraphicsLoaded_;126 86 int softDebugLevelLogFile_; //!< The debug level for the log file (belongs to OutputHandler) 127 std::string language_; //!< The language128 87 bool bInitRandomNumberGenerator_; //!< If true, srand(time(0)) is called 129 bool bStartIOConsole_; //!< Set to false if you don't want to use the IOConsole130 long long lastLevelTimestamp_; ///< Timestamp when the last level was started131 long long ogreConfigTimestamp_; ///< Timestamp wehen the ogre config level was modified132 88 133 89 static Core* singletonPtr_s;
Note: See TracChangeset
for help on using the changeset viewer.