This is a strict singleton class representing module ALib Camp. The only instance is found with the namespace variable BASECAMP.
Definition at line 108 of file basecamp.mpp.
Public Field Index: | |
| bool | HasConsoleWindow |
| String | LocaleFound |
| bool | WaitForKeyPressOnTermination =false |
| Public Field Index: inherited from alib::resources::ResourceHolder | |
| NCString | ResourceCategory |
Public Method Index: | |
| Basecamp () | |
| virtual void | Bootstrap () override |
| bool | IsDebuggerPresent () |
| virtual void | Shutdown (ShutdownPhases phase) override |
| Public Method Index: inherited from alib::camp::Camp | |
| void | BootstrapSetConfig (const SharedConfiguration &pConfig) |
| void | BootstrapSetPhase (BootstrapPhases phase) |
| void | BootstrapSetResourcePool (const SPResourcePool &pResourcePool) |
| BootstrapPhases | GetBootstrapState () |
| SharedConfiguration & | GetConfig () |
| bool | IsBootstrapped () |
| Public Method Index: inherited from alib::resources::ResourceHolder | |
| ResourceHolder (const NCString &resourceCategory=nullptr) | |
| ResourceHolder (SPResourcePool &pool, const NCString &resourceCategory) | |
| void | BootstrapResource (const NString &name, const String &data) |
| const String & | GetResource (const NString &name) |
| ResourcePool & | GetResourcePool () |
| SPResourcePool & | GetResourcePoolSP () |
| bool | HasPool () |
| void | Set (SPResourcePool &pool, const NCString &resourceCategory=nullptr) |
| const String & | TryResource (const NString &name) |
Additional Inherited Members | |
| Public Type Index: inherited from alib::resources::ResourceHolder | |
| using | SPResourcePool = SharedPtr<resources::ResourcePool, MonoAllocator> |
| Protected Field Index: inherited from alib::camp::Camp | |
| int | bootstrapState = 0 |
| SharedConfiguration | config |
| Protected Field Index: inherited from alib::resources::ResourceHolder | |
| SPResourcePool | resourcePool |
| Shared pointer to the resource pool. | |
| Protected Method Index: inherited from alib::camp::Camp | |
| Camp (Camp &&)=delete | |
| Deleted move constructor. | |
| Camp (const Camp &)=delete | |
| Deleted copy constructor. | |
| Camp (const NCString &resourceCategory) | |
| virtual | ~Camp () |
| Virtual destructor to satisfy C++ abstract type rules. | |
| void | operator= (Camp &&)=delete |
| Deleted move assignment. | |
| void | operator= (const Camp &)=delete |
| Deleted copy assignment. | |
| bool alib::camp::Basecamp::HasConsoleWindow |
This flag indicates if the current process has console output window attached. While this is not detectable in Unix like systems (or just with huge efforts), in windows it is. The determination is performed in Bootstrap and done as follows
true is returned.In addition, this public flag may be modified at run-time (after method Bootstrap was invoked).
Definition at line 136 of file basecamp.mpp.
| String alib::camp::Basecamp::LocaleFound |
This string is set during bootstrapping in the case that a locale information was found (via standard environment variables or ALib variable LOCALE) and successfully set.
Otherwise this string is nulled.
Definition at line 142 of file basecamp.mpp.
| bool alib::camp::Basecamp::WaitForKeyPressOnTermination =false |
If true, within Shutdown, it is waited for a key press in the console window.
By default, this flag is enabled when debugging a console application under Visual Studio.
This default behavior can be overruled by setting configuration variable ALIB/WAIT_FOR_KEY_PRESS.
In addition, this public flag may be modified at run-time (after method Bootstrap was invoked).
Definition at line 119 of file basecamp.mpp.
| alib::camp::Basecamp::Basecamp | ( | ) |
Constructor.
While this is public, it must not be invoked as this is a strict singleton type. (See notes in 2. Class Camp).
Definition at line 86 of file basecamp.cpp.
|
overridevirtual |
Implementation of virtual void Bootstrap() =0.
In phase BootstrapPhases::Final performs:
In glibc versions of ALib (GNU/unix) probably invoke glibc method setlocale(), depending on the setting of the environment variables LANG and LANGUAGE and depending on ALib configuration variable ALIB/LOCALE.
In addition, invokes SetFromLocale on static singleton NumberFormat::Global.
Implements alib::camp::Camp.
Definition at line 95 of file basecamp.cpp.
| bool alib::camp::Basecamp::IsDebuggerPresent | ( | ) |
If true, the current process is under the hood of a debugger.
true if the application is run in a debugger. Definition at line 653 of file basecamp.cpp.
|
overridevirtual |
Terminates this camp.
| phase | The shutdown phase to perform. |
Implements alib::camp::Camp.
Definition at line 622 of file basecamp.cpp.