ALib C++ Library
Library Version: 2510 R0
Documentation generated by doxygen
Loading...
Searching...
No Matches
alib::variables::Bool Struct Reference

Description:

Variable content type used with boolean type "B". When this type is imported, the value is tried to be parsed with the tokens in Configuration::BooleanTokens. If successful, the index of the pair of true/false-tokens is stored in field TokenIndex. When exported back to a configuration file or otherwise serialized or printed, then the right human-readable term, corresponding to the potentially now different Value is used.

Definition at line 180 of file vmeta.inl.

Public Field Index:

int8_t TokenIndex = -1
 
bool Value = false
 The boolean value. Defaults to false.
 

Public Method Index:

 operator bool () const
 
bool operator= (bool newValue)
 

Field Details:

◆ TokenIndex

int8_t alib::variables::Bool::TokenIndex = -1

The index in the list of tokens found when imported from a string. Can also be set programmatically to force a certain output "format". Defaults to -1 which indicates that the value was not parsed. On exporting, when -1, index 0 is used.

Definition at line 189 of file vmeta.inl.

◆ Value

bool alib::variables::Bool::Value = false

The boolean value. Defaults to false.

Definition at line 183 of file vmeta.inl.

Method Details:

◆ operator bool()

alib::variables::Bool::operator bool ( ) const
inline

Implicit cast operator to bool.

Returns
Returns the stored value.

Definition at line 198 of file vmeta.inl.

◆ operator=()

bool alib::variables::Bool::operator= ( bool newValue)
inline

Assignment operator.

Parameters
newValueThe value to set.
Returns
The new value.

Definition at line 194 of file vmeta.inl.


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