OpenASIP
2.0
|
#include <CmdLineOptionParser.hh>
Public Member Functions | |
RealCmdLineOptionParser (std::string name, std::string desc, std::string alias="") | |
virtual | ~RealCmdLineOptionParser () |
virtual OptionValue * | copy () const |
virtual bool | parseValue (std::string arguments, std::string prefix) |
virtual double | real () 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 bool | isFlagOn () const |
virtual bool | isFlagOff () const |
virtual int | listSize () const |
Private Member Functions | |
RealCmdLineOptionParser (const RealCmdLineOptionParser &) | |
Copying not allowed. More... | |
RealCmdLineOptionParser & | operator= (const RealCmdLineOptionParser &) |
Assignment not allowed. More... | |
Private Attributes | |
double | value_ |
The value of the option. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from CmdLineOptionParser | |
void | setDefined () |
CmdLineOptionParser that has a real value.
Definition at line 246 of file CmdLineOptionParser.hh.
RealCmdLineOptionParser::RealCmdLineOptionParser | ( | std::string | name, |
std::string | desc, | ||
std::string | alias = "" |
||
) |
Constructor.
name | The name of the option. |
desc | The description of the option. |
alias | The short name of the option. |
Definition at line 507 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 529 of file CmdLineOptionParser.cc.
References value_.
|
private |
Assignment not allowed.
|
virtual |
Parses the value of option.
arguments | The arguments of option. |
prefix | The prefix of option. |
IllegalCommandLine | If the argument is erronous. |
Implements CmdLineOptionParser.
Definition at line 543 of file CmdLineOptionParser.cc.
References CmdLineOptionParser::longName(), CmdLineOptionParser::setDefined(), and value_.
|
virtual |
Returns the real value.
WrongSubclass | Is never thrown by this function. |
Reimplemented from CmdLineOptionParser.
Definition at line 576 of file CmdLineOptionParser.cc.
References value_.
|
private |
The value of the option.
Definition at line 266 of file CmdLineOptionParser.hh.
Referenced by copy(), parseValue(), and real().