ALib C++ Library
Library Version: 2412 R0
Documentation generated by doxygen
Loading...
Searching...
No Matches
configcamp.hpp
Go to the documentation of this file.
1//==================================================================================================
2/// \file
3/// This header file is part of module \alib_config of the \aliblong.
4///
5/// \emoji :copyright: 2013-2024 A-Worx GmbH, Germany.
6/// Published under \ref mainpage_license "Boost Software License".
7//==================================================================================================
8#ifndef HPP_ALIB_CONFIG_CAMP
9#define HPP_ALIB_CONFIG_CAMP 1
10#pragma once
15
16
17namespace alib { namespace config {
18
19
20//==================================================================================================
21/// Exception codes of namespace #alib::config.
22//==================================================================================================
23enum class Exceptions
24{
25 /// File not found when reading.
27
28 /// An error occurred writing the file .
30};
31
32
33//==================================================================================================
34/// The module class.
35///
36/// This is a strict singleton class. The only instance is found with namespace variable
37/// \ref alib::CONFIG.
38//==================================================================================================
39class ConfigCamp : public lang::Camp
40{
41 public:
42 //==========================================================================================
43 /// Constructor.<br>
44 /// While this is public, it must not be invoked as this is a strict singleton type.
45 /// (See notes in \ref alib_manual_camp_modules_campmodule).
46 //==========================================================================================
47 ConfigCamp();
48
49 protected:
50 //==========================================================================================
51 /// Initializes this camp.
52 /// @param phase The initialization phase to perform.
53 //==========================================================================================
54 virtual void bootstrap( BootstrapPhases phase ) override;
55
56 //==========================================================================================
57 /// Terminates this camp. (Nothing to do.)
58 /// @param phase The shutdown phase to perform.
59 //==========================================================================================
60 virtual void shutdown( ShutdownPhases phase ) override { (void) phase; }
61
62}; // class ConfigCamp
63
64} // namespace alib[::config]
65
66
67/// The singleton instance of \alibcamp class \alib{config;ConfigCamp}.
68extern ALIB_API config::ConfigCamp CONFIG;
69
70} // namespace [alib]
71
72
73
77
78#endif // HPP_ALIB_CONFIG_CAMP
79
virtual void bootstrap(BootstrapPhases phase) override
virtual void shutdown(ShutdownPhases phase) override
#define ALIB_ENUMS_ASSIGN_RECORD(TEnum, TRecord)
Definition records.hpp:712
#define ALIB_API
Definition alib.hpp:639
#define ALIB_BOXING_VTABLE_DECLARE(TMapped, Identifier)
Definition vtable.inl:460
#define ALIB_RESOURCED_IN_MODULE(T, Camp, ResName)
Exceptions
Exception codes of namespace alib::config.
@ ErrorWritingFile
An error occurred writing the file .
@ ErrorOpeningFile
File not found when reading.
Definition alib.cpp:69
ShutdownPhases
Termination levels usable with Bootstrapping ALib Camps.
Definition alib.hpp:1418
config::ConfigCamp CONFIG
The singleton instance of ALib Camp class ConfigCamp.
BootstrapPhases
Initialization levels usable with Bootstrapping ALib Camps.
Definition alib.hpp:1393