xentara-cpp-control v1.0.1
The Xentara C++ Control Framework
Loading...
Searching...
No Matches
xentara::Config Class Referencefinal

Access to the configuration in the Xentara model file. More...

#include <xentara/Config.hpp>

Public Member Functions

 Config ()=delete
 Deleted Constructor.
 
auto getElement (std::string_view parameterName) const -> Element
 Gets a configuration parameter as an Element.
 
auto getDataPoint (std::string_view parameterName) const -> Element
 Gets a configuration parameter as an Element of type data point.
 
 Config (const Config &)=delete
 Delete the copy constructor.
 
auto operator= (const Config &) -> Config &=delete
 Delete the assignment operator.
 
Generic Parameters
template<typename Type >
auto getValue (std::string_view parameterName) const -> Type
 Gets a configuration parameter as a specific C++ type.
 
template<typename Type >
auto getValue (std::string_view parameterName, const Type &defaultValue) const -> Type
 Gets an optional configuration parameter as a specific C++ type.
 
Simple Types
auto getBoolean (std::string_view parameterName) const -> bool
 Gets a configuration parameter as a Boolean value.
 
auto getBoolean (std::string_view parameterName, bool defaultValue) const -> bool
 Gets an optional configuration parameter as a Boolean value.
 
Numbers
auto getInt (std::string_view parameterName) const -> int
 Gets a configuration parameter as an integer value.
 
auto getUInt (std::string_view parameterName) const -> unsigned int
 Gets a configuration parameter as an unsigned integer value.
 
auto getShort (std::string_view parameterName) const -> short
 Gets a configuration parameter as a short value.
 
auto getUShort (std::string_view parameterName) const -> unsigned short
 Gets a configuration parameter as an unsigned short value.
 
auto getLong (std::string_view parameterName) const -> long
 Gets a configuration parameter as a long value.
 
auto getULong (std::string_view parameterName) const -> unsigned long
 Gets a configuration parameter as an unsigned long value.
 
auto getLongLong (std::string_view parameterName) const -> long long
 Gets a configuration parameter as a long long value.
 
auto getULongLong (std::string_view parameterName) const -> unsigned long long
 Gets a configuration parameter as an unsigned long long value.
 
auto getSChar (std::string_view parameterName) const -> signed char
 Gets a configuration parameter as a signed char value.
 
auto getUChar (std::string_view parameterName) const -> unsigned char
 Gets a configuration parameter as an unsigned char value.
 
auto getFloat (std::string_view parameterName) const -> float
 Gets a configuration parameter as a float value.
 
auto getDouble (std::string_view parameterName) const -> double
 Gets a configuration parameter as a double value.
 
auto getInt (std::string_view parameterName, int defaultValue) const -> int
 Gets an optional configuration parameter as a integer value.
 
auto getUInt (std::string_view parameterName, unsigned int defaultValue) const -> unsigned int
 Gets an optional configuration parameter as an unsigned integer value.
 
auto getShort (std::string_view parameterName, short defaultValue) const -> short
 Gets an optional configuration parameter as a short value.
 
auto getUShort (std::string_view parameterName, unsigned short defaultValue) const -> unsigned short
 Gets an optional configuration parameter as an unsigned short value.
 
auto getLong (std::string_view parameterName, long defaultValue) const -> long
 Gets an optional configuration parameter as a long value.
 
auto getULong (std::string_view parameterName, unsigned long defaultValue) const -> unsigned long
 Gets an optional configuration parameter as an unsigned long value.
 
auto getLongLong (std::string_view parameterName, long long defaultValue) const -> long long
 Gets an optional configuration parameter as a long long value.
 
auto getULongLong (std::string_view parameterName, unsigned long long defaultValue) const -> unsigned long long
 Gets an optional configuration parameter as an unsigned long long value.
 
auto getSChar (std::string_view parameterName, signed char defaultValue) const -> signed char
 Gets an optional configuration parameter as a signed char value.
 
auto getUChar (std::string_view parameterName, unsigned char defaultValue) const -> unsigned char
 Gets an optional configuration parameter as an unsigned char value.
 
auto getFloat (std::string_view parameterName, float defaultValue) const -> float
 Gets an optional configuration parameter as a float value.
 
auto getDouble (std::string_view parameterName, double defaultValue) const -> double
 Gets an optional configuration parameter as a double value.
 
Numbers With Specific Bit Counts
auto getUInt8 (std::string_view parameterName) const -> std::uint8_t
 Gets a configuration parameter as an unsigned 8-bit integer value.
 
auto getUInt16 (std::string_view parameterName) const -> std::uint16_t
 Gets a configuration parameter as an unsigned 16-bit integer value.
 
auto getUInt32 (std::string_view parameterName) const -> std::uint32_t
 Gets a configuration parameter as an unsigned 32-bit integer value.
 
auto getUInt64 (std::string_view parameterName) const -> std::uint64_t
 Gets a configuration parameter as an unsigned 64-bit integer value.
 
auto getInt8 (std::string_view parameterName) const -> std::int8_t
 Gets a configuration parameter as an signed 8-bit integer value.
 
auto getInt16 (std::string_view parameterName) const -> std::int16_t
 Gets a configuration parameter as an signed 16-bit integer value.
 
auto getInt32 (std::string_view parameterName) const -> std::int32_t
 Gets a configuration parameter as an signed 32-bit integer value.
 
auto getInt64 (std::string_view parameterName) const -> std::int64_t
 Gets a configuration parameter as an signed 64-bit integer value.
 
auto getFloat32 (std::string_view parameterName) const -> float
 Gets a configuration parameter as a 32-bit floating point value.
 
auto getFloat64 (std::string_view parameterName) const -> double
 Gets a configuration parameter as a 64-bit floating point value.
 
auto getUInt8 (std::string_view parameterName, std::uint8_t defaultValue) const -> std::uint8_t
 Gets an optional configuration parameter as an unsigned 8-bit integer value.
 
auto getUInt16 (std::string_view parameterName, std::uint16_t defaultValue) const -> std::uint16_t
 Gets an optional configuration parameter as an unsigned 16-bit integer value.
 
auto getUInt32 (std::string_view parameterName, std::uint32_t defaultValue) const -> std::uint32_t
 Gets an optional configuration parameter as an unsigned 32-bit integer value.
 
