![]() |
Elm
2
ELM is a library providing generic data structures, OS-independent interface, plugins and XML.
|
#include <elm/option/EnumOption.h>
Classes | |
class | Make |
Public Types | |
typedef Pair< cstring, T > | value_t |
Public Member Functions | |
EnumOption (const Make &m) | |
T | value (void) const |
void | set (const T &value) |
usage_t | usage (void) override |
void | process (String arg) override |
cstring | argDescription (void) override |
operator T (void) const | |
EnumOption & | operator= (const T &value) |
![]() | |
Option () | |
Option (const Make &make) | |
virtual | ~Option () |
virtual cstring | description () |
Additional Inherited Members | |
![]() | |
cstring | desc |
This class handle enumerations in command line arguments. At construction time, it receive an associative array of EnumOption::value_t that matches T values with their name. The first item of this array is used to get the default value of the option and the argument description for help display.
T | Type of the enumerated value. |
|
inline |
If the option requires an argument, get the description of the argument.
Implements Option.
|
inline |
Shortcut to get().
References EnumOption< T >::value().
|
inline |
Shortcut to set().
References EnumOption< T >::set().
|
inline |
Change the current value of the option.
value | New value of the option. |
References EnumOption< T >::value().
Referenced by EnumOption< T >::operator=().
Get the argument usage type of this function.
Implements Option.
References elm::option::arg_required.
Get the current value of the option.
Referenced by EnumOption< T >::operator T(), and EnumOption< T >::set().