Changeset 3166 for code/branches/pch/src/core
- Timestamp:
- Jun 14, 2009, 12:43:52 PM (16 years ago)
- Location:
- code/branches/pch/src/core
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/pch/src/core/Core.cc
r3103 r3166 29 29 30 30 /** 31 @file 32 @brief Implementation of the Core class. 31 @file 32 @brief 33 Implementation of the Core singleton with its global variables (avoids boost include) 33 34 */ 34 35 … … 81 82 static boost::filesystem::path logPath_g; //!< Path to the log file folder 82 83 84 //! Static pointer to the singleton 83 85 Core* Core::singletonRef_s = 0; 84 86 … … 472 474 If found it means that this is not an installed run, hence we 473 475 don't write the logs and config files to ~/.orxonox 476 @throws 477 GeneralException 474 478 */ 475 479 void Core::checkDevBuild() … … 532 536 Checks for the log and the config directory and creates them 533 537 if necessary. Otherwise me might have problems opening those files. 538 @throws 539 orxonox::GeneralException if the directory to be created is a file. 534 540 */ 535 541 void Core::createDirectories() 536 542 { 537 543 std::vector<std::pair<boost::filesystem::path, std::string> > directories; 538 directories.push_back(std::pair<boost::filesystem::path, std::string> 539 (boost::filesystem::path(configPath_g), "config")); 540 directories.push_back(std::pair<boost::filesystem::path, std::string> 541 (boost::filesystem::path(logPath_g), "log")); 544 directories.push_back(std::make_pair(boost::filesystem::path(configPath_g), "config")); 545 directories.push_back(std::make_pair(boost::filesystem::path(logPath_g), "log")); 542 546 543 547 for (std::vector<std::pair<boost::filesystem::path, std::string> >::iterator it = directories.begin(); -
code/branches/pch/src/core/Core.h
r3156 r3166 29 29 30 30 /** 31 @file 32 @brief Declaration of the Core class. 33 31 @file 32 @brief 33 Declaration of the Core class. 34 @details 34 35 The Core class is a singleton, only used to configure some variables 35 36 in the core through the config-file. … … 47 48 namespace orxonox 48 49 { 49 //! The Core class is a singleton, only used to configure some config-values. 50 /** 51 @brief 52 The Core class is a singleton used to configure the program basics. 53 @details 54 The class provides information about the media, config and log path. 55 It determines those by the use of platform specific functions. 56 */ 50 57 class _CoreExport Core : public OrxonoxClass 51 58 { 52 59 public: 60 /** 61 @brief 62 Determines the executable path, checks for build directory runs, creates 63 the output directories and sets up the other core library singletons. 64 @throws 65 GeneralException 66 */ 53 67 Core(); 54 68 ~Core(); … … 68 82 static void tsetMediaPath(const std::string& path) 69 83 { assert(singletonRef_s); singletonRef_s->_tsetMediaPath(path); } 84 //! Returns the path to the config files as boost::filesystem::path 70 85 static const boost::filesystem::path& getMediaPath(); 86 //! Returns the path to the config files as boost::filesystem::path 71 87 static const boost::filesystem::path& getConfigPath(); 88 //! Returns the path to the log files as boost::filesystem::path 72 89 static const boost::filesystem::path& getLogPath(); 90 //! Returns the path to the data files as std::string 73 91 static std::string getMediaPathString(); 92 //! Returns the path to the config files as std::string 74 93 static std::string getConfigPathString(); 94 //! Returns the path to the log files as std::string 75 95 static std::string getLogPathString(); 76 96 77 97 private: 78 Core(const Core&); 98 Core(const Core&); //!< Don't use (undefined symbol) 79 99 80 100 void checkDevBuild();
Note: See TracChangeset
for help on using the changeset viewer.