goptions
GOption Class Reference

Represents a configurable option with a name, value, description, and help text. More...

#include <goption.h>

Collaboration diagram for GOption:
Collaboration graph

Public Member Functions

 GOption (GVariable dv, string h)
 Constructor for a scalar option with a default value. More...
 
 GOption (string n, string desc, vector< GVariable > dv, string h)
 Constructor for a sequence option. More...
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ GOption() [1/2]

GOption::GOption ( GVariable  dv,
string  h 
)
inline
Parameters
dvA GVariable containing the name, default value, and description of the option.
hHelp 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
nName of the option.
descSummary description of the option.
dvVector of GVariable objects, each containing the name, default value, and description for elements in the sequence.
hHelp 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: