iCommandLineParser Struct Reference
[Utilities, Utilities]
A utility class that makes it easier to parse the command line.
More...
#include <iutil/cmdline.h>
Inheritance diagram for iCommandLineParser:

Public Member Functions | |
virtual void | AddName (const char *iName)=0 |
Add a command-line name to the command-line names array. | |
virtual void | AddOption (const char *iName, const char *iValue)=0 |
Add a command-line option to the command-line option array. | |
virtual const char * | GetAppDir ()=0 |
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 ()=0 |
Returns the full path to the application executable. | |
virtual bool | GetBoolOption (const char *iName, bool defaultValue=false)=0 |
Check for a -[no]option toggle. | |
virtual const char * | GetName (size_t iIndex=0) const =0 |
Query filename specified on commandline (that is, without leading '-'). | |
virtual const char * | GetOption (const char *iName, size_t iIndex=0) const =0 |
Query specific commandline option (you can query second etc. such option). | |
virtual const char * | GetResourceDir ()=0 |
Returns the directory in which the application's resources resides. | |
virtual void | Initialize (int argc, const char *const argv[])=0 |
Initialize for the given command line. | |
virtual bool | ReplaceName (const char *iValue, size_t iIndex=0)=0 |
Replace the Nth command-line name with a new value. | |
virtual bool | ReplaceOption (const char *iName, const char *iValue, size_t iIndex=0)=0 |
Replace the Nth command-line option with a new value. | |
virtual void | Reset ()=0 |
Clear all options and names. |
Detailed Description
A utility class that makes it easier to parse the command line.Main creators of instances implementing this interface:
Main ways to get pointers to this interface:
Definition at line 44 of file cmdline.h.
Member Function Documentation
|
Add a command-line name to the command-line names array.
Implemented in csCommandLineParser. |
|
Add a command-line option to the command-line option array.
Implemented in csCommandLineParser. |
|
Returns the directory in which the application executable resides; or the directory in which the Cocoa application wrapper resides on MacOS/X.
Implemented in csCommandLineParser. |
|
Returns the full path to the application executable.
Implemented in csCommandLineParser. |
|
Check for a -[no]option toggle.
The difference to using GetOption() to check for the two possibilities is that this function respects the argument order.
Implemented in csCommandLineParser. |
|
Query filename specified on commandline (that is, without leading '-').
Implemented in csCommandLineParser. |
|
Query specific commandline option (you can query second etc. such option).
Implemented in csCommandLineParser. |
|
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. Implemented in csCommandLineParser. |
|
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(). Implemented in csCommandLineParser. |
|
Replace the Nth command-line name with a new value.
Implemented in csCommandLineParser. |
|
Replace the Nth command-line option with a new value.
Implemented in csCommandLineParser. |
|
Clear all options and names.
Implemented in csCommandLineParser. |
The documentation for this struct was generated from the following file:
- iutil/cmdline.h
Generated for Crystal Space by doxygen 1.4.4