csCommandLineParser Class Reference
Utility class that makes it easier to parse the command line. More...
#include <csutil/cmdline.h>
Inheritance diagram for csCommandLineParser:

Public Member Functions | |
virtual void | AddName (const char *iName) |
Add a command-line name to the command-line names array. | |
virtual void | AddOption (const char *iName, const char *iValue) |
Add a command-line option to the command-line option array. | |
csCommandLineParser (int argc, const char *const argv[]) | |
Construct with a given command line. | |
csCommandLineParser (iBase *Parent=0) | |
Constructor. | |
virtual const char * | GetAppDir () |
Returns the directory in which the application executable resides; or the directory in which the Cocoa application wrapper resides on MacOS/X. | |
virtual const char * | GetAppPath () |
Returns the full path to the application executable. | |
virtual bool | GetBoolOption (const char *iName, bool defaultValue=false) |
Check for a -[no]option toggle. | |
virtual const char * | GetName (size_t iIndex=0) const |
Query filename specified on commandline (that is, without leading '-'). | |
virtual const char * | GetOption (const char *iName, size_t iIndex=0) const |
Query specific commandline option (you can query second etc. such option). | |
virtual const char * | GetResourceDir () |
Returns the directory in which the application's resources resides. | |
virtual void | Initialize (int argc, const char *const argv[]) |
Initialize for the given command line. | |
virtual bool | ReplaceName (const char *iValue, size_t iIndex=0) |
Replace the Nth command-line name with a new value. | |
virtual bool | ReplaceOption (const char *iName, const char *iValue, size_t iIndex=0) |
Replace the Nth command-line option with a new value. | |
virtual void | Reset () |
Clear all options and names. | |
virtual | ~csCommandLineParser () |
Destructor. |
Detailed Description
Utility class that makes it easier to parse the command line.
Definition at line 53 of file cmdline.h.
Constructor & Destructor Documentation
|
Constructor.
|
|
Construct with a given command line.
|
|
Destructor.
|
Member Function Documentation
|
Add a command-line name to the command-line names array.
Implements iCommandLineParser. |
|
Add a command-line option to the command-line option array.
Implements iCommandLineParser. |
|
Returns the directory in which the application executable resides; or the directory in which the Cocoa application wrapper resides on MacOS/X.
Implements iCommandLineParser. |
|
Returns the full path to the application executable.
Implements iCommandLineParser. |
|
Check for a -[no]option toggle.
Implements iCommandLineParser. |
|
Query filename specified on commandline (that is, without leading '-').
Implements iCommandLineParser. |
|
Query specific commandline option (you can query second etc. such option).
Implements iCommandLineParser. |
|
Returns the directory in which the application's resources resides. On many platforms, this may be the same as the directory returned by GetAppDir(); however, on MacOS/X, it is the "Resources" directory within the Cocoa application wrapper. Implements iCommandLineParser. |
|
Initialize for the given command line. Options from command line are added to any options already present --- i.e. those added via AddName() or AddOption(). Implements iCommandLineParser. |
|
Replace the Nth command-line name with a new value.
Implements iCommandLineParser. |
|
Replace the Nth command-line option with a new value.
Implements iCommandLineParser. |
|
Clear all options and names.
Implements iCommandLineParser. |
The documentation for this class was generated from the following file:
- csutil/cmdline.h
Generated for Crystal Space by doxygen 1.4.6