Rudiments
Public Member Functions | List of all members
commandline Class Reference

Public Member Functions

 commandline (int32_t argc, const char **argv)
 
 ~commandline ()
 
const char * getValue (const char *arg) const
 
bool found (const char *arg) const
 

Detailed Description

The commandline class provides methods for parsing command line arguments.

Constructor & Destructor Documentation

commandline::commandline ( int32_t  argc,
const char **  argv 
)

Creates an instance of the commandline class.

commandline::~commandline ( )

Deletes this instance of the commandline class.

Member Function Documentation

bool commandline::found ( const char *  arg) const

Returns true if "-arg", "--arg" or "--arg=value" was found on the command line and false if it was not found. This is useful for processing command line switches.

const char* commandline::getValue ( const char *  arg) const

Looks for either: -arg value or –arg=value on the command line and returns value.