OpenASIP
2.0
|
#include <CmdLineOptionParser.hh>
Public Member Functions | |
BoolCmdLineOptionParser (std::string name, std::string desc, std::string alias="", bool hidden=false) | |
virtual | ~BoolCmdLineOptionParser () |
virtual OptionValue * | copy () const |
virtual bool | parseValue (std::string arguments, std::string prefix) |
virtual bool | isFlagOn () const |
virtual bool | isFlagOff () const |
Public Member Functions inherited from CmdLineOptionParser | |
CmdLineOptionParser (std::string name, std::string desc, std::string alias, bool hidden=false) | |
virtual | ~CmdLineOptionParser () |
std::string | longName () const |
std::string | shortName () const |
std::string | description () const |
bool | isHidden () |
bool | isDefined () |
virtual int | integer (int index=0) const |
virtual unsigned | unsignedInteger (int index=0) const |
virtual std::string | String (int index=0) const |
virtual double | real () const |
virtual int | listSize () const |
Private Member Functions | |
BoolCmdLineOptionParser (const BoolCmdLineOptionParser &) | |
Copying not allowed. More... | |
BoolCmdLineOptionParser & | operator= (const BoolCmdLineOptionParser &) |
Assignment not allowed. More... | |
Private Attributes | |
bool | value_ |
The value of option. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from CmdLineOptionParser | |
void | setDefined () |
CmdLineOptionParser that has a boolean value.
This option is also called 'flag'.
Definition at line 278 of file CmdLineOptionParser.hh.
BoolCmdLineOptionParser::BoolCmdLineOptionParser | ( | std::string | name, |
std::string | desc, | ||
std::string | alias = "" , |
||
bool | hidden = false |
||
) |
Constructor.
name | The name of the option. |
desc | The description of the option. |
alias | The short name of the option. |
Definition at line 591 of file CmdLineOptionParser.cc.
|
virtual |
|
private |
Copying not allowed.
|
virtual |
Copies the option value into a OptionValue object.
Client is responsible of deallocating the memeory reserved for the returned object.
Implements CmdLineOptionParser.
Definition at line 614 of file CmdLineOptionParser.cc.
References value_.
|
virtual |
Returns true if the flag is not set.
WrongSubclass | Is never thrown by this function. |
Reimplemented from CmdLineOptionParser.
Definition at line 666 of file CmdLineOptionParser.cc.
References value_.
|
virtual |
Returns true if the flag is set.
WrongSubclass | Is never thrown by this function. |
Reimplemented from CmdLineOptionParser.
Definition at line 655 of file CmdLineOptionParser.cc.
References value_.
|
private |
Assignment not allowed.
|
virtual |
Parses the value of option.
arguments | The arguments for option. |
prefix | The prefix of option. |
IllegalCommandLine | If the prefix or arguments are invalid. |
Implements CmdLineOptionParser.
Definition at line 628 of file CmdLineOptionParser.cc.
References CmdLineOptionParser::longName(), CmdLineOptionParser::setDefined(), and value_.
|
private |
The value of option.
Definition at line 300 of file CmdLineOptionParser.hh.
Referenced by copy(), isFlagOff(), isFlagOn(), and parseValue().