auto getUInt64 (std::string_view parameterName, std::uint64_t defaultValue) const -> std::uint64_t
 Gets an optional configuration parameter as an unsigned 64-bit integer value.
 
auto getInt8 (std::string_view parameterName, std::int8_t defaultValue) const -> std::int8_t
 Gets an optional configuration parameter as a signed 8-bit integer value.
 
auto getInt16 (std::string_view parameterName, std::int16_t defaultValue) const -> std::int16_t
 Gets an optional configuration parameter as a signed 16-bit integer value.
 
auto getInt32 (std::string_view parameterName, std::int32_t defaultValue) const -> std::int32_t
 Gets an optional configuration parameter as a signed 32-bit integer value.
 
auto getInt64 (std::string_view parameterName, std::int64_t defaultValue) const -> std::int64_t
 Gets an optional configuration parameter as a signed 64-bit integer value.
 
auto getFloat32 (std::string_view parameterName, float defaultValue) const -> float
 Gets an optional configuration parameter as a 32-bit floating point value.
 
auto getFloat64 (std::string_view parameterName, double defaultValue) const -> double
 Gets an optional configuration parameter as a 64-bit floating point value.
 
Strings
auto getString (std::string_view parameterName) const -> std::string
 Gets a configuration parameter as a string value.
 
auto getWString (std::string_view parameterName) const -> std::wstring
 Gets a configuration parameter as a wstring value.
 
auto getU8String (std::string_view parameterName) const -> std::u8string
 Gets a configuration parameter as a u8string value.
 
auto getU16String (std::string_view parameterName) const -> std::u16string
 Gets a configuration parameter as a u16string value.
 
auto getU32String (std::string_view parameterName) const -> std::u32string
 Gets a configuration parameter as a u32string value.
 
auto getString (std::string_view parameterName, const std::string &defaultValue) const -> std::string
 Gets an optional configuration parameter as a string value.
 
auto getWString (std::string_view parameterName, const std::wstring &defaultValue) const -> std::wstring
 Gets an optional configuration parameter as a wstring value.
 
auto getU8String (std::string_view parameterName, const std::u8string &defaultValue) const -> std::u8string
 Gets an optional configuration parameter as a u8string value.
 
auto getU16String (std::string_view parameterName, const std::u16string &defaultValue) const -> std::u16string
 Gets an optional configuration parameter as a u16string value.
 
auto getU32String (std::string_view parameterName, const std::u32string &defaultValue) const -> std::u32string
 Gets an optional configuration parameter as a u32string value.
 
Time Duration
auto getTimeDuration (std::string_view parameterName) const -> std::chrono::system_clock::duration
 Gets a configuration parameter as a std::chrono::system_clock::duration value.
 
auto getSeconds (std::string_view parameterName) const -> std::chrono::seconds
 Gets a configuration parameter as a std::chrono::seconds value.
 
auto getMilliSeconds (std::string_view parameterName) const -> std::chrono::milliseconds
 Gets a configuration parameter as a std::chrono::milliseconds value.
 
auto getMicroSeconds (std::string_view parameterName) const -> std::chrono::microseconds
 Gets a configuration parameter as a std::chrono::microseconds value.
 
auto getNanoSeconds (std::string_view parameterName) const -> std::chrono::nanoseconds
 Gets a configuration parameter as a std::chrono::nanoseconds value.
 
auto getTimeDuration (std::string_view parameterName, std::chrono::system_clock::duration defaultValue) const -> std::chrono::system_clock::duration
 Gets an optional configuration parameter as a std::chrono::system_clock::duration value.
 
auto getSeconds (std::string_view parameterName, std::chrono::seconds defaultValue) const -> std::chrono::seconds
 Gets an optional configuration parameter as a std::chrono::seconds value.
 
auto getMilliSeconds (std::string_view parameterName, std::chrono::milliseconds defaultValue) const -> std::chrono::milliseconds
 Gets an optional configuration parameter as a std::chrono::milliseconds value.
 
auto getMicroSeconds (std::string_view parameterName, std::chrono::microseconds defaultValue) const -> std::chrono::microseconds
 Gets an optional configuration parameter as a std::chrono::microseconds value.
 
auto getNanoSeconds (std::string_view parameterName, std::chrono::nanoseconds defaultValue) const -> std::chrono::nanoseconds
 Gets an optional configuration parameter as a std::chrono::nanoseconds value.
 
UUID
auto getUUID (std::string_view parameterName) const -> xentara::utils::core::Uuid
 Gets a configuration parameter as a UUID value.
 
auto getUUID (std::string_view parameterName, const xentara::utils::core::Uuid &defaultValue) const -> xentara::utils::core::Uuid
 Gets an optional configuration parameter as a xentara::utils::core::Uuid value.
 

Detailed Description

Access to the configuration in the Xentara model file.

This class allows you to access the configuration for the control from the Xentara model file. You never create objects of this class yourself, this class is always returned from InitContext::config().

Constructor & Destructor Documentation

◆ Config() [1/2]

xentara::Config::Config ( )
delete

Deleted Constructor.

◆ Config() [2/2]

xentara::Config::Config ( const Config )
delete

Delete the copy constructor.

Member Function Documentation

◆ getBoolean() [1/2]

auto xentara::Config::getBoolean ( std::string_view  parameterName) const -> bool

Gets a configuration parameter as a Boolean value.

This function is equivalent to getValue<bool>(parameterName).

Parameters
parameterNameThe name of the configuration parameter as it appears in the configuration of the control element.
Returns
The value of the parameter.
Exceptions
std::runtime_errorThe parameter does not exist, or it has the wrong type.

◆ getBoolean() [2/2]

auto xentara::Config::getBoolean ( std::string_view  parameterName,
bool  defaultValue 
) const -> bool

Gets an optional configuration parameter as a Boolean value.

This function is equivalent to getValue<bool>(parameterName, defaultValue).

Parameters
parameterNameThe name of the configuration parameter as it appears in the configuration of the control element.
defaultValueThe default value of bool type to be returned when parameter is not found.
Returns
The value of the parameter.
Exceptions
std::runtime_errorThe parameter has the wrong type.

◆ getDataPoint()

auto xentara::Config::getDataPoint ( std::string_view  parameterName) const -> Element

Gets a configuration parameter as an Element of type data point.

This function gets a parameter value as a string and finds the Element specified in the value of the parameter in the Xentara model tree. The Element must be of data point type.

