OpenASIP
2.0
|
#include <CmdLineOptionParser.hh>
Public Member Functions | |
IntegerListCmdLineOptionParser (std::string name, std::string desc, std::string alias="") | |
virtual | ~IntegerListCmdLineOptionParser () |
virtual OptionValue * | copy () const |
virtual bool | parseValue (std::string arguments, std::string prefix) |
virtual int | integer (int index=0) const |
virtual int | listSize () 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 unsigned | unsignedInteger (int index=0) const |
virtual std::string | String (int index=0) const |
virtual double | real () const |
virtual bool | isFlagOn () const |
virtual bool | isFlagOff () const |
Private Member Functions | |
IntegerListCmdLineOptionParser (const IntegerListCmdLineOptionParser &) | |
Copying not allowed. More... | |
IntegerListCmdLineOptionParser & | operator= (const IntegerListCmdLineOptionParser &) |
Assignment not allowed. More... | |
Private Attributes | |
std::vector< int > | values_ |
The values in integer list. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from CmdLineOptionParser | |
void | setDefined () |
CmdLineOptionParser that has a list of integers as value.
Definition at line 310 of file CmdLineOptionParser.hh.
IntegerListCmdLineOptionParser::IntegerListCmdLineOptionParser | ( | 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 681 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 703 of file CmdLineOptionParser.cc.
References values_.
|
virtual |
Returns a particular value of integer list option.
index | The index of list element that is wanted. |
WrongSubclass | Is never thrown by this function. |
Reimplemented from CmdLineOptionParser.
Definition at line 772 of file CmdLineOptionParser.cc.
|
virtual |
Returns the number of list elements.
WrongSubclass | Is never thrown by this function. |
Reimplemented from CmdLineOptionParser.
Definition at line 784 of file CmdLineOptionParser.cc.
References values_.
|
private |
Assignment not allowed.
|
virtual |
Parses the value of integer set.
Value should be integers separated by commas.
arguments | The arguments of option. |
prefix | The prefix of option. |
IllegalCommandLine | If argument is invalid. |
Implements CmdLineOptionParser.
Definition at line 719 of file CmdLineOptionParser.cc.
References CmdLineOptionParser::longName(), CmdLineOptionParser::setDefined(), and values_.
|
private |
The values in integer list.
Definition at line 333 of file CmdLineOptionParser.hh.
Referenced by copy(), integer(), listSize(), parseValue(), and ~IntegerListCmdLineOptionParser().