|
OpenASIP 2.2
|
#include <CmdLineOptionParser.hh>


Public Member Functions | |
| OptionalStringCmdLineOptionParser (std::string name, std::string desc, std::string alias="") | |
| virtual | ~OptionalStringCmdLineOptionParser () |
| virtual OptionValue * | copy () const |
| virtual bool | parseValue (std::string arguments, std::string prefix) |
| virtual std::string | String (int index=0) const |
| 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 double | real () const |
| virtual int | listSize () const |
Private Member Functions | |
| OptionalStringCmdLineOptionParser (const OptionalStringCmdLineOptionParser &) | |
| Copying not allowed. | |
| OptionalStringCmdLineOptionParser & | operator= (const OptionalStringCmdLineOptionParser &) |
| Assignment not allowed. | |
Private Attributes | |
| std::string | value_ |
| The value of the option. | |
| bool | flag_ |
| The flag status. | |
Additional Inherited Members | |
Protected Member Functions inherited from CmdLineOptionParser | |
| void | setDefined () |
CmdLineOptionParser that acts as flag with optional string value.
Definition at line 210 of file CmdLineOptionParser.hh.
| OptionalStringCmdLineOptionParser::OptionalStringCmdLineOptionParser | ( | 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 419 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 439 of file CmdLineOptionParser.cc.
References copy(), and value_.
Referenced by copy().

|
virtual |
Returns true if the flag is not set.
| WrongSubclass | Is never thrown by this function. |
Reimplemented from CmdLineOptionParser.
Definition at line 492 of file CmdLineOptionParser.cc.
References flag_.
|
virtual |
Returns true if the flag is set.
| WrongSubclass | Is never thrown by this function. |
Reimplemented from CmdLineOptionParser.
Definition at line 481 of file CmdLineOptionParser.cc.
References flag_.
|
private |
Assignment not allowed.
|
virtual |
Parses the value of option.
| arguments | The arguments of option. |
| prefix | The prefix of option. |
| IllegalCommandLine | Not thrown. |
Implements CmdLineOptionParser.
Definition at line 453 of file CmdLineOptionParser.cc.
References flag_, CmdLineOptionParser::setDefined(), and value_.

|
virtual |
This implementation should be never called.
| WrongSubclass | Called for a wrong subclass. |
Reimplemented from CmdLineOptionParser.
Definition at line 469 of file CmdLineOptionParser.cc.
|
private |
The flag status.
Definition at line 236 of file CmdLineOptionParser.hh.
Referenced by isFlagOff(), isFlagOn(), and parseValue().
|
private |
The value of the option.
Definition at line 234 of file CmdLineOptionParser.hh.
Referenced by copy(), parseValue(), and String().