Parameters
parameterNameThe name of the configuration parameter as it appears in the configuration of the control element.
Returns
The Element which is of type data point
Exceptions
std::runtime_errorThe parameter does not exist, or it has the wrong type.
std::runtime_errorThe element requested in the value of parameter does not exist in the Xentara model tree.
std::runtime_errorThe element requested in the value of parameter is not a data point in the Xentara model tree.

◆ getDouble() [1/2]

auto xentara::Config::getDouble ( std::string_view  parameterName) const -> double

Gets a configuration parameter as a double value.

This function is equivalent to getValue<double>(parameterName).

Parameters
parameterNameThe name of the configuration parameter as it appears in the configuration of the control element.
Returns
The value of the parameter.
Exceptions
std::runtime_errorThe parameter does not exist, or it has the wrong type.
std::range_errorThe parameter is a number, but it is out of range for a double.

◆ getDouble() [2/2]

auto xentara::Config::getDouble ( std::string_view  parameterName,
double  defaultValue 
) const -> double

Gets an optional configuration parameter as a double value.

This function is equivalent to getValue<double>(parameterName, defaultValue).

Parameters
parameterNameThe name of the configuration parameter as it appears in the configuration of the control element.
defaultValueThe default value of double type to be returned when parameter is not found.
Returns
The value of the parameter.
Exceptions
std::runtime_errorThe parameter has the wrong type.

◆ getElement()

auto xentara::Config::getElement ( std::string_view  parameterName) const -> Element

Gets a configuration parameter as an Element.

This function gets a parameter value as a string and finds the Element specified in the value of the parameter in the Xentara model tree.

Parameters
parameterNameThe name of the configuration parameter as it appears in the configuration of the control element.
Returns
The Element which was requested
Exceptions
std::runtime_errorThe parameter does not exist, or it has the wrong type.
std::runtime_errorThe element requested in the value of parameter does not exist in the Xentara model tree.

◆ getFloat() [1/2]

auto xentara::Config::getFloat ( std::string_view  parameterName) const -> float

Gets a configuration parameter as a float value.

This function is equivalent to getValue<float>(parameterName).

Parameters
parameterNameThe name of the configuration parameter as it appears in the configuration of the control element.
Returns
The value of the parameter.
Exceptions
std::runtime_errorThe parameter does not exist, or it has the wrong type.
std::range_errorThe parameter is a number, but it is out of range for a float.

◆ getFloat() [2/2]

auto xentara::Config::getFloat ( std::string_view  parameterName,
float  defaultValue 
) const -> float

Gets an optional configuration parameter as a float value.

This function is equivalent to getValue<float>(parameterName, defaultValue).

Parameters
parameterNameThe name of the configuration parameter as it appears in the configuration of the control element.
defaultValueThe default value of float type to be returned when parameter is not found.
Returns
The value of the parameter.
Exceptions
std::runtime_errorThe parameter has the wrong type.

◆ getFloat32() [1/2]

auto xentara::Config::getFloat32 ( std::string_view  parameterName) const -> float

Gets a configuration parameter as a 32-bit floating point value.

This function is equivalent to getValue<float>(parameterName).

Parameters
parameterNameThe name of the configuration parameter as it appears in the configuration of the control element.
Returns
The value of the parameter.
Exceptions
std::runtime_errorThe parameter does not exist, or it has the wrong type.
std::range_errorThe parameter is a number, but it is out of range for a 32-bit floating point.

◆ getFloat32() [2/2]

auto xentara::Config::getFloat32 ( std::string_view  parameterName,
float  defaultValue 
) const -> float

Gets an optional configuration parameter as a 32-bit floating point value.

This function is equivalent to getValue<float>(parameterName, defaultValue).

Parameters
parameterNameThe name of the configuration parameter as it appears in the configuration of the control element.
defaultValueThe default value of 32-bit floating point type to be returned when parameter is not found.
Returns
The value of the parameter.
Exceptions
std::runtime_errorThe parameter has the wrong type.
std::range_errorThe parameter is a number, but it is out of range for a 32-bit floating point.

◆ getFloat64() [1/2]

auto xentara::Config::getFloat64 ( std::string_view  parameterName) const -> double

Gets a configuration parameter as a 64-bit floating point value.

This function is equivalent to getValue<double>(parameterName).

Parameters
parameterNameThe name of the configuration parameter as it appears in the configuration of the control element.
Returns
The value of the parameter.
Exceptions
std::runtime_errorThe parameter does not exist, or it has the wrong type.
std::range_errorThe parameter is a number, but it is out of range for a 64-bit floating point.

◆ getFloat64() [2/2]

auto xentara::Config::getFloat64 ( std::string_view  parameterName,
double  defaultValue 
) const -> double

Gets an optional configuration parameter as a 64-bit floating point value.

This function is equivalent to getValue<double>(parameterName, defaultValue).

Parameters
parameterNameThe name of the configuration parameter as it appears in the configuration of the control element.
defaultValueThe default value of 64-bit floating point type to be returned when parameter is not found.
Returns
The value of the parameter.
Exceptions
std::runtime_errorThe parameter has the wrong type.
std::range_errorThe parameter is a number, but it is out of range for a 64-bit floating point.

◆ getInt() [1/2]

auto xentara::Config::getInt ( std::string_view  parameterName) const -> int

Gets a configuration parameter as an integer value.

This function is equivalent to getValue<int>(parameterName).

Parameters
parameterNameThe name of the configuration parameter as it appears in the configuration of the control element.
Returns
The value of the parameter.
Exceptions
std::runtime_errorThe parameter does not exist, or it has the wrong type.
std::range_errorThe parameter is a number, but it is out of range for an int.

◆ getInt() [2/2]

auto xentara::Config::getInt ( std::string_view  parameterName,
int  defaultValue 
) const -> int

Gets an optional configuration parameter as a integer value.

This function is equivalent to getValue<int>(parameterName, defaultValue).

Parameters
parameterNameThe name of the configuration parameter as it appears in the configuration of the control element.
defaultValueThe default value of int type to be returned when parameter is not found.
Returns
The value of the parameter.
Exceptions
std::runtime_errorThe parameter has the wrong type.

◆ getInt16() [1/2]

auto xentara::Config::getInt16 ( std::string_view  parameterName) const -> std::int16_t

Gets a configuration parameter as an signed 16-bit integer value.

This function is equivalent to getValue<std::int16_t>(parameterName).

