RADLib
RADical C++ application framework
RADCLI::CommandLineParser Class Reference

Small command-line parser for RADLib tools and examples. More...

#include <RADCLI.h>

Public Member Functions

 CommandLineParser (std::string applicationName={})
 Creates a parser for applicationName. More...
 
void setDescription (std::string description)
 Sets a short application description. More...
 
void addOption (Option option)
 Adds an option. More...
 
ParseResult parse (int argc, char **argv) const
 Parses argc/argv. More...
 
ParseResult parse (const std::vector< std::string > &args) const
 Parses vector arguments where args[0] is the program name. More...
 
std::string helpText () const
 Builds help text. More...
 

Detailed Description

Small command-line parser for RADLib tools and examples.

Constructor & Destructor Documentation

◆ CommandLineParser()

RADCLI::CommandLineParser::CommandLineParser ( std::string  applicationName = {})
explicit

Creates a parser for applicationName.

Member Function Documentation

◆ addOption()

void RADCLI::CommandLineParser::addOption ( Option  option)

Adds an option.

◆ helpText()

std::string RADCLI::CommandLineParser::helpText ( ) const

Builds help text.

◆ parse() [1/2]

ParseResult RADCLI::CommandLineParser::parse ( const std::vector< std::string > &  args) const

Parses vector arguments where args[0] is the program name.

◆ parse() [2/2]

ParseResult RADCLI::CommandLineParser::parse ( int  argc,
char **  argv 
) const

Parses argc/argv.

◆ setDescription()

void RADCLI::CommandLineParser::setDescription ( std::string  description)

Sets a short application description.


The documentation for this class was generated from the following file: