This header-file is part of the ALib C++ Framework.
© 2013-2025 A-Worx GmbH, Germany. Published under Boost Software License.
Definition in file variables.prepro.hpp.
#include "alib/alib.inl"Go to the source code of this file.
Namespaces | |
| namespace | alib |
| namespace | alib::variables |
Macros | |
| #define | ALIB_VARIABLES_DEFINE_TYPE(Namespace, CPPName, CfgTypeString) |
| #define | ALIB_VARIABLES_DEFINE_TYPE_WITH_POOL_CONSTRUCTOR(Namespace, CPPName, CfgTypeString) |
| #define | ALIB_VARIABLES_REGISTER_TYPE(CPPName) |
Enumerations | |
| enum class | alib::variables::Priority : uint16_t { alib::variables::NONE = 0 , alib::variables::AutoDetected = 1000 , alib::variables::DefaultValues = 2000 , alib::variables::Standard = 4000 , alib::variables::ConfigFile = 6000 , alib::variables::Environment = 8000 , alib::variables::SessionFile = 10000 , alib::variables::CLI = 12000 , alib::variables::Session = 14000 , alib::variables::Protected = (std::numeric_limits<uint16_t>::max)() } |
| #define ALIB_VARIABLES_DEFINE_TYPE | ( | Namespace, | |
| CPPName, | |||
| CfgTypeString ) |
Defines a struct named alib::variables::detail::VMeta_<<CPPName>>, which is derived from struct VMeta and which declares all abstract virtual methods and implements most of them already. The methods are:
| Method | Status |
|---|---|
| typeName | defined |
| dbgTypeID | defined (in debug-compilations only) |
| construct | defined |
| destruct | defined |
| size | defined |
| imPort | declared only |
| exPort | declared only |
This is the first step on the way to create an ALib variable of a custom storage type.
| Namespace | The namespace of the type to enable as an ALib variable. |
| CPPName | The name of the type to enable as an ALib variable. |
| CfgTypeString | The type string used to declare variables of this type. |
Definition at line 105 of file variables.prepro.hpp.
| #define ALIB_VARIABLES_DEFINE_TYPE_WITH_POOL_CONSTRUCTOR | ( | Namespace, | |
| CPPName, | |||
| CfgTypeString ) |
Same as ALIB_VARIABLES_DEFINE_TYPE with the only difference that virtual override construct passes the pool allocator of the configuration instance to the constructor of the custom type.
| Namespace | The namespace of the type to enable as an ALib variable. |
| CPPName | The name of the type to enable as an ALib variable. |
| CfgTypeString | The type string used to declare variables of this type. |
Definition at line 118 of file variables.prepro.hpp.
| #define ALIB_VARIABLES_REGISTER_TYPE | ( | CPPName | ) |
Registers a custom implementation of abstract class VMeta, which has been previously defined with macro ALIB_VARIABLES_DEFINE_TYPE with the configuration object received by a call to GetConfig(). This macro is to be placed in virtual void Bootstrap() =0 in the section of phase PrepareConfig. The macro invokes the method void RegisterType() , which has to be called 'manually' if for some reason the placement of registration can't be done as proposed.
| CPPName | The name of the type to enable as an ALib variable (excluding the namespace). |
Definition at line 132 of file variables.prepro.hpp.