#include <ArgumentParser.h>
List of all members.
Detailed Description
The argument parser parses the input parameters of an application (command line parameters). It groups them into param=value pairs.
Constructor & Destructor Documentation
| TArgumentParser::TArgumentParser |
( |
) |
|
Creates an argument parser. The arguments are passed as a string. Note that the delimiter is a simple space
| TArgumentParser::TArgumentParser |
( |
Int |
iArgC, |
|
|
char * |
apArgs[] |
|
) |
| |
Creates an argument parser. The arguments are stored in a char* array. This constructor is normaly used to parse arguments from an application
- Parameters:
-
| iArgC | : Number of arguments |
| apArgs,: | Array of arguments |
| TArgumentParser::TArgumentParser |
( |
Int |
iArgC, |
|
|
wchar_t * |
awcArgs[] |
|
) |
| |
Creates an argument parser. The arguments are stored in a char* array. This constructor is normaly used to parse arguments from an application
- Parameters:
-
| iArgC | : Number of arguments |
| awcArgs,: | Array of arguments |
| TArgumentParser::TArgumentParser |
( |
const TString & |
rInParams, |
|
|
bool |
bNativeCommandLine = false |
|
) |
| |
Creates an argument parser. The arguments are passed as a string. Note that the delimiter is a simple space
- Parameters:
-
| rInParams | : String containing all arguments (space seperated) |
| bNativeCommandLine | : flag if the command line is native (first argument is the application name) |
| TArgumentParser::TArgumentParser |
( |
const IString & |
rInParams, |
|
|
bool |
bNativeCommandLine = false |
|
) |
| |
Creates an argument parser. The arguments are passed as a string. Note that the delimiter is a simple space.
- Parameters:
-
| rInParams | : String containing all arguments (space seperated) |
| bNativeCommandLine | : flag if the command line is native (first argument is the application name) |
| TArgumentParser::~TArgumentParser |
( |
) |
[protected, virtual] |
Destroys the argument parser
Member Function Documentation
| TString zeus::TArgumentParser::getApplicationFile |
( |
) |
const [inline] |
Returns the file name of the application
| TString TArgumentParser::getApplicationMainPath |
( |
) |
const |
Returns the path of the application
| Int zeus::TArgumentParser::getArgumentCount |
( |
) |
const [inline] |
Returns the number of arguments
| TString zeus::TArgumentParser::getArgumentValue |
( |
const IString & |
rArgName ) |
const [inline] |
Returns the argument value if available
- Parameters:
-
| rArgName | : Name of the argument |
- Returns:
- Argument value
| TString zeus::TArgumentParser::getArgumentValue |
( |
const wchar_t * |
pArgName ) |
const [inline] |
Returns the argument value if available
- Parameters:
-
| pArgName | : Name of the argument |
- Returns:
- Argument value
| TString zeus::TArgumentParser::getArgumentValueByIndex |
( |
Int |
iIndex ) |
const [inline] |
Returns the argument value by index
- Parameters:
-
| iIndex | : Index of the argument |
- Returns:
- Argument value
| TString zeus::TArgumentParser::getFirstArgument |
( |
) |
const [inline] |
returns the first argument in the list
| TString zeus::TArgumentParser::getLastArgument |
( |
) |
const [inline] |
returns the last argument in the list
| TString zeus::TArgumentParser::getNextItem |
( |
) |
const [inline] |
returns the next argument name of the list
| bool zeus::TArgumentParser::hasArgument |
( |
const IString & |
rArgName ) |
const [inline] |
checks if an argument has been passed.
- Parameters:
-
| rArgName | : Name of the argument |
- Return values:
-
| true | : Argument has been passed |
| false | : No such argument found |
| bool zeus::TArgumentParser::hasArgument |
( |
const wchar_t * |
pArgName ) |
const [inline] |
checks if an argument has been passed.
- Parameters:
-
| pArgName | : Name of the argument |
- Return values:
-
| true | : Argument has been passed |
| false | : No such argument found |
| bool zeus::TArgumentParser::hasArgumentWithValue |
( |
const wchar_t * |
pArgName ) |
const [inline] |
checks if an argument has been passed with a non empty value.
- Parameters:
-
| pArgName | : Name of the argument |
- Return values:
-
| true | : Argument has been passed |
| false | : No such argument found |
| bool zeus::TArgumentParser::hasArgumentWithValue |
( |
const IString & |
rArgName ) |
const [inline] |
checks if an argument has been passed with a non empty value.
- Parameters:
-
| rArgName | : Name of the argument |
- Return values:
-
| true | : Argument has been passed |
| false | : No such argument found |
| bool zeus::TArgumentParser::hasNextItem |
( |
) |
const [inline] |
checks if there are more arguments
| void zeus::TArgumentParser::resetList |
( |
) |
[inline] |
| void zeus::TArgumentParser::setApplicationFileName |
( |
const IString & |
rFileName ) |
[inline] |
Sets the file name manually. This is necessary if the command line arguments are not directly passed to the argument parser
Member Data Documentation
List of items to check the order.
Map of all parsed name-value pairs.
The documentation for this class was generated from the following files: