ALib C++ Library
Library Version: 2312 R0
Documentation generated by doxygen
Public Methods | Protected Methods | List of all members
Config Class Reference

#include <config.hpp>

Inheritance diagram for Config:
[legend]
Collaboration diagram for Config:
[legend]

Class Description


The module class.

This is a strict singleton class. The only instance is found with namespace variable aworx::lib::CONFIG.

Definition at line 52 of file config.hpp.

Public Methods

 Config ()
 
- Public Methods inherited from Module
 Module (const Module &)=delete
 
 Module (int version, int revision, const NCString &resourceCategory, uint64_t compilationFlags=0)
 
 Module (Module &&)=delete
 
virtual ~Module ()
 
ALIB_API bool Bootstrap (BootstrapPhases targetPhase=BootstrapPhases::Final, int argc=0, const char **argvN=nullptr, const wchar_t **argvW=nullptr)
 
template<typename TChar >
bool Bootstrap (int argc, TChar **argv, BootstrapPhases targetPhase=BootstrapPhases::Final)
 
void BootstrapResource (const NString &name, const String &data)
 
void BootstrapSetConfig (config::Configuration *pConfig)
 
void BootstrapSetResourcePool (resources::ResourcePool *pool)
 
config::ConfigurationGetConfig ()
 
const StringGetResource (const NString &name)
 
ResourcePoolGetResourcePool ()
 
bool IsBootstrapped ()
 
void operator= (const Module &)=delete
 
void operator= (Module &&)=delete
 
ALIB_API void Shutdown (ShutdownPhases targetPhase=ShutdownPhases::Destruct)
 
const StringTryResource (const NString &name)
 
ALIB_API bool VerifyCompilationFlags (uint64_t compilationFlags)
 

Protected Methods

virtual void bootstrap (BootstrapPhases phase, int argc, const char **argv, const wchar_t **wargv) override
 
virtual void shutdown (ShutdownPhases phase) override
 

Additional Inherited Members

- Public Types inherited from Module
enum  BootstrapPhases { PrepareResources = 1, PrepareConfig = 2, Final = 3 }
 
enum  ShutdownPhases { Announce = 1, Destruct = 2 }
 
- Public Fields inherited from Module
std::vector< std::pair< const nchar *, uint64_t > > CompilationFlagMeanings
 
const uint64_t CompilationFlags
 
NCString ResourceCategory
 
const int Revision
 
const int Version
 
- Protected Static Fields inherited from Module
static bool microModulesInitialized = false
 
- Protected Fields inherited from Module
int bootstrapState = 0
 
config::Configurationconfig = nullptr
 
bool isConfigOwner = false
 
bool isResourceOwner = false
 
resources::ResourcePoolresourcePool = nullptr
 

Constructor & Destructor Documentation

◆ Config()

Config ( )

Constructor.
While this is public, it must not be invoked as this is a strict singleton type. (See notes in 3.2.1 Singletons).

Definition at line 46 of file config.cpp.

Member Function Documentation

◆ bootstrap()

void bootstrap ( BootstrapPhases  phase,
int  argc,
const char **  argv,
const wchar_t **  wargv 
)
overrideprotectedvirtual

Initializes this module.

Parameters
phaseThe initialization phase to perform.
argcThe number of command line arguments. Defaults to 0.
argvList of command line arguments if given as single byte character strings.
wargvList of command line arguments if given as multi-byte character strings.

Implements Module.

Definition at line 54 of file config.cpp.

Here is the call graph for this function:

◆ shutdown()

virtual void shutdown ( ShutdownPhases  phase)
inlineoverrideprotectedvirtual

Terminates this module. (Nothing to do.)

Parameters
phaseThe shutdown phase to perform.

Implements Module.

Definition at line 78 of file config.hpp.


The documentation for this class was generated from the following files: