Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Sep 5, 2010, 6:50:17 PM (14 years ago)
Author:
rgrieder
Message:

Changed command line arguments reference to a simple Doxygen page containing the usage information text.

Location:
code/branches/doc/src/libraries/core
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • code/branches/doc/src/libraries/core/CommandLineParser.cc

    r7335 r7357  
    4141namespace orxonox
    4242{
    43     //! @cmdarg
    4443    SetCommandLineOnlyArgument(optionsFile, "start.ini").shortcut("o");
    4544
     
    315314    }
    316315
     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
    317325    /**
    318326    @brief
     
    320328        The method throws an exception if 'name' was not found or the value could not be converted.
    321329    @note
    322         You shold 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.
    323331    */
    324332    const CommandLineArgument* CommandLineParser::getArgument(const std::string& name)
  • code/branches/doc/src/libraries/core/CommandLineParser.h

    r7303 r7357  
    3232#include "CorePrereqs.h"
    3333
     34#include <fstream>
    3435#include <map>
    3536#include "util/OrxAssert.h"
     
    164165
    165166        static void destroyAllArguments();
     167
     168        static void generateDoc(std::ofstream& file);
    166169
    167170    private:
  • code/branches/doc/src/libraries/core/Core.cc

    r7335 r7357  
    3737
    3838#include <cassert>
     39#include <fstream>
    3940#include <vector>
    4041
     
    7778    Core* Core::singletonPtr_s  = 0;
    7879
    79     //! @cmdarg
    8080    SetCommandLineArgument(settingsFile, "orxonox.ini").information("THE configuration file");
    81     //! @cmdarg
    8281    SetCommandLineSwitch(noIOConsole).information("Use this if you don't want to use the IOConsole (for instance for Lua debugging)");
    8382
    8483#ifdef ORXONOX_PLATFORM_WINDOWS
    85     //! @cmdarg
    8684    SetCommandLineArgument(limitToCPU, 1).information("Limits the program to one CPU/core (1, 2, 3, etc.). Default is the first core (faster than off)");
    8785#endif
     
    174172        // Create singletons that always exist (in other libraries)
    175173        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        }
    176189    }
    177190
  • code/branches/doc/src/libraries/core/Core.h

    r7266 r7357  
    3333#include "CorePrereqs.h"
    3434
    35 #include <cassert>
    3635#include <string>
    3736#include <boost/scoped_ptr.hpp>
  • code/branches/doc/src/libraries/core/PathConfig.cc

    r7335 r7357  
    7070    PathConfig* PathConfig::singletonPtr_s  = 0;
    7171
    72     //! @cmdarg
    7372    SetCommandLineArgument(externalDataPath, "").information("Path to the external data files");
    74     //! @cmdarg
    7573    SetCommandLineOnlyArgument(writingPathSuffix, "").information("Additional subfolder for config and log files");
    7674
  • code/branches/doc/src/libraries/core/input/InputManager.cc

    r7335 r7357  
    6060namespace orxonox
    6161{
    62     //! @cmdarg
    6362    SetCommandLineSwitch(keyboard_no_grab).information("Whether not to exclusively grab the keyboard");
    6463
Note: See TracChangeset for help on using the changeset viewer.