|
Documentation for OpenFLUID
2.2.0
|
#include <utils/StructuredCommandLineParser.hpp>
Public Member Functions | |
| StructuredCommandLineParser (const std::string &ProgramName, const std::string &HelpText, const std::vector< CommandLineSection * > &CommandSections) | |
| void | addCommandSection (CommandLineSection *CommandSection) |
| void | addCommandSections (const std::vector< CommandLineSection * > &CommandSections) |
| void | addCommand (const CommandLineCommand &Command, CommandLineSection *CommandSection=nullptr) |
| void | printHelp (std::ostream &OutStm) |
Public Member Functions inherited from openfluid::utils::CommandLineParser | |
| CommandLineParser () | |
| CommandLineParser (const std::string &ProgramName, const std::string &HelpText, bool UseCustomOrder=false) | |
| const std::vector< std::string > & | extraArgs () const |
| const std::vector< std::string > & | thirdPartyArgs () const |
| std::string | getHelpText () const |
| std::string | getProgramName () const |
| std::string | getParsingMessage () const |
| std::string | getActiveCommand () const |
| const CommandLineCommand & | command (const std::string &Name) const |
| void | addCommand (const CommandLineCommand &Command) |
| void | addOption (const CommandLineOption &Option) |
| bool | parse (std::list< std::string > ArgValues) |
| bool | parse (int ArgC, char **ArgV) |
| void | reset () |
| bool | isHelpAsked () |
| void | printHelp (std::ostream &OutStm) |
| void | printState (std::ostream &OutStm) |
Additional Inherited Members | |
Protected Member Functions inherited from openfluid::utils::CommandLineParser | |
| int | getLargestCommandLength () |
| int | getLargestOptionLength () |
| std::string | getCustomIndent (int CommandLength, int LargestCommandLength, std::string minimalSpace=" ") |
| CommandLineOption | getHelpOption () |
| void | displayFormattedData (std::ostream &OutStm, std::string Title, std::string HelpText, int LargestTextLength) |
| void | displayOptions (std::ostream &OutStm, CommandLineOption HelpOption, int LargestTextLength) |
| std::string | getArgsDisplay () |
| void | displayUsageMessage (std::ostream &OutStm) |
Protected Attributes inherited from openfluid::utils::CommandLineParser | |
| std::string | m_ProgramName |
| std::string | m_HelpText |
| std::map< std::string, CommandLineCommand > | m_Commands |
| std::vector< CommandLineCommand > | m_CommandsOrdered |
| std::string | m_ActiveCommand |
| const std::string | m_AvailableCommandsText |


|
inline |
Instanciates a command line parser with the given parameters
| [in] | ProgramName | The name of the programn |
| [in] | HelpText | The help text associated to the option |
| [in] | CommandSections | List of commands section |
|
inline |
Adds a command. Can add a command to a command section
| [in] | Command | The command to add |
| [in] | CommandSection | The section to add the command. Can be null |
|
inline |
Adds a command section to the parser
| [in] | CommandSection | The command section to add |
|
inline |
Adds a command section to the parser
| [in] | CommandSections | The command section to add |
|
inline |
Prints the help text
| [in] | OutStm | The stream where the help text is printed (e.g. std::cout) |