Parameters
parameterNameThe name of the configuration parameter as it appears in the configuration of the control element.
Returns
The value of the parameter.
Exceptions
std::runtime_errorThe parameter does not exist, or it has the wrong type.
std::range_errorThe parameter is a number, but it is out of range for an std::int16_t.

◆ getInt16() [2/2]

auto xentara::Config::getInt16 ( std::string_view  parameterName,
std::int16_t  defaultValue 
) const -> std::int16_t

Gets an optional configuration parameter as a signed 16-bit integer value.

This function is equivalent to getValue<std::int16_t>(parameterName, defaultValue).

Parameters
parameterNameThe name of the configuration parameter as it appears in the configuration of the control element.
defaultValueThe default value of std::int16_t type to be returned when parameter is not found.
Returns
The value of the parameter.
Exceptions
std::runtime_errorThe parameter has the wrong type.
std::range_errorThe parameter is a number, but it is out of range for an std::int16_t.

◆ getInt32() [1/2]

auto xentara::Config::getInt32 ( std::string_view  parameterName) const -> std::int32_t

Gets a configuration parameter as an signed 32-bit integer value.

This function is equivalent to getValue<std::int32_t>(parameterName).

Parameters
parameterNameThe name of the configuration parameter as it appears in the configuration of the control element.
Returns
The value of the parameter.
Exceptions
std::runtime_errorThe parameter does not exist, or it has the wrong type.
std::range_errorThe parameter is a number, but it is out of range for an std::int32_t.

◆ getInt32() [2/2]

auto xentara::Config::getInt32 ( std::string_view  parameterName,
std::int32_t  defaultValue 
) const -> std::int32_t

Gets an optional configuration parameter as a signed 32-bit integer value.

This function is equivalent to getValue<std::int32_t>(parameterName, defaultValue).

Parameters
parameterNameThe name of the configuration parameter as it appears in the configuration of the control element.
defaultValueThe default value of std::int32_t type to be returned when parameter is not found.
Returns
The value of the parameter.
Exceptions
std::runtime_errorThe parameter has the wrong type.
std::range_errorThe parameter is a number, but it is out of range for an std::int32_t.

◆ getInt64() [1/2]

auto xentara::Config::getInt64 ( std::string_view  parameterName) const -> std::int64_t

Gets a configuration parameter as an signed 64-bit integer value.

This function is equivalent to getValue<std::int64_t>(parameterName).

Parameters
parameterNameThe name of the configuration parameter as it appears in the configuration of the control element.
Returns
The value of the parameter.
Exceptions
std::runtime_errorThe parameter does not exist, or it has the wrong type.
std::range_errorThe parameter is a number, but it is out of range for an std::int64_t.

◆ getInt64() [2/2]

auto xentara::Config::getInt64 ( std::string_view  parameterName,
std::int64_t  defaultValue 
) const -> std::int64_t

Gets an optional configuration parameter as a signed 64-bit integer value.

This function is equivalent to getValue<std::int64_t>(parameterName, defaultValue).

Parameters
parameterNameThe name of the configuration parameter as it appears in the configuration of the control element.
defaultValueThe default value of std::int64_t type to be returned when parameter is not found.
Returns
The value of the parameter.
Exceptions
std::runtime_errorThe parameter has the wrong type.
std::range_errorThe parameter is a number, but it is out of range for an std::int64_t.

◆ getInt8() [1/2]

auto xentara::Config::getInt8 ( std::string_view  parameterName) const -> std::int8_t

Gets a configuration parameter as an signed 8-bit integer value.

This function is equivalent to getValue<std::int8_t>(parameterName).

Parameters
parameterNameThe name of the configuration parameter as it appears in the configuration of the control element.
Returns
The value of the parameter.
Exceptions
std::runtime_errorThe parameter does not exist, or it has the wrong type.
std::range_errorThe parameter is a number, but it is out of range for an std::int8_t.

◆ getInt8() [2/2]

auto xentara::Config::getInt8 ( std::string_view  parameterName,
std::int8_t  defaultValue 
) const -> std::int8_t

Gets an optional configuration parameter as a signed 8-bit integer value.

This function is equivalent to getValue<std::int8_t>(parameterName, defaultValue).

Parameters
parameterNameThe name of the configuration parameter as it appears in the configuration of the control element.
defaultValueThe default value of std::int8_t type to be returned when parameter is not found.
Returns
The value of the parameter.
Exceptions
std::runtime_errorThe parameter has the wrong type.
std::range_errorThe parameter is a number, but it is out of range for an std::int8_t.

◆ getLong() [1/2]

auto xentara::Config::getLong ( std::string_view  parameterName) const -> long

Gets a configuration parameter as a long value.

This function is equivalent to getValue<long>(parameterName).

Parameters
parameterNameThe name of the configuration parameter as it appears in the configuration of the control element.
Returns
The value of the parameter.
Exceptions
std::runtime_errorThe parameter does not exist, or it has the wrong type.
std::range_errorThe parameter is a number, but it is out of range for a long.

◆ getLong() [2/2]

auto xentara::Config::getLong ( std::string_view  parameterName,
long  defaultValue 
) const -> long

Gets an optional configuration parameter as a long value.

This function is equivalent to getValue<long>(parameterName, defaultValue).

Parameters
parameterNameThe name of the configuration parameter as it appears in the configuration of the control element.
defaultValueThe default value of long type to be returned when parameter is not found.
Returns
The value of the parameter.
Exceptions
std::runtime_errorThe parameter has the wrong type.

◆ getLongLong() [1/2]

auto xentara::Config::getLongLong ( std::string_view  parameterName) const -> long long

Gets a configuration parameter as a long long value.

This function is equivalent to getValue<long long>(parameterName).

Parameters
parameterNameThe name of the configuration parameter as it appears in the configuration of the control element.
Returns
The value of the parameter.
Exceptions
std::runtime_errorThe parameter does not exist, or it has the wrong type.
std::range_errorThe parameter is a number, but it is out of range for a long long.

◆ getLongLong() [2/2]

auto xentara::Config::getLongLong ( std::string_view  parameterName,
long long  defaultValue 
) const -> long long

Gets an optional configuration parameter as a long long value.

This function is equivalent to getValue<long long>(parameterName, defaultValue).

