Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Sep 4, 2010, 1:10:43 AM (14 years ago)
Author:
rgrieder
Message:

Added "doc_internal" target. It generates additional documentation from the executable.
That enables to gather information at run time (e.g. SetConsoleCommand, SetCommandLineArgument, registerNetworkFunction, etc.) and then write useful Doxygen documentation to one file.
Currently there is no implementation, just a stub in src/orxonox/Main.cc that can be extended.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/doc/src/orxonox/Main.cc

    r7335 r7346  
    6161    SetCommandLineSwitch(dedicatedClient).information("Start in dedicated client mode");
    6262
     63    //! @cmdarg
     64    SetCommandLineArgument(generateDoc, "Internal.dox")
     65        .information("Generates a Doxygen file from things like SetConsoleCommand");
     66
    6367    /**
    6468    @brief
     
    6973        Game* game = new Game(strCmdLine);
    7074
    71         game->setStateHierarchy(
    72         "root"
    73         " graphics"
    74         "  mainMenu"
    75         "  standalone,server,client"
    76         "   level"
    77         " server,client"
    78         "  level"
    79         );
    80 
    81         game->requestState("root");
    82 
    83         // Some development hacks (not really, but in the future, this calls won't make sense anymore)
    84         if (CommandLineParser::getValue("standalone").getBool())
    85             Game::getInstance().requestStates("graphics, standalone, level");
    86         else if (CommandLineParser::getValue("server").getBool())
    87             Game::getInstance().requestStates("graphics, server, level");
    88         else if (CommandLineParser::getValue("client").getBool())
    89             Game::getInstance().requestStates("graphics, client, level");
    90         else if (CommandLineParser::getValue("dedicated").getBool())
    91             Game::getInstance().requestStates("server, level");
    92         else if (CommandLineParser::getValue("dedicatedClient").getBool())
    93             Game::getInstance().requestStates("client, level");
     75        if (CommandLineParser::existsArgument("generateDoc"))
     76        {
     77            // Generate additional documentation written to ONE file
     78            std::string filename;
     79            CommandLineParser::getValue("generateDoc", &filename);
     80        }
    9481        else
    9582        {
    96             if (!CommandLineParser::getValue("console").getBool())
    97                 Game::getInstance().requestStates("graphics, mainMenu");
     83            game->setStateHierarchy(
     84            "root"
     85            " graphics"
     86            "  mainMenu"
     87            "  standalone,server,client"
     88            "   level"
     89            " server,client"
     90            "  level"
     91            );
     92
     93            game->requestState("root");
     94
     95            // Some development hacks (not really, but in the future, this calls won't make sense anymore)
     96            if (CommandLineParser::getValue("standalone").getBool())
     97                Game::getInstance().requestStates("graphics, standalone, level");
     98            else if (CommandLineParser::getValue("server").getBool())
     99                Game::getInstance().requestStates("graphics, server, level");
     100            else if (CommandLineParser::getValue("client").getBool())
     101                Game::getInstance().requestStates("graphics, client, level");
     102            else if (CommandLineParser::getValue("dedicated").getBool())
     103                Game::getInstance().requestStates("server, level");
     104            else if (CommandLineParser::getValue("dedicatedClient").getBool())
     105                Game::getInstance().requestStates("client, level");
     106            else
     107            {
     108                if (!CommandLineParser::getValue("console").getBool())
     109                    Game::getInstance().requestStates("graphics, mainMenu");
     110            }
     111
     112            game->run();
    98113        }
    99114
    100         game->run();
    101115        delete game;
    102116
Note: See TracChangeset for help on using the changeset viewer.