ALib C++ Library
Library Version: 2402 R1
Documentation generated by doxygen
Loading...
Searching...
No Matches
bootstrap.hpp
Go to the documentation of this file.
1/** ************************************************************************************************
2 * \file
3 * This header file is part of module \alib_basecamp 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_LANG_CAMP_BOOTSTRAP
9#define HPP_ALIB_LANG_CAMP_BOOTSTRAP 1
10
11#if !defined(HPP_ALIB_LANG_CAMP)
13#endif
14
15#if !defined(HPP_ALIB_MONOMEM_LIST)
16# include "alib/monomem/list.hpp"
17#endif
18
19namespace alib {
20
21/**
22 * Lists all \alibcamps in the order of bootstrapping. Shutdown is performed in reverse order.
23 * This list is used by overloaded functions
24 * - \doxlinkproblem{namespacealib.html;ac33999bb9be31380c6ae139210d23083;alib::Bootstrap(BootstrapPhases targetPhase; lang::Camp* targetCamp, int,int,TCompilationFlags)}.
25
26 * and
27 * - \doxlinkproblem{namespacealib.html;acd654b95c6e1833f4f04d0fc19e4ce36;alib::Shutdown(ShutdownPhases targetPhase; lang::Camp* targetCamp)}
28.
29 *
30 * For details on when and how to manipulate this list explicitly, see the detailed explanations in
31 * chapter \ref alib_manual_bootstrapping "4. Bootstrapping And Shutting Down ALib" of
32 * the \ref alib_manual.
33 */
35extern List<lang::Camp*> Camps;
36
37/**
38 * Fills list \ref alib::Camps, taking the permutation of modules contained in the \alibdist into
39 * account.<br>
40 * This function is usually invoked automatically.
41 *
42 * For details on when and how to explicitly invoke this function, see the detailed explanations in
43 * chapter \ref alib_manual_bootstrapping "4. Bootstrapping And Shutting Down ALib" of
44 * the \ref alib_manual.
45 */
48
49/** ************************************************************************************************
50 * This function is usually invoked automatically and rightfully with the standard, parameterless
51 * version \ref alib::Bootstrap(int,int,TCompilationFlags) "alib::Bootstrap().
52 *
53 * For details on when and how to invoke this method explicitly, see the detailed explanations in
54 * chapter \ref alib_manual_bootstrapping of the \ref alib_manual.
55 *
56 * @param targetPhase The initialization level to perform.
57 * @param targetCamp The "highest" \alibcamp in list \alib{Camps} to bootstrap.
58 * Defaults to <c>nullptr</c>, which chooses the end of the list.
59 * @param alibVersion The \alib version required.
60 * Defaults to \ref ALIB_VERSION and \b must not be passed when invoking
61 * this function.
62 * @param alibRevision The \alib sub-version required.
63 * Defaults to \ref ALIB_REVISION and \b must not be passed when invoking
64 * this function.
65 * @param compilationFlags The flags as defined in invoking compilation unit.
66 * Defaults to
67 * \doxlinkproblem{group__GrpALibPreproMacros.html;gaac71b6511690f5af0abf5213b0434111;ALIB_COMPILATION_FLAGS;ALIB_COMPILATION_FLAGS}
68 * and must not be passed when
69 * invoking this function.
70 **************************************************************************************************/
72void Bootstrap( BootstrapPhases targetPhase,
73 lang::Camp* targetCamp = nullptr,
74 int alibVersion = ALIB_VERSION,
75 int alibRevision = ALIB_REVISION,
76 TCompilationFlags compilationFlags = TCompilationFlags{ALIB_COMPILATION_FLAGS} );
77
78/** ************************************************************************************************
79 * This function is usually invoked automatically and rightfully with the standard, parameterless
80 * version \ref alib::Shutdown().
81 *
82 * For details on when and how to invoke this method explicitly, see the detailed explanations in
83 * chapter \ref alib_manual_bootstrapping "4. Bootstrapping And Shutting Down ALib" of
84 * the \ref alib_manual.
85 *
86 * @param targetPhase The termination level to perform.
87 * @param targetCamp The "lowest" \alibcamp in list \alib{Camps} to shut down.
88 * Defaults to <c>nullptr</c>, which chooses the start of the list.
89 **************************************************************************************************/
91void Shutdown( ShutdownPhases targetPhase,
92 lang::Camp* targetCamp = nullptr );
93
94} // namespace [alib]
95#endif // HPP_ALIB_LANG_CAMP_BOOTSTRAP
#define ALIB_REVISION
Definition alib.hpp:24
#define ALIB_VERSION
Definition alib.hpp:23
#define ALIB_API
Definition alib.hpp:538
Definition alib.cpp:57
ShutdownPhases
Definition camp.hpp:35
ALIB_API List< lang::Camp * > Camps
BootstrapPhases
Definition camp.hpp:26
void BootstrapAddDefaultCamps()
Definition bootstrap.cpp:83
ALIB_WARNINGS_RESTORE void Bootstrap(int alibVersion, int alibRevision, TCompilationFlags compilationFlags)
Definition alib.cpp:72
void Shutdown()
Definition alib.cpp:94