Parameters
parameterNameThe name of the configuration parameter as it appears in the configuration of the control element.
defaultValueThe default value of long long type to be returned when parameter is not found.
Returns
The value of the parameter.
Exceptions
std::runtime_errorThe parameter has the wrong type.

◆ getMicroSeconds() [1/2]

auto xentara::Config::getMicroSeconds ( std::string_view  parameterName) const -> std::chrono::microseconds

Gets a configuration parameter as a std::chrono::microseconds value.

This function is equivalent to getValue<std::chrono::microseconds>(parameterName).

Parameters
parameterNameThe name of the configuration parameter as it appears in the configuration of the control element.
Returns
The value of the parameter.
Exceptions
std::runtime_errorThe parameter does not exist, or it has the wrong type.

◆ getMicroSeconds() [2/2]

auto xentara::Config::getMicroSeconds ( std::string_view  parameterName,
std::chrono::microseconds  defaultValue 
) const -> std::chrono::microseconds

Gets an optional configuration parameter as a std::chrono::microseconds value.

This function is equivalent to getValue<std::chrono::microseconds>(parameterName, defaultValue).

Parameters
parameterNameThe name of the configuration parameter as it appears in the configuration of the control element.
defaultValueThe default value of std::chrono::microseconds type to be returned when parameter is not found.
Returns
The value of the parameter.
Exceptions
std::runtime_errorThe parameter has the wrong type.

◆ getMilliSeconds() [1/2]

auto xentara::Config::getMilliSeconds ( std::string_view  parameterName) const -> std::chrono::milliseconds

Gets a configuration parameter as a std::chrono::milliseconds value.

This function is equivalent to getValue<std::chrono::milliseconds>(parameterName).

Parameters
parameterNameThe name of the configuration parameter as it appears in the configuration of the control element.
Returns
The value of the parameter.
Exceptions
std::runtime_errorThe parameter does not exist, or it has the wrong type.

◆ getMilliSeconds() [2/2]

auto xentara::Config::getMilliSeconds ( std::string_view  parameterName,
std::chrono::milliseconds  defaultValue 
) const -> std::chrono::milliseconds

Gets an optional configuration parameter as a std::chrono::milliseconds value.

This function is equivalent to getValue<std::chrono::milliseconds>(parameterName, defaultValue).

Parameters
parameterNameThe name of the configuration parameter as it appears in the configuration of the control element.
defaultValueThe default value of std::chrono::milliseconds type to be returned when parameter is not found.
Returns
The value of the parameter.
Exceptions
std::runtime_errorThe parameter has the wrong type.

◆ getNanoSeconds() [1/2]

auto xentara::Config::getNanoSeconds ( std::string_view  parameterName) const -> std::chrono::nanoseconds

Gets a configuration parameter as a std::chrono::nanoseconds value.

This function is equivalent to getValue<std::chrono::nanoseconds>(parameterName).

Parameters
parameterNameThe name of the configuration parameter as it appears in the configuration of the control element.
Returns
The value of the parameter.
Exceptions
std::runtime_errorThe parameter does not exist, or it has the wrong type.

◆ getNanoSeconds() [2/2]

auto xentara::Config::getNanoSeconds ( std::string_view  parameterName,
std::chrono::nanoseconds  defaultValue 
) const -> std::chrono::nanoseconds

Gets an optional configuration parameter as a std::chrono::nanoseconds value.

This function is equivalent to getValue<std::chrono::nanoseconds>(parameterName, defaultValue).

Parameters
parameterNameThe name of the configuration parameter as it appears in the configuration of the control element.
defaultValueThe default value of std::chrono::nanoseconds type to be returned when parameter is not found.
Returns
The value of the parameter.
Exceptions
std::runtime_errorThe parameter has the wrong type.

◆ getSChar() [1/2]

auto xentara::Config::getSChar ( std::string_view  parameterName) const -> signed char

Gets a configuration parameter as a signed char value.

This function is equivalent to getValue<signed char>(parameterName).

Parameters
parameterNameThe name of the configuration parameter as it appears in the configuration of the control element.
Returns
The value of the parameter.
Exceptions
std::runtime_errorThe parameter does not exist, or it has the wrong type.
std::range_errorThe parameter is a number, but it is out of range for a signed char.

◆ getSChar() [2/2]

auto xentara::Config::getSChar ( std::string_view  parameterName,
signed char  defaultValue 
) const -> signed char

Gets an optional configuration parameter as a signed char value.

This function is equivalent to getValue<signed char>(parameterName, defaultValue).

Parameters
parameterNameThe name of the configuration parameter as it appears in the configuration of the control element.
defaultValueThe default value of signed char type to be returned when parameter is not found.
Returns
The value of the parameter.
Exceptions
std::runtime_errorThe parameter has the wrong type.

◆ getSeconds() [1/2]

auto xentara::Config::getSeconds ( std::string_view  parameterName) const -> std::chrono::seconds

Gets a configuration parameter as a std::chrono::seconds value.

This function is equivalent to getValue<std::chrono::seconds>(parameterName).

Parameters
parameterNameThe name of the configuration parameter as it appears in the configuration of the control element.
Returns
The value of the parameter.
Exceptions
std::runtime_errorThe parameter does not exist, or it has the wrong type.

◆ getSeconds() [2/2]

auto xentara::Config::getSeconds ( std::string_view  parameterName,
std::chrono::seconds  defaultValue 
) const -> std::chrono::seconds

Gets an optional configuration parameter as a std::chrono::seconds value.

This function is equivalent to getValue<std::chrono::seconds>(parameterName, defaultValue).

Parameters
parameterNameThe name of the configuration parameter as it appears in the configuration of the control element.
defaultValueThe default value of std::chrono::seconds type to be returned when parameter is not found.
Returns
The value of the parameter.
Exceptions
std::runtime_errorThe parameter has the wrong type.

◆ getShort() [1/2]

auto xentara::Config::getShort ( std::string_view  parameterName) const -> short

Gets a configuration parameter as a short value.

This function is equivalent to getValue<short>(parameterName).

Parameters
parameterNameThe name of the configuration parameter as it appears in the configuration of the control element.
Returns
The value of the parameter.
Exceptions
std::runtime_errorThe parameter does not exist, or it has the wrong type.
std::range_errorThe parameter is a number, but it is out of range for a short.

◆ getShort() [2/2]

auto xentara::Config::getShort ( std::string_view  parameterName,
short  defaultValue 
) const -> short

