#include <mcllib/MCGetOpt.h>
Inheritance diagram for MCGetOpt:
Public Member Functions | |
MCVariantType | get (const MCString &optStr) const |
Get the value of an option. | |
mcintn | getArgc () const |
Get the unused arguments of the argv array passed to the constructor. | |
bool | has (const MCString &optStr) const |
Check to see if an option was present in the command line. | |
MCGetOpt (mcintn argc, const char **argv, const MCString &optSpec) | |
Create a new GetOpt command line processor. |
The options that are to be supported are passed in a string using the getopt(3) convention. The command line options made available to the application in argc/argv are presented to a GetOpt object to parse. Options can be tested for their presence using the has() method. The value of an option can be obtained using the get() method.
|
Create a new GetOpt command line processor. If the command line specified by the arguments cannot be parsed, an exception is thrown. This should prompt the application to issue a "usage:" message.
|
|
Get the value of an option.
|
|
Get the unused arguments of the argv array passed to the constructor.
|
|
Check to see if an option was present in the command line.
|