HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
arguments

Functions

int ArgParse::parse_args (int argc, const char **argv)
 
bool ArgParse::has_error () const
 Is there a pending error message waiting to be retrieved? More...
 
std::string ArgParse::geterror (bool clear=true) const
 
std::string ArgParse::prog_name () const
 
void ArgParse::print_help () const
 
void ArgParse::briefusage () const
 
std::string ArgParse::command_line () const
 Return the entire command-line as one string. More...
 

Detailed Description

Function Documentation

void ArgParse::briefusage ( ) const

Print a brief usage message to stdout. The usage message is generated and formatted automatically based on the arguments declared.

std::string ArgParse::command_line ( ) const

Return the entire command-line as one string.

std::string ArgParse::geterror ( bool  clear = true) const

Return any error messages generated during the course of parse() (and by default, clear any error flags). If no error has occurred since the last time geterror() was called, it will return an empty string.

bool ArgParse::has_error ( ) const

Is there a pending error message waiting to be retrieved?

int ArgParse::parse_args ( int  argc,
const char **  argv 
)

With the options already set up, parse the command line. Return 0 if ok, -1 if it's a malformed command line.

void ArgParse::print_help ( ) const

Print the full help message to stdout. The usage message is generated and formatted automatically based on the arguments declared.

std::string ArgParse::prog_name ( ) const

Return the name of the program. This will be either derived from the original command line that launched this application, or else overridden by a prior call to prog().