Gets an optional configuration parameter as a short value.

This function is equivalent to getValue<short>(parameterName, defaultValue).

Parameters
parameterNameThe name of the configuration parameter as it appears in the configuration of the control element.
defaultValueThe default value of short type to be returned when parameter is not found.
Returns
The value of the parameter.
Exceptions
std::runtime_errorThe parameter has the wrong type.

◆ getString() [1/2]

auto xentara::Config::getString ( std::string_view  parameterName) const -> std::string

Gets a configuration parameter as a string value.

This function is equivalent to getValue<std::string>(parameterName).

Parameters
parameterNameThe name of the configuration parameter as it appears in the configuration of the control element.
Returns
The value of the parameter.
Exceptions
std::runtime_errorThe parameter does not exist, or it has the wrong type.

◆ getString() [2/2]

auto xentara::Config::getString ( std::string_view  parameterName,
const std::string defaultValue 
) const -> std::string

Gets an optional configuration parameter as a string value.

This function is equivalent to getValue<std::string>(parameterName, defaultValue).

Parameters
parameterNameThe name of the configuration parameter as it appears in the configuration of the control element.
defaultValueThe default value of std::string type to be returned when parameter is not found.
Returns
The value of the parameter.
Exceptions
std::runtime_errorThe parameter has the wrong type.

◆ getTimeDuration() [1/2]

auto xentara::Config::getTimeDuration ( std::string_view  parameterName) const -> std::chrono::system_clock::duration

Gets a configuration parameter as a std::chrono::system_clock::duration value.

This function is equivalent to getValue<std::chrono::system_clock::duration>(parameterName).

Parameters
parameterNameThe name of the configuration parameter as it appears in the configuration of the control element.
Returns
The value of the parameter.
Exceptions
std::runtime_errorThe parameter does not exist, or it has the wrong type.

◆ getTimeDuration() [2/2]

auto xentara::Config::getTimeDuration ( std::string_view  parameterName,
std::chrono::system_clock::duration  defaultValue 
) const -> std::chrono::system_clock::duration

Gets an optional configuration parameter as a std::chrono::system_clock::duration value.

This function is equivalent to getValue< std::chrono::system_clock::duration>(parameterName, defaultValue).

Parameters
parameterNameThe name of the configuration parameter as it appears in the configuration of the control element.
defaultValueThe default value of std::chrono::system_clock::duration type to be returned when parameter is not found.
Returns
The value of the parameter.
Exceptions
std::runtime_errorThe parameter has the wrong type.

◆ getU16String() [1/2]

auto xentara::Config::getU16String ( std::string_view  parameterName) const -> std::u16string

Gets a configuration parameter as a u16string value.

This function is equivalent to getValue<std::u16string>(parameterName).

Parameters
parameterNameThe name of the configuration parameter as it appears in the configuration of the control element.
Returns
The value of the parameter.
Exceptions
std::runtime_errorThe parameter does not exist, or it has the wrong type.

◆ getU16String() [2/2]

auto xentara::Config::getU16String ( std::string_view  parameterName,
const std::u16string defaultValue 
) const -> std::u16string

Gets an optional configuration parameter as a u16string value.

This function is equivalent to getValue<std::u16string>(parameterName, defaultValue).

Parameters
parameterNameThe name of the configuration parameter as it appears in the configuration of the control element.
defaultValueThe default value of std::u16string type to be returned when parameter is not found.
Returns
The value of the parameter.
Exceptions
std::runtime_errorThe parameter has the wrong type.

◆ getU32String() [1/2]

auto xentara::Config::getU32String ( std::string_view  parameterName) const -> std::u32string

Gets a configuration parameter as a u32string value.

This function is equivalent to getValue<std::u32string>(parameterName).

Parameters
parameterNameThe name of the configuration parameter as it appears in the configuration of the control element.
Returns
The value of the parameter.
Exceptions
std::runtime_errorThe parameter does not exist, or it has the wrong type.

◆ getU32String() [2/2]

auto xentara::Config::getU32String ( std::string_view  parameterName,
const std::u32string defaultValue 
) const -> std::u32string

Gets an optional configuration parameter as a u32string value.

This function is equivalent to getValue<std::u32string>(parameterName, defaultValue).

Parameters
parameterNameThe name of the configuration parameter as it appears in the configuration of the control element.
defaultValueThe default value of std::u32string type to be returned when parameter is not found.
Returns
The value of the parameter.
Exceptions
std::runtime_errorThe parameter has the wrong type.

◆ getU8String() [1/2]

auto xentara::Config::getU8String ( std::string_view  parameterName) const -> std::u8string

Gets a configuration parameter as a u8string value.

This function is equivalent to getValue<std::u8string>(parameterName).

Parameters
parameterNameThe name of the configuration parameter as it appears in the configuration of the control element.
Returns
The value of the parameter.
Exceptions
std::runtime_errorThe parameter does not exist, or it has the wrong type.

◆ getU8String() [2/2]

auto xentara::Config::getU8String ( std::string_view  parameterName,
const std::u8string defaultValue 
) const -> std::u8string

Gets an optional configuration parameter as a u8string value.

This function is equivalent to getValue<std::u8string>(parameterName, defaultValue).

Parameters
parameterNameThe name of the configuration parameter as it appears in the configuration of the control element.
defaultValueThe default value of std::u8string type to be returned when parameter is not found.
Returns
The value of the parameter.
Exceptions
std::runtime_errorThe parameter has the wrong type.

◆ getUChar() [1/2]

auto xentara::Config::getUChar ( std::string_view  parameterName) const -> unsigned char

Gets a configuration parameter as an unsigned char value.

This function is equivalent to getValue<unsigned char>(parameterName).

Parameters
parameterNameThe name of the configuration parameter as it appears in the configuration of the control element.
Returns
The value of the parameter.
Exceptions
std::runtime_errorThe parameter does not exist, or it has the wrong type.
std::range_errorThe parameter is a number, but it is out of range for an unsigned char.

◆ getUChar() [2/2]

auto xentara::Config::getUChar ( std::string_view  parameterName,
unsigned char  defaultValue 
) const -> unsigned char

Gets an optional configuration parameter as an unsigned char value.

This function is equivalent to getValue<unsigned char>(parameterName, defaultValue).

