ALib C++ Library
Library Version: 2312 R0
Documentation generated by doxygen
module.hpp
Go to the documentation of this file.
1 /** ************************************************************************************************
2  * \file
3  * This header file is part of file set \alibfs_modules of the \aliblong.
4  *
5  * \emoji :copyright: 2013-2023 A-Worx GmbH, Germany.
6  * Published under \ref mainpage_license "Boost Software License".
7  **************************************************************************************************/
8 #ifndef HPP_ALIB_FS_MODULES_MODULE
9 #define HPP_ALIB_FS_MODULES_MODULE 1
10 
11 #if !defined(HPP_ALIB_STRINGS_CSTRING)
12 # include "alib/strings/cstring.hpp"
13 #endif
14 
15 #if !defined (HPP_ALIB_RESOURCES_RESOURCES)
17 #endif
18 
19 #if !defined (HPP_ALIB_ENUMS_UNDERLYING_INTEGRAL)
21 #endif
22 
23 
24 ALIB_ASSERT_FILESET(MODULES)
25 
26 #if !defined (_GLIBCXX_ALGORITHM) && !defined(_ALGORITHM_)
27 # include <algorithm>
28 #endif
29 #if !defined (_GLIBCXX_VECTOR) && !defined(_VECTOR_)
30 # include <vector>
31 #endif
32 #if !defined (_GLIBCXX_LIST) && !defined(_LIST_)
33 # include <list>
34 #endif
35 
36 
37 namespace aworx {
38 namespace lib {
39 
40 namespace resources { class ResourcePool; }
41 namespace config { class Configuration; }
42 
43 
44 /** ************************************************************************************************
45  * This class is used by \alib to
46  *
47  * - manage library bootstrap and termination,
48  * - provide \ref alib_mod_resources "resources" and to
49  * - provide Configuration data (e.g. configuration files, command line parameters, etc.).
50  *
51  * Typically, every "full" \alibmod disposes about a type derived from this class. The singleton
52  * instances of these types are collected in namespace \ref aworx::lib and are named in
53  * capital letters, for example \ref aworx::lib::ALOX, \ref aworx::lib::EXPRESSIONS, etc.
54  *
55  * Types found in an \alibmod_nl, will use methods \alib{Module,GetResourcePool} and
56  * \alib{Module,GetConfig} of that singleton to access resources and to read and write configuration
57  * data.
58  * With that, it has to be kept in mind that these objects most probably are shared with other
59  * modules. As a consequence, clear and understandable resource and variable categories and names
60  * are to be used, to avoid conflicting entries.
61  *
62  * The \ref alib_manual provides several chapters that explain how
63  * \ref alib_manual_bootstrapping "3. Bootstrapping ALib" is performed with the help of this
64  * class.<br>
65  * Furthermore, source code sample is given with the
66  * \ref alib_cli_tut "tutorial of ALib module CLI".
67  *
68  * Often, types that comprise a "module singleton" (as the derived types shown in the inheritance
69  * diagram above) incorporate some further functionality specific to the field of application that
70  * a module covers.
71  *
72  * # Reference Documentation #
73  **************************************************************************************************/
74 class Module
75 {
76  public:
77  /** Initialization levels usable with #Bootstrap methods. */
78  enum class BootstrapPhases
79  {
80  PrepareResources = 1, ///< Creates field #resourcePool and loads its module specific
81  ///< default values.
82  PrepareConfig = 2, ///< Initializes up to the creation of a field
83  ///< \aworx{lib::Module,config}.
84  Final = 3, ///< The final initialization phase.
85  };
86 
87  /** Termination levels usable with #Shutdown methods. */
88  enum class ShutdownPhases
89  {
90  Announce = 1, ///< Signals termination. Keeps resources, config, etc.
91  ///< intact. Usable to write configuration data, stop
92  ///< background threads, etc.
93  Destruct = 2, ///< The main phase of termination that destructs everything.
94  };
95 
96  // #############################################################################################
97  // internals
98  // #############################################################################################
99  protected:
100 
101  /** State of initialization, used to avoid double initialization. */
102  int bootstrapState = 0;
103 
104  /** State of initialization of the "micro modules". */
106 
107  /**
108  * Pointer to the resource pool.
109  * An instance is created and assigned with the invocation of one of the #Bootstrap methods.
110  * This instance is then passed to all dependent libraries (recursively) and this way
111  * shared. Dependent libraries that are to an own dedicated instance, have to be initialized
112  * explicitly prior to initializing this module.
113  */
115 
116  /**
117  * If a default instance of type \alib{resources,LocalResourcePool} has been created when
118  * this module was initialized, this flag evaluates to \c true and the instance stored in
119  * #resourcePool will be deleted with destruction of this object.
120  */
121  bool isResourceOwner = false;
122 
123 
124  #if ALIB_CONFIGURATION
125  /**
126  * Pointer to the configuration instance used to load variable configuration data.
127  * An instance is created and assigned with the invocation of one of the #Bootstrap methods.
128  * This instance is then passed to all dependent libraries (recursively) and this way
129  * shared. Dependent libraries that are to an own dedicated instance, have to be
130  * initialized explicitly prior to initializing this module.
131  *
132  * Access to the field is provided with method #GetConfig.
133  *
134  * \note
135  * This field is available only with \alib module
136  * \ref aworx::lib::config "Configuration" included.
137  */
139 
140  /**
141  * If a configuration instance has been created when this module was initialized, this
142  * flag evaluates to \c true and the instance stored in
143  * #config will be deleted with destruction of this object.
144  */
145  bool isConfigOwner = false;
146  #endif // ALIB_CONFIGURATION
147 
148  // #############################################################################################
149  // Public fields
150  // #############################################################################################
151  public:
152  /**
153  * The module version. Standard \alib versioning scheme is YYMM (as integer number)
154  * of the module release date.
155  * Besides this version number, field #Revision indicates if this is a revised version
156  * of a former release.
157  */
158  const int Version;
159 
160  /**
161  * The revision number of this release. Usually a module is initially released as
162  * revision \e 0. Pure bug-fix releases that do not change the interface of \alib
163  * are holding the same #Version but an increased number in this field.
164  */
165  const int Revision;
166 
167  /**
168  * The name of the configuration category of configuration variables used by this module.<br>
169  * \alib itself uses "ALIB". \alib modules use the naming scheme
170  * <c>ALIB_{MODULE_NAMESPACE}</c>.<br>
171  */
173 
174  /**
175  * These flags are used internally to detect incompatibilities when linking \alib to
176  * binaries that use different compilation flags.
177  * Declared public to allow exposure, e.g. in verbose logging.
178  * \see Method #VerifyCompilationFlags for more information.
179  */
180  const uint64_t CompilationFlags;
181 
182  /**
183  * This is for the creation of output on information about the bits found in
184  * field #CompilationFlags.
185  * Declared public to allow exposure, e.g. in verbose logging.
186  * \see Method #VerifyCompilationFlags for more information.
187  */
188  std::vector<std::pair <const nchar*, uint64_t>> CompilationFlagMeanings;
189 
190 
191  // #############################################################################################
192  // Constructor/Destructor
193  // #############################################################################################
194  public:
195  /** ****************************************************************************************
196  * Constructor. Just stores the given values in corresponding fields.
197  * @param version Value for field #Version.
198  * @param revision Value for field #Revision.
199  * @param resourceCategory Value for field #ResourceCategory.
200  * @param compilationFlags Value for field #CompilationFlags.
201  * See method #VerifyCompilationFlags.
202  * Defaults to \c 0.
203  ******************************************************************************************/
204  Module( int version,
205  int revision,
206  const NCString& resourceCategory,
207  uint64_t compilationFlags = 0 )
208  : Version (version )
209  , Revision (revision )
210  , ResourceCategory(resourceCategory)
211  , CompilationFlags(compilationFlags)
212  {}
213 
214  /** Deleted copy constructor. */
215  Module( const Module& ) = delete;
216 
217  /** Deleted move constructor. */
218  Module( Module&& ) = delete;
219 
220  /** Deleted copy assignment. */
221  void operator=( const Module& ) = delete;
222 
223  /** Deleted move assignment. */
224  void operator=( Module&& ) = delete;
225 
226 
227  /** ****************************************************************************************
228  * Virtual destructor to satisfy virtual methods.
229  ******************************************************************************************/
230  virtual ~Module()
231  {
233  "MODULES",
234  "Destructing a non-terminated module. "
235  "Module Resource category: ", ResourceCategory )
236  }
237 
238  // #############################################################################################
239  // Bootstrap/Shutdown()
240  // #############################################################################################
241  public:
242 
243  /** ****************************************************************************************
244  * Initializes this module up to the given \p{targetPhase}.
245  * If the module was initialized for the given level already, nothing is done and
246  * \c false is returned.
247  *
248  * Checks if module list \alib{ALibDistribution::Modules} of singleton #aworx::ALIB
249  * was filled already (by the using software for the purpose to add custom modules).
250  * If not, \alib{ALibDistribution::BootstrapFillDefaultModuleList} is invoked to place
251  * the \alib modules as contained in the \alibdist_nl.
252  *
253  * If method \alib{Module,BootstrapSetResourcePool} is \b not invoked prior to invoking this
254  * method, an object of type \alib{resources,LocalResourcePool} is created and shared with
255  * each lower-level module, until a module is found that has a resource pool set.
256  *
257  * If method \alib{Module,BootstrapSetConfig} is \b not invoked prior to invoking this
258  * method, with parameter \p{targetPhase} set equal or higher than
259  * \aworx{lib,Module::BootstrapPhases::PrepareConfig,BootstrapPhases::PrepareConfig}, then
260  * an object of type \alib{config,Configuration} is created and shared with each lower-level
261  * module, until a module is found that has a configuration instance set.
262  *
263  * This approach of creating and distributing the resource pool and the configuration,
264  * together with the possibility to invoke this method on a module that resides anywhere
265  * in list \alib{ALibDistribution::Modules}, allows to customize bootstrapping and module
266  * setup in various ways.
267  *
268  * Parameters \p{argc}, \p{argvN} and \p{argvW} may be used to provide command line
269  * arguments. They will be passed to abstract method #bootstrap of all dependent libraries.
270  * Special singleton \ref aworx::ALIB of type \alib{ALibDistribution} will store the
271  * parameters for convenience in publicly accessible fields.
272  * Note that only either of parameters \p{argvN} and \p{argvW} is to be provided
273  * (the other should be \e nulled), depending on system/compilation preferences and on the
274  * character size that the compilation toolset provides with method \c main().
275  *
276  * \see
277  * For details on when and how to invoke this method, see the detailed explanations in
278  * chapter \ref alib_manual_bootstrapping "3. Bootstrapping ALib" of the \ref alib_manual.
279  *
280  * @param targetPhase The initialization level to perform.
281  * Defaults to <c>BootstrapPhases::Final</c>.
282  * @param argc Parameter usually taken from <em>standard C</em> \c main() method
283  * (the number of arguments in \p{argv}).
284  * Defaults to <c>0</c>.
285  * @param argvN The command line parameters given as a zero-terminated list to
286  * zero-terminated narrow strings.
287  * Defaults to <c>nullptr</c>.
288  * @param argvW The command line parameters given as a zero-terminated list to
289  * zero-terminated wide strings.
290  * Defaults to <c>nullptr</c>.
291  * @return \c true if the module was not initialized before, \c false otherwise.
292  ******************************************************************************************/
293  ALIB_API
295  int argc = 0,
296  const char** argvN = nullptr,
297  const wchar_t** argvW = nullptr );
298 
299 #if defined(ALIB_DOX)
300  /** ****************************************************************************************
301  * Inline convenience shortcut to method
302  * \alib{Module,Bootstrap(BootstrapPhases\,int\,const char**\,const wchar_t**)} accepting
303  * either \b narrow or \b wide character command line arguments using one templated
304  * method parameter.
305  *
306  * @tparam TChar The character type of parameter \p{argv}.
307  * @param argc The number of arguments.
308  * @param argv The command line arguments as \b nchar or \b wchar, constant or not.
309  * @param targetPhase The initialization level to perform.
310  * Defaults to \alib{Module,BootstrapPhases::Final}.
311  * @return \c true if the module was not initialized before, \c false otherwise.
312  ******************************************************************************************/
313  template<typename TChar>
314  bool Bootstrap( int argc, TChar** argv, BootstrapPhases targetPhase= BootstrapPhases::Final );
315 #else
316  template<typename TChar>
317  ATMP_T_IF( bool, ATMP_EQ( ATMP_RC(TChar), char )
318  || ATMP_EQ( ATMP_RC(TChar), wchar_t) )
319  Bootstrap( int argc, TChar** argv, BootstrapPhases targetPhase= BootstrapPhases::Final )
320  {
321  if( std::is_same<typename std::remove_const<TChar>::type, char>::value )
322  return Bootstrap( targetPhase, argc,
323  reinterpret_cast<const char **>(const_cast<const TChar**>(argv)),
324  nullptr );
325  else
326  return Bootstrap( targetPhase, argc, nullptr,
327  reinterpret_cast<const wchar_t**>(const_cast<const TChar**>(argv)));
328  }
329 #endif
330 
331  /** ****************************************************************************************
332  * De-initializes modules found in list \alib{ALibDistribution::Modules} of singleton
333  * #aworx::ALIB# in reverse order.
334  *
335  * With built-in \alibmods_nl, no urgent actions are performed apart from memory
336  * de-allocation, which is anyhow done by modern operating systems with the termination of
337  * a process. However, still this method should be invoked in the case of future changes.
338  * Also, if using memory analysis tools (such as Valgrind) it is important to remove any
339  * internal allocations before a program terminates.
340  *
341  * Custom modules might use the first of the two termination levels
342  * (\alib{Module,ShutdownPhases::Announce}) to close background threads or write
343  * configuration data.
344  *
345  * Only in the second level (\alib{Module,ShutdownPhases::Destruct}) actions are to be taken
346  * that disables and destructs a software.
347  *
348  * @param targetPhase The termination level to perform.
349  * Defaults to \alib{Module,ShutdownPhases::Destruct}.
350  ******************************************************************************************/
351  ALIB_API
352  void Shutdown( ShutdownPhases targetPhase= ShutdownPhases::Destruct );
353 
354 
355  /** ****************************************************************************************
356  * Tests if the module was completely initialized.
357  * @return
358  * \c true if the initialization state is either \alib{Module,BootstrapPhases::Final} or
359  * \alib{Module,ShutdownPhases::Announce}, \c false otherwise.
360  ******************************************************************************************/
362  {
365  }
366 
367  // #############################################################################################
368  // Other public interface methods
369  // #############################################################################################
370  public:
371  #if ALIB_CONFIGURATION
372  /** ************************************************************************************
373  * Sets the configuration object of this module.
374  *
375  * \attention
376  * This method must be invoked before method #Bootstrap is invoked with
377  * parameter \p{targetPhase} set equal or higher than
378  * \alib{Module,BootstrapPhases::PrepareConfig},
379  * because in this phase, internally a configuration is created if none is set.
380  *
381  * \attention
382  * Method #Bootstrap will distribute the given instance to each lower level
383  * module that has not received a different object.
384  *
385  * \see
386  * Chapter \ref alib_manual_bootstrapping of the Programmer's Manual of \alib.
387  *
388  * @param pConfig The external configuration object to use.
389  **************************************************************************************/
391  {
392  ALIB_ASSERT_ERROR( config == nullptr, "MODULES",
393  "This module already has a configuration object set." )
394  config= pConfig;
395  }
396 
397  /** ************************************************************************************
398  * Returns a reference to the configuration object.
399  * @return The configuration object set with bootstrapping.
400  **************************************************************************************/
402  {
403  return *config;
404  }
405  #endif
406 
407  /** ****************************************************************************************
408  * Sets the resource pool of this module.
409  *
410  * \attention
411  * This method must be invoked before method #Bootstrap,
412  * because in the first phase \alib{Module,BootstrapPhases::PrepareConfig}, internally a
413  * pool of type \alib{resources,LocalResourcePool} is created if none is set.
414  *
415  * \attention
416  * Method #Bootstrap will distribute the given instance to each lower level
417  * module that has not received a different object.
418  *
419  * \see
420  * Chapter \ref alib_manual_bootstrapping of the Programmer's Manual of \alib.
421  *
422  * @param pool The external resource pool to use.
423  ******************************************************************************************/
425  {
426  ALIB_ASSERT_ERROR( bootstrapState == 0, "MODULES",
427  "A custom resource pool must be set prior to module initialization.")
428  resourcePool= pool;
429  }
430 
431  /** ****************************************************************************************
432  * Returns a reference to the resource pool.
433  * @return The resource pool set with bootstrapping.
434  ******************************************************************************************/
436  {
437  return *resourcePool;
438  }
439 
440  /** ****************************************************************************************
441  * Shortcut method that invokes \alib{resources,ResourcePool::Bootstrap} on field
442  * #resourcePool providing field #ResourceCategory as parameter.
443  *
444  * @param name The resource name.
445  * @param data The resource data string.
446  ******************************************************************************************/
447  void BootstrapResource( const NString& name, const String& data )
448  {
449  resourcePool->Bootstrap( ResourceCategory, name, data );
450  }
451 
452  /** ****************************************************************************************
453  * Shortcut method that invokes \alib{resources,ResourcePool::Get} on field
454  * #resourcePool providing field #ResourceCategory as parameter.
455  *
456  * With debug builds, this method asserts that a resource was found. If this is not
457  * wanted, use #TryResource.
458  *
459  * @param name The resource name.
460  * @return The resource string, respectively a \e nulled string on failure.
461  ******************************************************************************************/
462  const String& GetResource( const NString& name )
463  {
464  return resourcePool->Get( ResourceCategory, name ALIB_DBG(, true) );
465  }
466 
467  /** ****************************************************************************************
468  * Shortcut method that invokes \alib{resources,ResourcePool::Get} on field
469  * #resourcePool providing field #ResourceCategory as parameter.
470  *
471  * \note
472  * Usually, it is recommended to use #GetResource, which asserts with debug builds
473  * if a resource was not found.
474  * @param name The resource name.
475  * @return The resource string, respectively a \e nulled string on failure.
476  ******************************************************************************************/
477  const String& TryResource( const NString& name )
478  {
479  return resourcePool->Get( ResourceCategory, name ALIB_DBG(, false) );
480  }
481 
482  /** ****************************************************************************************
483  * Compares a given set of compilation flags with the internal set. This is an optional
484  * feature of modules which expose compiler definitions that lead to incompatible
485  * module versions when mixed.
486  *
487  * If used, the following steps have to be performed:
488  * - By the module that offers the feature:
489  * - Expose a preprocessor macro that collects the bits at compile-time.
490  * As a sample see macro \ref ALIB_COMPILATION_FLAGS.
491  * - The constructor of the derived module needs to be defined in a compilation unit of
492  * the module (aka not inline) and needs to pass the macro as the value for optional
493  * parameter \p{compilationFlags} to this class's constructor.
494  * - The constructor of the derived module needs to fill field #CompilationFlagMeanings.
495  *
496  * - The user of the module now invokes this method in bootstrap, hence preferably at
497  * the beginning of method #bootstrap with \alib{Module,BootstrapPhases::PrepareResources}.
498  *
499  * In case they are different in a way that the module gets incompatible (e.g. different
500  * class sizes, which results in errors which are confusing the debugger), the flags are
501  * written to \c std::cout for comparison and \c false is returned.
502  *
503  * @param compilationFlags The flags as defined in invoking compilation unit.
504  * Defaults to \c ALIB_COMPILATION_FLAGS.
505  *
506  * @return \c true if compatible, \c false else.
507  ******************************************************************************************/
508  ALIB_API
509  bool VerifyCompilationFlags( uint64_t compilationFlags );
510 
511 
512  // #############################################################################################
513  // Internal methods
514  // #############################################################################################
515  protected:
516  /** ****************************************************************************************
517  * Abstract method which is invoked during bootstrapping by method #Bootstrap for each
518  * phase, with all modules found in list \alib{ALibDistribution::Modules} of singleton
519  * #aworx::ALIB.
520  *
521  * Note that the availability of parameters \p{argc}, \p{argv} and \p{wargv} depend
522  * on the using code of the library, namely if there, the arguments are passed to
523  * \alib{Module::Bootstrap}.
524  *
525  * @param phase The initialization phase to perform.
526  * @param argc The number of command line arguments. Defaults to \c 0.
527  * @param argv List of command line arguments if given as single byte character strings.
528  * @param wargv List of command line arguments if given as multi-byte character strings.
529  ******************************************************************************************/
530  virtual void bootstrap( BootstrapPhases phase,
531  int argc, const char** argv, const wchar_t** wargv ) = 0;
532 
533  /** ****************************************************************************************
534  * Abstract method invoked by #Shutdown.
535  * @param phase The termination level to perform.
536  ******************************************************************************************/
537  virtual void shutdown( ShutdownPhases phase ) = 0;
538 
539 };// class Module
540 
541 } // namespace aworx[::lib]
542 
543 /// Type alias in namespace #aworx.
545 
546 /// Type alias in namespace #aworx.
548 
549 } // namespace [aworx]
550 
551 
552 
553 #endif // HPP_ALIB_FS_MODULES_MODULE
aworx::lib::enums::UnderlyingIntegral
constexpr std::underlying_type< TEnum >::type UnderlyingIntegral(TEnum element) noexcept(true)
aworx::lib::Module::Revision
const int Revision
Definition: module.hpp:165
aworx::lib::Module::ShutdownPhases::Destruct
The main phase of termination that destructs everything.
aworx::lib::Module::resourcePool
resources::ResourcePool * resourcePool
Definition: module.hpp:114
ATMP_T_IF
#define ATMP_T_IF(T, Cond)
Definition: tmp.hpp:53
underlyingintegral.hpp
aworx::lib::Module::ShutdownPhases
ShutdownPhases
Definition: module.hpp:88
ALIB_ASSERT_FILESET
#define ALIB_ASSERT_FILESET(filesetname)
Definition: modules.hpp:242
resources.hpp
aworx::lib::Module::shutdown
virtual void shutdown(ShutdownPhases phase)=0
aworx::lib::Module::BootstrapPhases
BootstrapPhases
Definition: module.hpp:78
aworx::lib::Module::bootstrapState
int bootstrapState
Definition: module.hpp:102
ATMP_RC
#define ATMP_RC( T)
Definition: tmp.hpp:36
aworx::lib::Module::BootstrapPhases::PrepareResources
aworx::lib::Module::TryResource
const String & TryResource(const NString &name)
Definition: module.hpp:477
aworx::lib::Module::operator=
void operator=(const Module &)=delete
aworx::lib::strings::TString< nchar >
aworx::lib::Module::Module
Module(int version, int revision, const NCString &resourceCategory, uint64_t compilationFlags=0)
Definition: module.hpp:204
aworx::lib::Module::ResourceCategory
NCString ResourceCategory
Definition: module.hpp:172
aworx::lib::Module::~Module
virtual ~Module()
Definition: module.hpp:230
aworx::lib::Module::bootstrap
virtual void bootstrap(BootstrapPhases phase, int argc, const char **argv, const wchar_t **wargv)=0
aworx::lib::resources::ResourcePool::Get
virtual const String & Get(const NString &category, const NString &name, bool dbgAssert)=0
aworx::lib::Module::isConfigOwner
bool isConfigOwner
Definition: module.hpp:145
aworx::lib::Module::config
config::Configuration * config
Definition: module.hpp:138
aworx::lib::Module::Bootstrap
ALIB_API bool Bootstrap(BootstrapPhases targetPhase=BootstrapPhases::Final, int argc=0, const char **argvN=nullptr, const wchar_t **argvW=nullptr)
Definition: module.cpp:64
ATMP_EQ
#define ATMP_EQ( T, TEqual)
Definition: tmp.hpp:32
aworx::lib::Module::Shutdown
ALIB_API void Shutdown(ShutdownPhases targetPhase=ShutdownPhases::Destruct)
Definition: module.cpp:249
aworx
Definition: alox/alox.hpp:40
aworx::lib::Module::BootstrapResource
void BootstrapResource(const NString &name, const String &data)
Definition: module.hpp:447
ALIB_DBG
#define ALIB_DBG(...)
Definition: compilers.hpp:44
aworx::lib::Module::BootstrapPhases::Final
The final initialization phase.
aworx::lib::Module::GetConfig
config::Configuration & GetConfig()
Definition: module.hpp:401
ALIB_ASSERT_ERROR
#define ALIB_ASSERT_ERROR(cond,...)
Definition: tools.hpp:185
ALIB_API
#define ALIB_API
Definition: compilers.hpp:150
aworx::Configuration
lib::config::Configuration Configuration
Type alias in namespace aworx.
Definition: configuration.hpp:487
aworx::lib::Module::VerifyCompilationFlags
ALIB_API bool VerifyCompilationFlags(uint64_t compilationFlags)
Definition: module.cpp:354
aworx::lib::config::Configuration
Definition: configuration.hpp:62
ALIB_ASSERT_WARNING
#define ALIB_ASSERT_WARNING(cond,...)
Definition: tools.hpp:186
aworx::lib::Module::CompilationFlagMeanings
std::vector< std::pair< const nchar *, uint64_t > > CompilationFlagMeanings
Definition: module.hpp:188
aworx::lib::Module::BootstrapSetResourcePool
void BootstrapSetResourcePool(resources::ResourcePool *pool)
Definition: module.hpp:424
aworx::lib::strings::TCString< nchar >
aworx::lib::Module::microModulesInitialized
static bool microModulesInitialized
Definition: module.hpp:105
aworx::lib::Module::BootstrapPhases::PrepareConfig
aworx::lib::Module::BootstrapSetConfig
void BootstrapSetConfig(config::Configuration *pConfig)
Definition: module.hpp:390
aworx::lib::Module
Definition: module.hpp:74
aworx::lib::Module::ShutdownPhases::Announce
aworx::lib::Module::IsBootstrapped
bool IsBootstrapped()
Definition: module.hpp:361
aworx::ResourcePool
lib::resources::ResourcePool ResourcePool
Type alias in namespace aworx.
Definition: resources.hpp:620
aworx::lib::Module::isResourceOwner
bool isResourceOwner
Definition: module.hpp:121
aworx::lib::Module::Version
const int Version
Definition: module.hpp:158
aworx::lib::Module::CompilationFlags
const uint64_t CompilationFlags
Definition: module.hpp:180
aworx::lib::resources::ResourcePool
Definition: resources.hpp:55
aworx::lib::resources::ResourcePool::Bootstrap
void Bootstrap(const NString &category, const NString &name, const String &data)
Definition: resources.hpp:101
aworx::lib::Module::GetResource
const String & GetResource(const NString &name)
Definition: module.hpp:462
aworx::lib::Module::GetResourcePool
ResourcePool & GetResourcePool()
Definition: module.hpp:435
cstring.hpp