Inheritance diagram for _option< T >:
Public Member Functions
|_option (std::string init_name, T &variable)|
|Standard constructor: creates a new _option with name |
|_option (const _option &other)|
|Copy constructor: creates a new option with the same name and variable reference as |
|void||SetValue (std::string value)|
|Sets the value of the linked variable to whatever |
|std::string &||GetValue (std::string &value)|
|Returns a string describing the C/C++ type of this variable. |
|Pointer to the variable that this option affects. |
|The name of this parameter. |
An _option<T> links a variable of type T with a command line option that's identified by a name (string). The variable name (known only to the programmer and to the C++ compiler) and the option name (known only to the programmer and to the user) may coincide, but need not. Objects of type _option<T> are not usually created directly by the programmer, but rather by the Options::Add() method.
_option<T> inherits an interface from _optionbase, and provides storage for a pointer to its variable. The SetValue() and GetValue() members affect the variable that the _option<T> object refers to.