Parameters
parameterNameThe name of the configuration parameter as it appears in the configuration of the control element.
defaultValueThe default value of unsigned char type to be returned when parameter is not found.
Returns
The value of the parameter.
Exceptions
std::runtime_errorThe parameter has the wrong type.

◆ getUInt() [1/2]

auto xentara::Config::getUInt ( std::string_view  parameterName) const -> unsigned int

Gets a configuration parameter as an unsigned integer value.

This function is equivalent to getValue<unsigned int>(parameterName).

Parameters
parameterNameThe name of the configuration parameter as it appears in the configuration of the control element.
Returns
The value of the parameter.
Exceptions
std::runtime_errorThe parameter does not exist, or it has the wrong type.
std::range_errorThe parameter is a number, but it is out of range for an unsigned int.

◆ getUInt() [2/2]

auto xentara::Config::getUInt ( std::string_view  parameterName,
unsigned int  defaultValue 
) const -> unsigned int

Gets an optional configuration parameter as an unsigned integer value.

This function is equivalent to getValue<unsigned int>(parameterName, defaultValue).

Parameters
parameterNameThe name of the configuration parameter as it appears in the configuration of the control element.
defaultValueThe default value of unsigned int type to be returned when parameter is not found.
Returns
The value of the parameter.
Exceptions
std::runtime_errorThe parameter has the wrong type.

◆ getUInt16() [1/2]

auto xentara::Config::getUInt16 ( std::string_view  parameterName) const -> std::uint16_t

Gets a configuration parameter as an unsigned 16-bit integer value.

This function is equivalent to getValue<std::uint16_t>(parameterName).

Parameters
parameterNameThe name of the configuration parameter as it appears in the configuration of the control element.
Returns
The value of the parameter.
Exceptions
std::runtime_errorThe parameter does not exist, or it has the wrong type.
std::range_errorThe parameter is a number, but it is out of range for an std::uint16_t.

◆ getUInt16() [2/2]

auto xentara::Config::getUInt16 ( std::string_view  parameterName,
std::uint16_t  defaultValue 
) const -> std::uint16_t

Gets an optional configuration parameter as an unsigned 16-bit integer value.

This function is equivalent to getValue<std::uint16_t>(parameterName, defaultValue).

Parameters
parameterNameThe name of the configuration parameter as it appears in the configuration of the control element.
defaultValueThe default value of std::uint16_t type to be returned when parameter is not found.
Returns
The value of the parameter.
Exceptions
std::runtime_errorThe parameter has the wrong type.
std::range_errorThe parameter is a number, but it is out of range for an std::uint16_t.

◆ getUInt32() [1/2]

auto xentara::Config::getUInt32 ( std::string_view  parameterName) const -> std::uint32_t

Gets a configuration parameter as an unsigned 32-bit integer value.

This function is equivalent to getValue<std::uint32_t>(parameterName).

Parameters
parameterNameThe name of the configuration parameter as it appears in the configuration of the control element.
Returns
The value of the parameter.
Exceptions
std::runtime_errorThe parameter does not exist, or it has the wrong type.
std::range_errorThe parameter is a number, but it is out of range for an std::uint32_t.

◆ getUInt32() [2/2]

auto xentara::Config::getUInt32 ( std::string_view  parameterName,
std::uint32_t  defaultValue 
) const -> std::uint32_t

Gets an optional configuration parameter as an unsigned 32-bit integer value.

This function is equivalent to getValue<std::uint32_t>(parameterName, defaultValue).

Parameters
parameterNameThe name of the configuration parameter as it appears in the configuration of the control element.
defaultValueThe default value of std::uint32_t type to be returned when parameter is not found.
Returns
The value of the parameter.
Exceptions
std::runtime_errorThe parameter has the wrong type.
std::range_errorThe parameter is a number, but it is out of range for an std::uint32_t.

◆ getUInt64() [1/2]

auto xentara::Config::getUInt64 ( std::string_view  parameterName) const -> std::uint64_t

Gets a configuration parameter as an unsigned 64-bit integer value.

This function is equivalent to getValue<std::uint64_t>(parameterName).

Parameters
parameterNameThe name of the configuration parameter as it appears in the configuration of the control element.
Returns
The value of the parameter.
Exceptions
std::runtime_errorThe parameter does not exist, or it has the wrong type.
std::range_errorThe parameter is a number, but it is out of range for an std::uint64_t.

◆ getUInt64() [2/2]

auto xentara::Config::getUInt64 ( std::string_view  parameterName,
std::uint64_t  defaultValue 
) const -> std::uint64_t

Gets an optional configuration parameter as an unsigned 64-bit integer value.

This function is equivalent to getValue<std::uint64_t>(parameterName, defaultValue).

Parameters
parameterNameThe name of the configuration parameter as it appears in the configuration of the control element.
defaultValueThe default value of std::uint64_t type to be returned when parameter is not found.
Returns
The value of the parameter.
Exceptions
std::runtime_errorThe parameter has the wrong type.
std::range_errorThe parameter is a number, but it is out of range for an std::uint64_t.

◆ getUInt8() [1/2]

auto xentara::Config::getUInt8 ( std::string_view  parameterName) const -> std::uint8_t

Gets a configuration parameter as an unsigned 8-bit integer value.

This function is equivalent to getValue<std::uint8_t>(parameterName).

Parameters
parameterNameThe name of the configuration parameter as it appears in the configuration of the control element.
Returns
The value of the parameter.
Exceptions
std::runtime_errorThe parameter does not exist, or it has the wrong type.
std::range_errorThe parameter is a number, but it is out of range for an std::uint8_t.

◆ getUInt8() [2/2]

auto xentara::Config::getUInt8 ( std::string_view  parameterName,
std::uint8_t  defaultValue 
) const -> std::uint8_t

Gets an optional configuration parameter as an unsigned 8-bit integer value.

This function is equivalent to getValue<std::uint8_t>(parameterName, defaultValue).

Parameters
parameterNameThe name of the configuration parameter as it appears in the configuration of the control element.
defaultValueThe default value of std::uint8_t type to be returned when parameter is not found.
Returns
The value of the parameter.
Exceptions
std::runtime_errorThe parameter has the wrong type.
std::range_errorThe parameter is a number, but it is out of range for an std::uint8_t.

◆ getULong() [1/2]

auto xentara::Config::getULong ( std::string_view  parameterName) const -> unsigned long

Gets a configuration parameter as an unsigned long value.

