Changeset 2685 for code/branches/buildsystem3/src/core/Core.h
- Timestamp:
- Feb 20, 2009, 5:32:04 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/buildsystem3/src/core/Core.h
r2662 r2685 44 44 #include "util/OutputHandler.h" 45 45 46 // Only allow main to access setDevBuild, so we need a forward declaration 47 int main(int, char**); 48 46 49 namespace orxonox 47 50 { … … 49 52 class _CoreExport Core : public OrxonoxClass 50 53 { 54 friend int ::main(int, char**); // sets isDevBuild_s 55 51 56 public: 52 57 Core(); 53 58 ~Core(); 54 59 void setConfigValues(); 55 void debugLevelChanged();56 void languageChanged();57 60 58 61 static Core& getInstance() { assert(Core::singletonRef_s); return *Core::singletonRef_s; } … … 62 65 static const std::string& getLanguage(); 63 66 static void resetLanguage(); 67 68 static bool isDevBuild() { return Core::isDevBuild_s; } 69 70 static const std::string& getMediaPath() 71 { assert(singletonRef_s); return singletonRef_s->mediaPath_; } 72 static void tsetMediaPath(const std::string& path) 73 { assert(singletonRef_s); singletonRef_s->_tsetMediaPath(path); } 74 static const std::string& getConfigPath() { return configPath_s; } 75 static const std::string& getLogPath() { return logPath_s; } 64 76 65 77 // fast access global variables. … … 79 91 void resetLanguageIntern(); 80 92 void initializeRandomNumberGenerator(); 93 void debugLevelChanged(); 94 void languageChanged(); 95 void mediaPathChanged(); 96 void _tsetMediaPath(const std::string& path); 97 98 static void setDevBuild(); 81 99 82 100 int softDebugLevel_; //!< The debug level … … 85 103 int softDebugLevelShell_; //!< The debug level for the ingame shell 86 104 std::string language_; //!< The language 87 bool bInitializeRandomNumberGenerator_; //!< If true, srand(time(0)) is called 105 bool bInitializeRandomNumberGenerator_; //!< If true, srand(time(0)) is called 106 std::string mediaPath_; //!< Path to the data/media file folder 88 107 89 108 static bool bShowsGraphics_s; //!< global variable that tells whether to show graphics … … 93 112 static bool bIsMaster_s; 94 113 114 static bool isDevBuild_s; //!< True for builds in the build directory (not installed) 115 static std::string configPath_s; //!< Path to the config file folder 116 static std::string logPath_s; //!< Path to the log file folder 117 95 118 static Core* singletonRef_s; 96 119 };
Note: See TracChangeset
for help on using the changeset viewer.