Changeset 5929 for code/trunk/src/libraries/core/Core.h
- Timestamp:
- Oct 12, 2009, 8:20:07 PM (16 years ago)
- Location:
- code/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:mergeinfo changed
/code/branches/core5 (added) merged: 5768-5769,5772,5775-5780,5783-5785,5791-5792,5795-5807,5809-5814,5816-5832,5836-5839,5842-5853,5855-5899,5904-5922,5924-5928
- Property svn:mergeinfo changed
-
code/trunk/src/libraries/core/Core.h
r5781 r5929 28 28 */ 29 29 30 /**31 @file32 @brief33 Declaration of the Core class.34 @details35 The Core class is a singleton, only used to configure some variables36 in the core through the config-file.37 */38 39 30 #ifndef _Core_H__ 40 31 #define _Core_H__ … … 45 36 #include <boost/scoped_ptr.hpp> 46 37 #include "util/OutputHandler.h" 38 #include "util/Scope.h" 47 39 #include "util/ScopeGuard.h" 48 40 #include "util/Singleton.h" … … 55 47 @brief 56 48 The Core class is a singleton used to configure the program basics. 57 @details58 The class provides information about the data, config and log path.59 It determines those by the use of platform specific functions.60 49 @remark 61 50 You should only create this singleton once because it destroys the identifiers! … … 85 74 static void resetLanguage(); 86 75 87 static void tsetExternalDataPath(const std::string& path);88 //! Returns the path to the data files as boost::filesystem::path89 static const boost::filesystem::path& getDataPath();90 //! Returns the path to the external data files as boost::filesystem::path91 static const boost::filesystem::path& getExternalDataPath();92 //! Returns the path to the config files as boost::filesystem::path93 static const boost::filesystem::path& getConfigPath();94 //! Returns the path to the log files as boost::filesystem::path95 static const boost::filesystem::path& getLogPath();96 //! Returns the path to the root folder as boost::filesystem::path97 static const boost::filesystem::path& getRootPath();98 //! Returns the path to the data files as std::string99 static std::string getDataPathString();100 //! Returns the path to the external data files as std::string101 static std::string getExternalDataPathString();102 //! Returns the path to the config files as std::string103 static std::string getConfigPathString();104 //! Returns the path to the log files as std::string105 static std::string getLogPathString();106 //! Returns the path to the root folder as std::string107 static std::string getRootPathString();108 109 static bool isDevelopmentRun() { return getInstance().bDevRun_; }110 111 76 private: 112 77 Core(const Core&); //!< Don't use (undefined symbol) … … 118 83 void unloadGraphics(); 119 84 120 void setFixedPaths();121 void setConfigurablePaths();122 85 void setThreadAffinity(int limitToCPU); 123 86 124 87 // Mind the order for the destruction! 88 scoped_ptr<PathConfig> pathConfig_; 125 89 scoped_ptr<DynLibManager> dynLibManager_; 126 90 scoped_ptr<SignalHandler> signalHandler_; … … 137 101 scoped_ptr<InputManager> inputManager_; //!< Interface to OIS 138 102 scoped_ptr<GUIManager> guiManager_; //!< Interface to GUI 103 scoped_ptr<Scope<ScopeID::Root> > rootScope_; 104 scoped_ptr<Scope<ScopeID::Graphics> > graphicsScope_; 139 105 140 bool bDevRun_; //!< True for runs in the build directory (not installed)141 106 bool bGraphicsLoaded_; 142 143 107 static Core* singletonPtr_s; 144 108 };
Note: See TracChangeset
for help on using the changeset viewer.