ALib C++ Library
Library Version: 2402 R1
Documentation generated by doxygen
No Matches
VariableFields Struct Reference


Fields of class Variable , which is monotonically allocated and derived from SelfContained and as such needs this special struct for field definition.

Definition at line 45 of file variable.hpp.

#include <variable.hpp>

Collaboration diagram for VariableFields:

Public Field Index:

String Category
String Comments = nullptr
String DefaultValue = nullptr
character Delim
FormatHints FmtHints
String FormatAttrAlignment = nullptr
String Fullname
String Name
Priorities Priority
std::vector< String, StdContMA< String > > values

Public Method Index:

 VariableFields (monomem::SelfContained< VariableFields >::Fields **fields)

Field Details:

◆ Category

String Category

The configuration variable category.

Definition at line 51 of file variable.hpp.

◆ Comments

String Comments = nullptr

The configuration variable comments with placeholders replaced.

Definition at line 76 of file variable.hpp.

◆ Config

The Configuration that was recently used to request or store the value.

Definition at line 48 of file variable.hpp.

◆ DefaultValue

String DefaultValue = nullptr

The default value provided as an externalized string.

The only occasion that this value is used is with method Configuration::Load . If no plug-in has this variable defined and this field is not nulled, then the value is written into plug-in of priority Priorities::DefaultValues , respectively - if this default plug-in was replaced by the user - into a plug-in found at or below this priority.

In this case, the value is parsed using method XTernalizer::LoadFromString of field ConfigurationPlugin::StringConverter of the plug-in writing the value.

The field is ignored when using the plug-in interface ConfigurationPlugin::Load directly. To store this value 'manually' directly to a plug-in, invoke ConfigurationPlugin::Store with providing value explicitly.

Definition at line 102 of file variable.hpp.

◆ Delim

character Delim

The delimiter used for parsing and storing values by simple textual plug-ins which use the default version of XTernalizer for in- and externalizing variables.

Definition at line 60 of file variable.hpp.

◆ FmtHints

FormatHints FmtHints

Hints for formatting textual configuration files. (Used by class IniFile and potentially by custom plug-ins.

Definition at line 66 of file variable.hpp.

◆ FormatAttrAlignment

String FormatAttrAlignment = nullptr

If set, attributes written in multi-lines are vertically aligned by this character or string. Use cases are "=", ":" or "->".
Used by IniFile and potentially by custom plug-ins.

Definition at line 73 of file variable.hpp.

◆ Fullname

String Fullname

The configuration variable category and name concatenated with an underscore character '_'. This is useful e.g. for naming variables in log messages.

Definition at line 80 of file variable.hpp.

◆ Name

String Name

The configuration variable name.

Definition at line 54 of file variable.hpp.

◆ Priority

Priorities Priority

A value related to the priority of a configuration plug-in. The following values apply:

  • Priorities::NONE after creation or declaration (reuse).
  • The priority of the plug-in that loaded the value (after calling Configuration::Load ).
  • The priority of the plug-in that stored the value (after calling Configuration::Store ).
  • 0, if the last load or store operation failed. In addition prior to storing a variable, the value might be manually set. See documentation of Configuration::Store ) for details.

Definition at line 116 of file variable.hpp.

◆ values

std::vector<String, StdContMA<String> > values

The values.

Definition at line 119 of file variable.hpp.

Constructor(s) / Destructor Details::

◆ VariableFields()

VariableFields ( monomem::SelfContained< VariableFields >::Fields ** fields)


fieldsPointer to the fields pointer of the self-contained object.
This is a pointer to the pointer, as at the point of invocation, the self-contained fields are not fully initialized, yet. This object itself is missing. However the allocator within the struct is initialized already If the pointer was given directly, the compiler would complain.

Definition at line 130 of file variable.hpp.

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