This function is equivalent to getValue<unsigned long>(parameterName).

Parameters
parameterNameThe name of the configuration parameter as it appears in the configuration of the control element.
Returns
The value of the parameter.
Exceptions
std::runtime_errorThe parameter does not exist, or it has the wrong type.
std::range_errorThe parameter is a number, but it is out of range for an unsigned long.

◆ getULong() [2/2]

auto xentara::Config::getULong ( std::string_view  parameterName,
unsigned long  defaultValue 
) const -> unsigned long

Gets an optional configuration parameter as an unsigned long value.

This function is equivalent to getValue<unsigned long>(parameterName, defaultValue).

Parameters
parameterNameThe name of the configuration parameter as it appears in the configuration of the control element.
defaultValueThe default value of unsigned long type to be returned when parameter is not found.
Returns
The value of the parameter.
Exceptions
std::runtime_errorThe parameter has the wrong type.

◆ getULongLong() [1/2]

auto xentara::Config::getULongLong ( std::string_view  parameterName) const -> unsigned long long

Gets a configuration parameter as an unsigned long long value.

This function is equivalent to getValue<unsigned long long>(parameterName).

Parameters
parameterNameThe name of the configuration parameter as it appears in the configuration of the control element.
Returns
The value of the parameter.
Exceptions
std::runtime_errorThe parameter does not exist, or it has the wrong type.
std::range_errorThe parameter is a number, but it is out of range for an unsigned long long.

◆ getULongLong() [2/2]

auto xentara::Config::getULongLong ( std::string_view  parameterName,
unsigned long long  defaultValue 
) const -> unsigned long long

Gets an optional configuration parameter as an unsigned long long value.

This function is equivalent to getValue<unsigned long long>(parameterName, defaultValue).

Parameters
parameterNameThe name of the configuration parameter as it appears in the configuration of the control element.
defaultValueThe default value of unsigned long long type to be returned when parameter is not found.
Returns
The value of the parameter.
Exceptions
std::runtime_errorThe parameter has the wrong type.

◆ getUShort() [1/2]

auto xentara::Config::getUShort ( std::string_view  parameterName) const -> unsigned short

Gets a configuration parameter as an unsigned short value.

This function is equivalent to getValue<unsigned short>(parameterName).

Parameters
parameterNameThe name of the configuration parameter as it appears in the configuration of the control element.
Returns
The value of the parameter.
Exceptions
std::runtime_errorThe parameter does not exist, or it has the wrong type.
std::range_errorThe parameter is a number, but it is out of range for an unsigned short.

◆ getUShort() [2/2]

auto xentara::Config::getUShort ( std::string_view  parameterName,
unsigned short  defaultValue 
) const -> unsigned short

Gets an optional configuration parameter as an unsigned short value.

This function is equivalent to getValue<unsigned short>(parameterName, defaultValue).

Parameters
parameterNameThe name of the configuration parameter as it appears in the configuration of the control element.
defaultValueThe default value of unsigned short type to be returned when parameter is not found.
Returns
The value of the parameter.
Exceptions
std::runtime_errorThe parameter has the wrong type.

◆ getUUID() [1/2]

auto xentara::Config::getUUID ( std::string_view  parameterName) const -> xentara::utils::core::Uuid

Gets a configuration parameter as a UUID value.

This function is equivalent to getValue<xentara::utils::core::Uuid>(parameterName).

Parameters
parameterNameThe name of the configuration parameter as it appears in the configuration of the control element.
Returns
The value of the parameter.
Exceptions
std::runtime_errorThe parameter does not exist, or it has the wrong type.

◆ getUUID() [2/2]

auto xentara::Config::getUUID ( std::string_view  parameterName,
const xentara::utils::core::Uuid defaultValue 
) const -> xentara::utils::core::Uuid

Gets an optional configuration parameter as a xentara::utils::core::Uuid value.

This function is equivalent to getValue<xentara::utils::core::Uuid>(parameterName, defaultValue).

Parameters
parameterNameThe name of the configuration parameter as it appears in the configuration of the control element.
defaultValueThe default value of xentara::utils::core::Uuid type to be returned when parameter is not found.
Returns
The value of the parameter.
Exceptions
std::runtime_errorThe parameter has the wrong type.

◆ getValue() [1/2]

template<typename Type >
auto xentara::Config::getValue ( std::string_view  parameterName) const -> Type

Gets a configuration parameter as a specific C++ type.

Template Parameters
TypeThe desired type of the returned value.
Parameters
parameterNameThe name of the configuration parameter as it appears in the Xentara model file.
Returns
The value of the parameter.
Exceptions
std::runtime_errorThe parameter does not exist, or it has the wrong type.

◆ getValue() [2/2]

template<typename Type >
auto xentara::Config::getValue ( std::string_view  parameterName,
const Type &  defaultValue 
) const -> Type

Gets an optional configuration parameter as a specific C++ type.

This function is exactly like getValue(parameterName), but it does not throw an exception if the parameter does not exist. Instead, it returns the provided default value

Template Parameters
TypeThe desired type of the returned value.
Parameters
parameterNameThe name of the configuration parameter as it appears in the Xentara model file.
defaultValueThe default value of desired type to be returned when parameter is not found.
Returns
The value of the parameter.
Exceptions
std::runtime_errorThe parameter has the wrong type.

◆ getWString() [1/2]

auto xentara::Config::getWString ( std::string_view  parameterName) const -> std::wstring

Gets a configuration parameter as a wstring value.

This function is equivalent to getValue<std::wstring>(parameterName).

Parameters
parameterNameThe name of the configuration parameter as it appears in the configuration of the control element.
Returns
The value of the parameter.
Exceptions
std::runtime_errorThe parameter does not exist, or it has the wrong type.

◆ getWString() [2/2]

auto xentara::Config::getWString ( std::string_view  parameterName,
const std::wstring defaultValue 
) const -> std::wstring

Gets an optional configuration parameter as a wstring value.

This function is equivalent to getValue<std::wstring>(parameterName, defaultValue).

Parameters
parameterNameThe name of the configuration parameter as it appears in the configuration of the control element.
defaultValueThe default value of std::wstring type to be returned when parameter is not found.
Returns
The value of the parameter.
Exceptions
std::runtime_errorThe parameter has the wrong type.

◆ operator=()

auto xentara::Config::operator= ( const Config ) -> Config &=delete
delete

Delete the assignment operator.