Changeset 2710 for code/trunk/src/core/Core.h
- Timestamp:
- Feb 28, 2009, 7:46:37 PM (16 years ago)
- Location:
- code/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:ignore deleted
- Property svn:mergeinfo changed
-
code/trunk/src/core/Core.h
r2662 r2710 44 44 #include "util/OutputHandler.h" 45 45 46 // Only allow main to access postMainInitialisation, so we need a forward declaration 47 int main(int, char**); 48 // boost::filesystem header has quite a large tail, use forward declaration 49 namespace boost { namespace filesystem 50 { 51 struct path_traits; 52 template<class String, class Traits> class basic_path; 53 typedef basic_path< std::string, path_traits> path; 54 } } 55 46 56 namespace orxonox 47 57 { … … 49 59 class _CoreExport Core : public OrxonoxClass 50 60 { 61 friend int ::main(int, char**); // sets isDevBuild_s 62 51 63 public: 52 64 Core(); 53 65 ~Core(); 54 66 void setConfigValues(); 55 void debugLevelChanged();56 void languageChanged();57 67 58 68 static Core& getInstance() { assert(Core::singletonRef_s); return *Core::singletonRef_s; } … … 62 72 static const std::string& getLanguage(); 63 73 static void resetLanguage(); 74 75 static bool isDevBuild() { return Core::isDevBuild_s; } 76 77 static void tsetMediaPath(const std::string& path) 78 { assert(singletonRef_s); singletonRef_s->_tsetMediaPath(path); } 79 static const boost::filesystem::path& getMediaPath(); 80 static const boost::filesystem::path& getConfigPath(); 81 static const boost::filesystem::path& getLogPath(); 82 static std::string getMediaPathString(); 83 static std::string getConfigPathString(); 84 static std::string getLogPathString(); 85 static std::string getMediaPathPOSIXString(); 86 static std::string getConfigPathPOSIXString(); 87 static std::string getLogPathPOSIXString(); 64 88 65 89 // fast access global variables. … … 79 103 void resetLanguageIntern(); 80 104 void initializeRandomNumberGenerator(); 105 void debugLevelChanged(); 106 void languageChanged(); 107 void mediaPathChanged(); 108 void _tsetMediaPath(const std::string& path); 109 110 static void postMainInitialisation(); 111 static void checkDevBuild(); 112 static void setExecutablePath(); 113 static void createDirectories(); 81 114 82 115 int softDebugLevel_; //!< The debug level … … 85 118 int softDebugLevelShell_; //!< The debug level for the ingame shell 86 119 std::string language_; //!< The language 87 bool bInitializeRandomNumberGenerator_; //!< If true, srand(time(0)) is called 120 bool bInitializeRandomNumberGenerator_; //!< If true, srand(time(0)) is called 121 std::string mediaPathString_; //!< Path to the data/media file folder as string 88 122 89 123 static bool bShowsGraphics_s; //!< global variable that tells whether to show graphics … … 93 127 static bool bIsMaster_s; 94 128 129 static bool isDevBuild_s; //!< True for builds in the build directory (not installed) 130 95 131 static Core* singletonRef_s; 96 132 };
Note: See TracChangeset
for help on using the changeset viewer.