Represents a configurable option with a name, value, description, and help text.
More...
#include <goption.h>
The GOption
class is used to define options from a YAML configuration node. Options can be scalar or sequences of values, and can have default values or be cumulative.
Definition at line 86 of file goption.h.
◆ GOption() [1/2]
- Parameters
-
dv | A GVariable containing the name, default value, and description of the option. |
h | Help text for the option. |
This constructor initializes a scalar option using a string as the default value. Scalar options cannot have a default value of NODFLT
.
Definition at line 98 of file goption.h.
◆ GOption() [2/2]
GOption::GOption |
( |
string |
n, |
|
|
string |
desc, |
|
|
vector< GVariable > |
dv, |
|
|
string |
h |
|
) |
| |
|
inline |
- Parameters
-
n | Name of the option. |
desc | Summary description of the option. |
dv | Vector of GVariable objects, each containing the name, default value, and description for elements in the sequence. |
h | Help text for the option. |
This constructor initializes a sequence option. If any of the default values is NODFLT
, the option is cumulative; otherwise, it is not. If the option is not cumulative, the default value is applied to the first element of the sequence.
Definition at line 114 of file goption.h.
The documentation for this class was generated from the following files: