OpenASIP
2.0
|
#include <Options.hh>
Public Member Functions | |
Options () | |
virtual | ~Options () |
void | addOptionValue (const string &name, OptionValue *option) |
OptionValue & | optionValue (const string &name, int index=0) |
int | valueCount (const string &name) |
Private Attributes | |
map< string, vector< OptionValue * > > | options_ |
Generic container of option values.
Definition at line 51 of file Options.hh.
Options::Options | ( | ) |
|
virtual |
void Options::addOptionValue | ( | const string & | name, |
OptionValue * | option | ||
) |
Adds one option value to given option.
name | Name of the option. |
option | Value of the option. |
TypeMismatch | If new value's type differ the old ones. |
Definition at line 78 of file Options.cc.
References options_.
Referenced by MachineCanvasOptions::MachineCanvasOptions().
OptionValue & Options::optionValue | ( | const string & | name, |
int | index = 0 |
||
) |
Returns optionValue of the given option.
The index must be given between 0 and the option count where 0 is the latest value.
name | Name of the option. |
index | Index for lists of options. |
OutOfRange | The index is out of range of values. |
KeyNotFound | No option with given name. |
Definition at line 115 of file Options.cc.
References options_, and valueCount().
Referenced by ToggleUnitDetailsCmd::Do(), UnitFigure::drawSelf(), ToggleUnitDetailsCmd::isChecked(), UnitFigure::layoutSelf(), ProximMachineStateWindow::onToggleUnitInfo(), and ProximMachineStateWindow::onUpdateUIEvent().
int Options::valueCount | ( | const string & | name | ) |
Returns the count of optionValues of an option.
name | Name of the option. |
KeyNotFound | No option with given name. |
Definition at line 134 of file Options.cc.
References options_.
Referenced by optionValue().
|
private |
Definition at line 62 of file Options.hh.
Referenced by addOptionValue(), optionValue(), valueCount(), and ~Options().