ALib C++ Library
Library Version: 2412 R0
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#pragma once
14
15namespace alib {
16
17/// Lists all \alibcamps in the order of bootstrapping. Shutdown is performed in reverse order.
18/// This list is used by overloaded functions
19/// - \doxlinkproblem{namespacealib.html;ac33999bb9be31380c6ae139210d23083;alib::Bootstrap(BootstrapPhases targetPhase; lang::Camp* targetCamp, int,int,TCompilationFlags)}.
20///
21/// and
22/// - \doxlinkproblem{namespacealib.html;acd654b95c6e1833f4f04d0fc19e4ce36;alib::Shutdown(ShutdownPhases targetPhase; lang::Camp* targetCamp)}
23///
24/// For details on when and how to manipulate this list explicitly, see the detailed explanations in
25/// chapter \ref alib_manual_bootstrapping "4. Bootstrapping And Shutting Down ALib" of
26/// the \ref alib_manual.
27///
28/// \note Should for any reason it is needed to \b not use method \alib{BootstrapAddDefaultCamps}
29/// to default-fill this list before adding custom camps, then the allocator of this
30/// list has to be set before filling it. This can be done with:
31///
32/// CAMPS.GetAllocator()= monomem::GLOBAL_ALLOCATOR;
35
36/// Fills list \ref alib::CAMPS, taking the permutation of modules contained in the \alibdist into
37/// account.<br>
38/// This function is usually invoked automatically.
39///
40/// For details on when and how to explicitly invoke this function, see the detailed explanations in
41/// chapter \ref alib_manual_bootstrapping "4. Bootstrapping And Shutting Down ALib" of
42/// the \ref alib_manual.
45
46//==================================================================================================
47/// This function is usually invoked automatically and rightfully with the standard, parameterless
48/// version \ref alib::Bootstrap(int,int,TCompilationFlags) "alib::Bootstrap().
49///
50/// For details on when and how to invoke this method explicitly, see the detailed explanations in
51/// chapter \ref alib_manual_bootstrapping of the \ref alib_manual.
52///
53/// @param targetPhase The initialization level to perform.
54/// @param targetCamp The "highest" \alibcamp in list \alib{CAMPS} to bootstrap.
55/// Defaults to <c>nullptr</c>, which chooses the end of the list.
56/// @param alibVersion The \alib version required.
57/// Defaults to \ref ALIB_VERSION and \b must not be passed when invoking
58/// this function.
59/// @param alibRevision The \alib sub-version required.
60/// Defaults to \ref ALIB_REVISION and \b must not be passed when invoking
61/// this function.
62/// @param compilationFlags The flags as defined in invoking compilation unit.
63/// Defaults to
64/// \doxlinkproblem{group__GrpALibPreproMacros.html;gaac71b6511690f5af0abf5213b0434111;ALIB_COMPILATION_FLAGS;ALIB_COMPILATION_FLAGS}
65/// and must not be passed when
66/// invoking this function.
67//==================================================================================================
69void Bootstrap( BootstrapPhases targetPhase,
70 lang::Camp* targetCamp,
71 int alibVersion,
72 int alibRevision,
73 TCompilationFlags compilationFlags);
74
75//==================================================================================================
76/// This function is usually invoked automatically and rightfully with the standard, parameterless
77/// version \ref alib::Shutdown().
78///
79/// For details on when and how to invoke this method explicitly, see the detailed explanations in
80/// chapter \ref alib_manual_bootstrapping "4. Bootstrapping And Shutting Down ALib" of
81/// the \ref alib_manual.
82///
83/// @param targetPhase The termination level to perform.
84/// @param targetCamp The "lowest" \alibcamp in list \alib{CAMPS} to shut down.
85/// Defaults to <c>nullptr</c>, which chooses the start of the list.
86//==================================================================================================
88void Shutdown( ShutdownPhases targetPhase,
89 lang::Camp* targetCamp);
90
91} // namespace [alib]
92#endif // HPP_ALIB_LANG_CAMP_BOOTSTRAP
93
#define ALIB_API
Definition alib.hpp:639
Definition alib.cpp:69
ShutdownPhases
Termination levels usable with Bootstrapping ALib Camps.
Definition alib.hpp:1418
BootstrapPhases
Initialization levels usable with Bootstrapping ALib Camps.
Definition alib.hpp:1393
ALIB_API List< MonoAllocator, lang::Camp * > CAMPS
void BootstrapAddDefaultCamps()
Definition bootstrap.cpp:59
containers::List< TAllocator, T, TRecycling > List
Type alias in namespace alib.
Definition list.hpp:842
ALIB_WARNINGS_RESTORE void Bootstrap(int alibVersion, int alibRevision, TCompilationFlags compilationFlags)
Definition alib.cpp:84
void Shutdown()
Definition alib.cpp:122