- Timestamp:
- Sep 5, 2010, 6:50:17 PM (14 years ago)
- Location:
- code/branches/doc
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/doc/doc/api/CMakeLists.txt
r7356 r7357 55 55 OUTPUT ${INTERNAL_DOCFILE} 56 56 COMMAND orxonox-main 57 ARGS --noIOConsole --generateDoc --docFile${INTERNAL_DOCFILE}57 ARGS --noIOConsole --generateDoc ${INTERNAL_DOCFILE} 58 58 WORKING_DIRECTORY ${_working_dir} 59 59 COMMENT "Generating additional Doxygen documentation from Orxonox executable" -
code/branches/doc/doc/api/Groups.dox
r7335 r7357 61 61 @defgroup CmdArgs Commandline Arguments 62 62 @ingroup Command 63 @brief For a reference see @ref cmdargs 63 @brief For a reference see @ref cmdargspage 64 64 */ 65 65 -
code/branches/doc/doc/api/doxy.config.in
r7356 r7357 191 191 # You can put \n's in the value part of an alias to insert newlines. 192 192 193 ALIASES = "cmdarg=\xrefitem cmdargs \"Commandline Argment\" \"Commandline Arguments Reference\""193 ALIASES = 194 194 195 195 # Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C -
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 -
code/branches/doc/src/orxonox/LevelManager.cc
r7335 r7357 42 42 namespace orxonox 43 43 { 44 //! @cmdarg45 44 SetCommandLineArgument(level, "").shortcut("l").information("Default level file (overrides LevelManager::defaultLevelName_ configValue)"); 46 45 -
code/branches/doc/src/orxonox/Main.cc
r7353 r7357 48 48 namespace orxonox 49 49 { 50 //! @cmdarg51 50 SetCommandLineSwitch(console).information("Start in console mode (text IO only)"); 52 //! @cmdarg53 51 SetCommandLineSwitch(server).information("Start in server mode"); 54 //! @cmdarg55 52 SetCommandLineSwitch(client).information("Start in client mode"); 56 //! @cmdarg57 53 SetCommandLineSwitch(dedicated).information("Start in dedicated server mode"); 58 //! @cmdarg59 54 SetCommandLineSwitch(standalone).information("Start in standalone mode"); 60 //! @cmdarg61 55 SetCommandLineSwitch(dedicatedClient).information("Start in dedicated client mode"); 62 56 63 //! @cmdarg 64 SetCommandLineSwitch(generateDoc) 57 SetCommandLineArgument(generateDoc, "") 65 58 .information("Generates a Doxygen file from things like SetConsoleCommand"); 66 //! @cmdarg67 SetCommandLineArgument(docFile, "Internal.dox")68 .information("Name of the doc file to be generated with --generateDoc");69 59 70 60 /** … … 76 66 Game* game = new Game(strCmdLine); 77 67 78 if (CommandLineParser::getValue("generateDoc").getBool()) 79 { 80 // Generate additional documentation written to ONE file 81 std::string filename; 82 CommandLineParser::getValue("docFile", &filename); 83 } 84 else 68 if (CommandLineParser::getValue("generateDoc").getString().empty()) 85 69 { 86 70 game->setStateHierarchy( … … 96 80 game->requestState("root"); 97 81 98 // Some development hacks (not really, but in the future, th iscalls won't make sense anymore)82 // Some development hacks (not really, but in the future, these calls won't make sense anymore) 99 83 if (CommandLineParser::getValue("standalone").getBool()) 100 84 Game::getInstance().requestStates("graphics, standalone, level"); -
code/branches/doc/src/orxonox/gamestates/GSClient.cc
r7335 r7357 40 40 DeclareGameState(GSClient, "client", false, false); 41 41 42 //! @cmdarg43 42 SetCommandLineArgument(dest, "127.0.0.1").information("Server hostname/IP (IP in the form of #.#.#.#)"); 44 43 -
code/branches/doc/src/orxonox/gamestates/GSServer.cc
r7335 r7357 39 39 DeclareGameState(GSServer, "server", false, false); 40 40 41 //! @cmdarg42 41 SetCommandLineArgument(port, 55556).shortcut("p").information("Network communication port to be used 0-65535 (default: 55556)"); 43 42
Note: See TracChangeset
for help on using the changeset viewer.