Elm
1.0
ELM is a library providing generic data structures, OS-independent interface, plugins and XML.
|
#include <elm/option/ListOption.h>
Public Member Functions | |
ListOption (Manager &man, int tag,...) | |
ListOption (Manager &man, int tag, VarArg &args) | |
ListOption (const Make &make) | |
const T & | get (int index) const |
void | set (int index, const T &value) |
T & | ref (int index) |
void | add (const T &val) |
void | remove (int index) |
int | count (void) const |
operator bool (void) const | |
const T & | operator[] (int index) const |
T & | operator[] (int index) |
virtual void | process (String arg) |
Public Member Functions inherited from elm::option::AbstractValueOption | |
AbstractValueOption (const Make &make) | |
AbstractValueOption (Manager &man) | |
AbstractValueOption (Manager &man, int tag,...) | |
AbstractValueOption (Manager &man, int tag, VarArg &args) | |
virtual cstring | description (void) |
virtual usage_t | usage (void) |
virtual cstring | argDescription (void) |
Public Member Functions inherited from elm::option::Option | |
Option (void) | |
Option (const Make &make) | |
virtual | ~Option (void) |
void | output (io::Output &out) |
virtual char | shortName (void) |
virtual CString | longName (void) |
Additional Inherited Members | |
Protected Member Functions inherited from elm::option::AbstractValueOption | |
virtual void | configure (Manager &manager, int tag, VarArg &args) |
Protected Member Functions inherited from elm::option::Option | |
void | init (Manager &manager, int tag,...) |
void | init (Manager &manager, int tag, VarArg &args) |
Protected Attributes inherited from elm::option::Option | |
cstring | desc |
Option that accepts a list of value, that is, accepts several command and their linked argument.
T | Type of arguments. |
elm::option::ListOption< T >::ListOption | ( | Manager & | man, |
int | tag, | ||
... | |||
) |
man | Owner manager. |
tag | First tag. |
... | (tag, value) pair list (ended by end). |
References elm::option::Option::init().
elm::option::ListOption< T >::ListOption | ( | Manager & | man, |
int | tag, | ||
VarArg & | args | ||
) |
man | Owner manager. |
tag | First tag. |
args | (tag, value) pair list (ended by end). |
elm::option::ListOption< T >::ListOption | ( | const Make & | make | ) |
void elm::option::ListOption< T >::add | ( | const T & | val | ) |
Add a value to the list.
val | Value to add. |
int elm::option::ListOption< T >::count | ( | void | ) | const |
Get the count of values.
const T & elm::option::ListOption< T >::get | ( | int | index | ) | const |
Get the value at the given index.
index | Index of the requested value. |
elm::option::ListOption< T >::operator bool | ( | void | ) | const |
const T& elm::option::ListOption< T >::operator[] | ( | int | index | ) | const |
T& elm::option::ListOption< T >::operator[] | ( | int | index | ) |
|
virtual |
This method is called by the option manager when the option is encountered.
arg | If the option requires an argument, the value of the argument. |
Implements elm::option::Option.
T & elm::option::ListOption< T >::ref | ( | int | index | ) |
Get reference on a value.
index | Index of value to get reference for. |
void elm::option::ListOption< T >::remove | ( | int | index | ) |
Remove value at the given index.
index | Index of the value to remove. |
void elm::option::ListOption< T >::set | ( | int | index, |
const T & | value | ||
) |
Set a value in the list.
index | Index of the value to set. |
value | Value to set. |
References elm::value().