#include <CmdOption.h>
This class defines an option for the command line. If you need special command line arguments/options, you have to create a new children of this class.
- Author
- Ronan Collobert (collo.nosp@m.ber@.nosp@m.idiap.nosp@m..ch)
- See Also
- CmdLine
CmdOption::CmdOption |
( |
const char * |
name_, |
|
|
const char * |
type_name_, |
|
|
const char * |
help_ = "" , |
|
|
bool |
save_ = false |
|
) |
| |
CmdOption::~CmdOption |
( |
| ) |
|
|
virtual |
void CmdOption::initValue |
( |
| ) |
|
|
virtual |
bool CmdOption::isArgument |
( |
bool |
set_ = false | ) |
|
Returns true if it's a required argument. If #set_# is true, set it to a required argument.
bool CmdOption::isCurrent |
( |
int * |
argc_, |
|
|
char *** |
argv_ |
|
) |
| |
bool CmdOption::isMasterSwitch |
( |
bool |
set_ = false | ) |
|
Returns true if it's a master switch. If #set_# is true, set it to a master switch.
bool CmdOption::isOption |
( |
bool |
set_ = false | ) |
|
Returns true if it's an optional argument. If #set_# is true, set it to an optional argument.
bool CmdOption::isText |
( |
bool |
set_ = false | ) |
|
Returns true if it's just text to be displayed in the command line. If #set_# is true, set it to text mode.
virtual void CmdOption::load |
( |
DiskXFile * |
file | ) |
|
|
inlinevirtual |
void CmdOption::printValue |
( |
DiskXFile * |
file_ | ) |
|
|
virtual |
void CmdOption::read |
( |
int * |
argc_, |
|
|
char *** |
argv_ |
|
) |
| |
|
virtual |
virtual void CmdOption::save |
( |
DiskXFile * |
file | ) |
|
|
inlinevirtual |
An help string. Cannot be NULL.
bool CmdOption::is_argument |
|
private |
bool CmdOption::is_master_switch |
|
private |
bool CmdOption::is_option |
|
private |
bool CmdOption::is_setted |
True is the option has been setted after reading the command-line.
bool CmdOption::needsSave |
True is the option has to be saved when saving the command line.
char* CmdOption::type_name |
The documentation for this class was generated from the following files: