Changeset 7357 for code/branches/doc/src/libraries/core
- Timestamp:
- Sep 5, 2010, 6:50:17 PM (14 years ago)
- Location:
- code/branches/doc/src/libraries/core
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/doc/src/libraries/core/CommandLineParser.cc
r7335 r7357 41 41 namespace orxonox 42 42 { 43 //! @cmdarg44 43 SetCommandLineOnlyArgument(optionsFile, "start.ini").shortcut("o"); 45 44 … … 315 314 } 316 315 316 void CommandLineParser::generateDoc(std::ofstream& file) 317 { 318 file << "/** @page cmdargspage Command Line Arguments Reference" << endl; 319 file << " @verbatim"; /*no endl*/ 320 file << getUsageInformation(); /*no endl*/ 321 file << " @endverbatim" << endl; 322 file << "*/" << endl; 323 } 324 317 325 /** 318 326 @brief … … 320 328 The method throws an exception if 'name' was not found or the value could not be converted. 321 329 @note 322 You sho ld of course not call this method before the command line has been parsed.330 You should of course not call this method before the command line has been parsed. 323 331 */ 324 332 const CommandLineArgument* CommandLineParser::getArgument(const std::string& name) -
code/branches/doc/src/libraries/core/CommandLineParser.h
r7303 r7357 32 32 #include "CorePrereqs.h" 33 33 34 #include <fstream> 34 35 #include <map> 35 36 #include "util/OrxAssert.h" … … 164 165 165 166 static void destroyAllArguments(); 167 168 static void generateDoc(std::ofstream& file); 166 169 167 170 private: -
code/branches/doc/src/libraries/core/Core.cc
r7335 r7357 37 37 38 38 #include <cassert> 39 #include <fstream> 39 40 #include <vector> 40 41 … … 77 78 Core* Core::singletonPtr_s = 0; 78 79 79 //! @cmdarg80 80 SetCommandLineArgument(settingsFile, "orxonox.ini").information("THE configuration file"); 81 //! @cmdarg82 81 SetCommandLineSwitch(noIOConsole).information("Use this if you don't want to use the IOConsole (for instance for Lua debugging)"); 83 82 84 83 #ifdef ORXONOX_PLATFORM_WINDOWS 85 //! @cmdarg86 84 SetCommandLineArgument(limitToCPU, 1).information("Limits the program to one CPU/core (1, 2, 3, etc.). Default is the first core (faster than off)"); 87 85 #endif … … 174 172 // Create singletons that always exist (in other libraries) 175 173 this->rootScope_.reset(new Scope<ScopeID::Root>()); 174 175 // Generate documentation instead of normal run? 176 std::string docFilename; 177 CommandLineParser::getValue("generateDoc", &docFilename); 178 if (!docFilename.empty()) 179 { 180 std::ofstream docFile(docFilename.c_str()); 181 if (docFile.is_open()) 182 { 183 CommandLineParser::generateDoc(docFile); 184 docFile.close(); 185 } 186 else 187 COUT(0) << "Error: Could not open file for documentation writing" << endl; 188 } 176 189 } 177 190 -
code/branches/doc/src/libraries/core/Core.h
r7266 r7357 33 33 #include "CorePrereqs.h" 34 34 35 #include <cassert>36 35 #include <string> 37 36 #include <boost/scoped_ptr.hpp> -
code/branches/doc/src/libraries/core/PathConfig.cc
r7335 r7357 70 70 PathConfig* PathConfig::singletonPtr_s = 0; 71 71 72 //! @cmdarg73 72 SetCommandLineArgument(externalDataPath, "").information("Path to the external data files"); 74 //! @cmdarg75 73 SetCommandLineOnlyArgument(writingPathSuffix, "").information("Additional subfolder for config and log files"); 76 74 -
code/branches/doc/src/libraries/core/input/InputManager.cc
r7335 r7357 60 60 namespace orxonox 61 61 { 62 //! @cmdarg63 62 SetCommandLineSwitch(keyboard_no_grab).information("Whether not to exclusively grab the keyboard"); 64 63
Note: See TracChangeset
for help on using the changeset viewer.