goptions
GVariable Struct Reference

Encapsulates a variable with a name, value, and description. More...

#include <goption.h>

Collaboration diagram for GVariable:
Collaboration graph

Public Member Functions

 GVariable (string n, string val, string d)
 Constructor for initializing a variable with a string value. More...
 
 GVariable (string n, double val, string d)
 Constructor for initializing a variable with a string value. More...
 
 GVariable (string n, const char *val, string d)
 Constructor for initializing a variable with an integer value. More...
 
 GVariable (string n, int val, string d)
 Constructor for initializing a variable with a double value. More...
 
 GVariable (string n, bool val, string d)
 Constructor for initializing a variable with a boolean value. More...
 

Data Fields

string name
 The name of the variable. More...
 
string value
 The value of the variable, stored as a string. More...
 
string description
 A brief description of the variable. More...
 

Detailed Description

The GVariable struct provides a flexible way to store and manage different types of variables, allowing for overloading constructors to handle various data types.

Definition at line 32 of file goption.h.

Constructor & Destructor Documentation

◆ GVariable() [1/5]

GVariable::GVariable ( string  n,
string  val,
string  d 
)
inline
Parameters
nName of the variable.
valValue of the variable.
dDescription of the variable.

Definition at line 44 of file goption.h.

◆ GVariable() [2/5]

GVariable::GVariable ( string  n,
double  val,
string  d 
)
inline
Parameters
nName of the variable.
valValue of the variable.
dDescription of the variable.

Definition at line 52 of file goption.h.

◆ GVariable() [3/5]

GVariable::GVariable ( string  n,
const char *  val,
string  d 
)
inline
Parameters
nName of the variable.
valValue of the variable.
dDescription of the variable.

Definition at line 60 of file goption.h.

◆ GVariable() [4/5]

GVariable::GVariable ( string  n,
int  val,
string  d 
)
inline
Parameters
nName of the variable.
valValue of the variable.
dDescription of the variable.

Definition at line 68 of file goption.h.

◆ GVariable() [5/5]

GVariable::GVariable ( string  n,
bool  val,
string  d 
)
inline
Parameters
nName of the variable.
valValue of the variable.
dDescription of the variable.

Definition at line 76 of file goption.h.

Field Documentation

◆ description

string GVariable::description

Definition at line 36 of file goption.h.

◆ name

string GVariable::name

Definition at line 34 of file goption.h.

◆ value

string GVariable::value

Definition at line 35 of file goption.h.


The documentation for this struct was generated from the following file: