This class parse command line arguments with the ability to override them from a PConfig file/registry
Inheritance:
Public Methods
| Overrides from class PArgList
|
Public Methods
-
Construction
-
Overrides from class PObject
-
Setting & Parsing
-
Getting parsed arguments
-
Errors
Protected Fields
-
PStringArray argumentArray
-
PString optionLetters
-
PStringArray optionNames
-
PIntArray optionCount
-
PStringArray optionString
-
PIntArray parameterIndex
-
int shift
Inherited from PObject:
Public Methods
-
Run Time Type functions
-
I/O functions
-
Miscellaneous functions
Public Members
-
Comparison functions
Documentation
This class parse command line arguments with the ability to override them
from a PConfig file/registry
Construction
Overrides from class PArgList
void Save( const PString & optionName )
- Save the current options to the PConfig.
This function will check to see if the option name is present and if
so, save to the PConfig all of the arguments present in the currently
parsed list. Note that the optionName for saving is not saved to the
PConfig itself as this would cause the data to be saved always!
- Parameters:
- optionName - Option name for saving.
void SetSectionName( const PString & section )
- Set the PConfig section name for options.
- Parameters:
- section - New section name
const PString& GetSectionName() const
- Get the PConfig section name for options
void SetNegationPrefix( const PString & prefix )
- Set the prefix for option negation.
The default is "no-".
- Parameters:
- prefix - New prefix string
const PString& GetNegationPrefix() const
- Get the prefix for option negation.
The default is "no-".
virtual PINDEX GetOptionCount( char optionChar ) const
- Get the count of the number of times the option was specified on the
command line.
- Parameters:
- optionChar - Character letter code for the option
- Returns:
- option repeat count.
virtual PINDEX GetOptionCount( const char* optionStr ) const
- Get the count of option
- Parameters:
- optionStr - String code for the option
virtual PINDEX GetOptionCount( const PString & optionName ) const
- Get the count of option
- Parameters:
- optionName - String code for the option
virtual PString GetOptionString( char optionChar, const char* dflt = NULL ) const
- Get option string.
Gets the string associated with an option e.g. -ofile or -o file
would return the string "file". An option may have an associated string
if it had a ':' character folowing it in the specification string passed
to the Parse() function.
- Parameters:
- optionChar - Character letter code for the option
dflt - Default value of the option string
- Returns:
- the options associated string.
virtual PString GetOptionString( const char* optionStr, const char* dflt = NULL ) const
- Get option string.
- Parameters:
- optionStr - String letter code for the option
dflt - Default value of the option string
virtual PString GetOptionString( const PString & optionName, const char* dflt = NULL ) const
- Get option string.
- Parameters:
- optionName - String code for the option
dflt - Default value of the option string
- This class has no child classes.
Alphabetic index HTML hierarchy of classes or Java
This page was generated with the help of DOC++.