#include <cli.hpp>
The module class for module ALib CLI.
This is a strict singleton class. The only instance is found with namespace variable aworx::lib::CLI.
Public Methods | |
Cli () | |
![]() | |
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::Configuration & | GetConfig () |
const String & | GetResource (const NString &name) |
ResourcePool & | GetResourcePool () |
bool | IsBootstrapped () |
void | operator= (const Module &)=delete |
void | operator= (Module &&)=delete |
ALIB_API void | Shutdown (ShutdownPhases targetPhase=ShutdownPhases::Destruct) |
const String & | TryResource (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 | |
![]() | |
enum | BootstrapPhases { PrepareResources = 1, PrepareConfig = 2, Final = 3 } |
enum | ShutdownPhases { Announce = 1, Destruct = 2 } |
![]() | |
std::vector< std::pair< const nchar *, uint64_t > > | CompilationFlagMeanings |
const uint64_t | CompilationFlags |
NCString | ResourceCategory |
const int | Revision |
const int | Version |
![]() | |
static bool | microModulesInitialized = false |
![]() | |
int | bootstrapState = 0 |
config::Configuration * | config = nullptr |
bool | isConfigOwner = false |
bool | isResourceOwner = false |
resources::ResourcePool * | resourcePool = nullptr |
Cli | ( | ) |
Constructor.
While this is public, it must not be invoked as this is a strict singleton type. (See notes in 3.2.1 Singletons).
|
overrideprotectedvirtual |
Initializes module module ALib CLI.
phase | The initialization phase to perform. |
argc | The number of command line arguments. Defaults to 0 . |
argv | List of command line arguments if given as single byte character strings. |
wargv | List of command line arguments if given as multi-byte character strings. |
Implements Module.
Definition at line 52 of file cli.cpp.
|
inlineoverrideprotectedvirtual |