ALib C++ Library
Library Version: 2412 R0
Documentation generated by doxygen
Loading...
Searching...
No Matches
alib.cpp
1// #################################################################################################
2// ALib C++ Library
3//
4// Copyright 2013-2024 A-Worx GmbH, Germany
5// Published under 'Boost Software License' (a free software license, see LICENSE.txt)
6// #################################################################################################
8#if !DOXYGEN
11# if ALIB_CAMP
13# endif
14# if ALIB_SINGLETONS
16# endif
17# if ALIB_BOXING
18# include "alib/boxing/boxing.hpp"
19# endif
20# if ALIB_TIME
21# include "alib/time/time.hpp"
22# endif
23# if ALIB_ENUMS
24# include "alib/enums/records.hpp"
26# endif
27# if ALIB_MONOMEM
29# endif
30# if ALIB_THREADMODEL
32# endif
33# if ALIB_THREADS
36# endif
37# if ALIB_STRINGS
40# endif
41# if ALIB_ALOX
42# include "alib/alox/aloxcamp.hpp"
43# endif
44# if ALIB_CONFIGURATION
46# endif
47# if ALIB_CLI
48# include "alib/cli/clicamp.hpp"
49# endif
50# if ALIB_EXPRESSIONS
52# endif
53# if ALIB_FILES
55# endif
56# if ALIB_CAMP
59# endif
60#endif // !DOXYGEN
61
62#include <iostream>
63#include <iomanip>
64
65
66// #################################################################################################
67// Boostrapping & Shutdown
68// #################################################################################################
69namespace alib {
70
71int ARG_C = 0;
72const char** ARG_VN= nullptr;
73const wchar_t** ARG_VW= nullptr;
74
76
78unsigned char REVISION = ALIB_REVISION;
80TCompilationFlags COMPILATION_FLAGS = {ALIB_COMPILATION_FLAGS};
82
83
84void Bootstrap( int alibVersion, int alibRevision, TCompilationFlags compilationFlags )
85{
86 // verify ALib
87 AssertALibVersionAndFlags( alibVersion, alibRevision, compilationFlags );
88
89 #if ALIB_MONOMEM
90 // if the global allocator was not initialized from outside, then we have to do it.
91 if (!monomem::GLOBAL_ALLOCATOR.IsInitialized())
93 #endif
94
95
96 #if ALIB_CAMP
97 if(CAMPS.IsEmpty())
100 #else
102 {
103 IF_ALIB_TIME ( time ::Bootstrap(); )
104 IF_ALIB_BOXING ( boxing ::Bootstrap(); )
105 IF_ALIB_THREADS ( threads ::Bootstrap(); )
106 IF_ALIB_ENUMS ( enums ::Bootstrap(); )
109 }
110
111DOX_MARKER([DOX_CRITICAL_SECTIONS_ADD_LOCK])
112#if ALIB_DEBUG_CRITICAL_SECTIONS && ALIB_MONOMEM
115
116 monomem::GLOBAL_ALLOCATOR_LOCK.Dbg.Name= "GlobalAllocator";
117#endif
118DOX_MARKER([DOX_CRITICAL_SECTIONS_ADD_LOCK])
119 #endif
120 }
121
134
136 {
137 { 0, "ALOX" },
138 { 1, "BITBUFFER" },
139 { 2, "BOXING" },
140 { 3, "CAMP" },
141 { 4, "CHARACTERS" },
142 { 5, "CLI" },
143 { 6, "CONFIGURATION" },
144 { 7, "CONTAINERS" },
145
146 { 8, "ENUMS" },
147 { 9, "EXPRESSIONS" },
148 { 10, "FILES" },
149 { 11, "MONOMEM" },
150 { 12, "SINGLETONS" },
151 { 13, "STRINGS" },
152 { 14, "THREADMODEL" },
153 { 15, "THREADS" },
154
155 { 16, "TIME" },
156 { 23, "DEBUG" },
157
158 { 24, "ALIB_DEBUG_ARRAY_COMPRESSION" },
159 { 25, "ALIB_DEBUG_ALLOCATIONS" },
160 { 26, "ALIB_DEBUG_BOXING" },
161 { 27, "ALIB_DEBUG_CONTAINERS" },
162 { 28, "ALIB_DEBUG_CRITICAL_SECTIONS" },
163 { 29, "ALIB_DEBUG_MONOMEM" },
164 { 30, "ALIB_DEBUG_STRINGS" },
165 { 31, "ALIB_DEBUG_RESOURCES" },
166
167
168 { 32, "FEAT_SINGLETON_MAPPED" },
169 { 33, "CHARACTERS_WIDE" },
170 { 34, "CHARACTERS_WCHAR_IS_4" },
171 { 35, "FEAT_BOXING_BIJECTIVE_INTEGRALS" },
172 { 36, "FEAT_BOXING_BIJECTIVE_CHARACTERS" },
173 { 37, "FEAT_BOXING_BIJECTIVE_FLOATS" },
174 { 38, "ALIB_FEAT_BOOST_REGEX" },
175
176 { 40, "DBG_LOG" },
177 { 41, "DBG_LOG_CI" },
178 { 42, "REL_LOG" },
179 { 43, "REL_LOG_CI" },
180 };
181
182
184void AssertALibVersionAndFlags( int alibVersion, int alibRevision, TCompilationFlags compilationFlags )
185{
186 // verify requested ALib version is met
187 if (VERSION != alibVersion || REVISION != alibRevision )
188 {
189 std::cerr << "!!! Error in ALox library compilation: linked against wrong version of ALib" << std::endl;
190 std::cerr << "!!! ALib library version: " << VERSION << "R" << int(REVISION) << std::endl;
191 std::cerr << "!!! ALib requested version: " << alibVersion << "R" << alibRevision << std::endl;
192 std::cerr << "!!! Exiting with exit(-1)" << std::endl;
193 exit(1);
194 }
195
196 // verify the flags
197 if ( compilationFlags.bits[0] == COMPILATION_FLAGS.bits[0]
198 && compilationFlags.bits[1] == COMPILATION_FLAGS.bits[1]
199 && compilationFlags.bits[2] == COMPILATION_FLAGS.bits[2]
200 && compilationFlags.bits[3] == COMPILATION_FLAGS.bits[3] )
201 return;
202
203 std::cerr << "!!! Error in ALib library compilation: linked library of ALib has "
204 "different compiler symbols set than the using executable (or library)." << std::endl;
205
206 // dump out the flags
207 std::cerr << std::left << std::setw(35) << "Symbol" << '|' << std::setw(5) << " Lib" <<'|' << " Comp. Unit" << std::endl;
208 std::cerr<< std::setw(62) << std::setfill('-') << ' ' << std::endl << std::setfill(' ');
209
210 for( auto& p : COMPILATION_FLAG_MEANINGS )
211 {
212 bool libFlag= (COMPILATION_FLAGS.bits[p.Flag/8] & (1 << (p.Flag % 8))) != 0;
213 bool reqFlag= (compilationFlags.bits[p.Flag/8] & (1 << (p.Flag % 8))) != 0;
214
215 std::cerr << std::setw(35) << p.Name << '|' << std::setw(5) << (libFlag ? " On" : " Off")
216 << "|" << std::setw(5) << (reqFlag ? " On" : " Off")
217 << ( libFlag != reqFlag ? " <-- Mismatch! " : "")
218 << std::endl;
219 }
220
221 // we just quit!
222 std::cerr << "!!! Exiting with exit(-1)" << std::endl;
223 exit(1);
224}
226
227
228} // namespace [alib]
229
230// #################################################################################################
231// Debug functions
232// #################################################################################################
233#if (ALIB_DEBUG && !ALIB_THREADS && ALIB_EXT_LIB_THREADS_AVAILABLE) || DOXYGEN
234
235#include <thread>
236namespace alib {
237#if !DOXYGEN
238 namespace { std::thread::id dbg_thread_seen;
239 bool dbg_in_single_threaded_check= false; }
241#endif
242
243
244 //==============================================================================================
245 /// This method stores the first thread that invokes it, and if in the future the method is
246 /// visited by a different thread, it asserts.
247 ///
248 /// In release compilations, this function is inlined and empty, and therefore it is not
249 /// necessary to remove usages with preprocessor macro \ref ALIB_DBG or similar.
250 ///
251 /// In debug-compilations, this is not empty if:
252 /// 1. Module \alib_threads is not included in the \alibdist (what disables thread-safeness
253 /// throughout the library), and
254 /// 2. Compiler symbol \ref ALIB_EXT_LIB_THREADS_AVAILABLE was passed on library compilation,
255 /// which allows using the C++ standard library's threading types without causing linker
256 /// failures.
257 ///
258 /// If given, this function is, for example, called by macros \ref ALIB_LOCK or
259 /// \ref ALIB_DCS, which otherwise are defined to do what they are supposed to do.
260 /// This exclamatory approach was made with \alib to motivate to
261 /// write \ref alib_threads_intro_agnostic "threading-agnostic software".
262 ///
263 /// Besides several macros, some other prominent \alib entities, like \alib{lox::Lox},
264 /// \alib{lang::format;Formatter} or \alib{monomem;TMonoAllocator} invoke this method with their
265 /// acquisition.
266 //==============================================================================================
268 {
269 if( dbg_in_single_threaded_check ) // this would happen when the assertion below is raised (ALib Report)
270 return;
271 dbg_in_single_threaded_check= true;
272
273 // first time?
274 if( lang::IsNull(dbg_thread_seen) )
275 {
276 dbg_thread_seen= std::this_thread::get_id();
277 dbg_in_single_threaded_check= false;
278 return;
279 }
280
281 if( dbg_thread_seen != std::this_thread::get_id() )
282 {
283 ALIB_ERROR( "THREADS",
284 "A second thread was detected using a single-threaded compilation of "
285 "ALib! (Module 'Threads' not included in the ALib distribution)." )
286 }
287 dbg_in_single_threaded_check= false;
288 }
289
290 } // namespace [alib]
291
293
294#endif // !ALIB_THREADS && ALIB_DEBUG && ALIB_EXT_LIB_THREADS_AVAILABLE
295
296
297#if ALIB_DEBUG_CRITICAL_SECTIONS
299#endif
300
301
302
303// #################################################################################################
304// Debug functions
305// #################################################################################################
306#if ALIB_DEBUG
307# include <cassert>
308# include <cstring>
309# if defined( _WIN32 ) && !defined(_STRING_)
310# include <string>
311# endif
312
313namespace alib::lang {
314
315
316void (*DBG_SIMPLE_ALIB_MSG_PLUGIN)( const CallerInfo& ci, int type, const char* topic,
317 int qtyMsgs, const char** msgs )
318 =nullptr;
319
320
321//! @cond NO_DOX
323void DbgSimpleALibMsg( const CallerInfo& ci, int type, const char* topic,
324 const char* msg1, const char* msg2, const char* msg3,
325 const char* msg4, const char* msg5 )
326{
328
329 int qtyMsgs= msg2 != nullptr ? (msg3 != nullptr ? (msg4 != nullptr ? (msg5 != nullptr ? 5 : 4) : 3) : 2) : 1;
330 const char* msgs[5]= { msg1, msg2, msg3, msg4, msg5 };
331
333 {
334 DBG_SIMPLE_ALIB_MSG_PLUGIN( ci, type, topic, qtyMsgs, msgs );
335 return;
336 }
337
338 // internal implementation
339 if( type == 0 ) std::cout << "ALib Error: ";
340 else if( type == 1 ) std::cout << "ALib WARNING: ";
341 else std::cout << "ALib Message(" << type << "): ";
342
343 // With ALox replacing this method (the usual thing), the first string might auto-detected
344 // as an ALox domain name. To keep this consistent wie do a similar effort here
345 // (code is copied from ALoxReportWriter::Report())
346 int msgNo= 0;
347 if(qtyMsgs > 1)
348 {
349 bool illegalCharacterFound= false;
350
351 auto strLen= strlen(msg1);
352 for( size_t idx= 0 ; idx< strLen ; ++idx )
353 {
354 char c= msg1[idx];
355 if (! ( isdigit( c )
356 || ( c >= 'A' && c <= 'Z' )
357 || c == '-'
358 || c == '_'
359 || c == '/'
360 || c == '.'
361 ) )
362 {
363 illegalCharacterFound= true;
364 break;
365 }
366 }
367
368 if(!illegalCharacterFound)
369 {
370 std::cout << msg1 << ": ";
371 msgNo= 1;
372 }
373 }
374
375
376 for ( ; msgNo != qtyMsgs; ++msgNo )
377 std::cout << msgs[msgNo];
378 std::cout << std::endl;
379 std::cout << "At : " << ci.File << ':' << ci.Line << ' ' << ci.Func << "()" << std::endl;
380
381 assert(type);
382}
383
384void DbgSimpleALibMsg( const CallerInfo& ci, int type, const char* topic,
385 const char* msg, int intVal )
386{
387 std::basic_string<char> sIntVal= std::to_string( intVal );
389 {
390 const char* msgs[2]= { msg, sIntVal.c_str() };
391 DBG_SIMPLE_ALIB_MSG_PLUGIN( ci, type, topic, 2, msgs );
392 return;
393 }
394
395 // internal implementation
396 if( type == 0 )
397 std::cout << "Error in '" << topic << "': ";
398 else
399 std::cout << "Warning in '" << topic << "' " << "(type=" << type << "): ";
400 std::cout << msg << sIntVal << std::endl;
401 std::cout << "At : " << ci.File << ':' << ci.Line << ' ' << ci.Func << "()" << std::endl;
402 assert(type);
403}
404
405//! @endcond
406}// namespace [alib::lang]
407#endif
408
409// #################################################################################################
410// static assertions for the platform
411// #################################################################################################
412
413#include "alib/lang/integers.hpp"
414#include <type_traits>
415
416
417static_assert( sizeof(alib::integer ) == sizeof(alib::uinteger ), "Error in ALib type definitions" );
418static_assert( sizeof(alib::integer ) == sizeof(std::size_t ), "Error in ALib type definitions" );
419static_assert(std::is_signed< alib::integer>::value == std::is_signed<std::ptrdiff_t >::value, "Error in ALib type definitions" );
420static_assert(std::is_signed< alib::integer>::value != std::is_signed<std::size_t >::value, "Error in ALib type definitions" );
421static_assert(std::is_signed<alib::uinteger>::value == std::is_signed<std::size_t >::value, "Error in ALib type definitions" );
422static_assert(std::is_signed<alib::uinteger>::value != std::is_signed<std::ptrdiff_t >::value, "Error in ALib type definitions" );
423
424
425// #################################################################################################
426// Type De-mangling
427// #################################################################################################
428
429#if ALIB_DEBUG && !DOXYGEN
431# if defined(__GNUC__) || defined(__clang__)
432# include <cxxabi.h>
433# include <cassert>
434# endif
435# include <cstdlib>
436# if defined(_WIN32)
437# include <cstring>
438# endif
439
440namespace alib {
441
442 #if defined(__GNUC__) || defined(__clang__)
443
444 lang::DbgTypeDemangler::DbgTypeDemangler( const std::type_info& typeInfo )
445 {
446 int status;
447 name= abi::__cxa_demangle( typeInfo.name(), nullptr, nullptr, &status);
448 assert( status==0 || !name );
449 if ((failed= (name==nullptr)))
450 name= "<DbgTypeDemangler Error>";
451 }
452
454 { if (!failed) std::free(static_cast<void*>( const_cast<char*>(name) ) ); }
455
456 #else
457 lang::DbgTypeDemangler::DbgTypeDemangler( const type_info& typeInfo )
458 {
459 name= typeInfo.name();
460 if (std::strncmp( name, "class ", 6) == 0)
461 name+= 6;
462 }
463
464
465 #endif
466
467 const char* lang::DbgTypeDemangler::Get() { return name; }
468
469 #if ALIB_STRINGS
471 {
472 NString typeName(Get());
473
474 integer nameStart= 0;
475 bool startedWithDoubleColon= false;
476 for (integer i = 0; i < typeName.Length(); ++i)
477 {
478 // MSVC adds struct/class/union
479 if(typeName.Substring(i, 7).Equals("struct ")) i+= 7;
480 if(typeName.Substring(i, 6).Equals("class " )) i+= 6;
481 if(typeName.Substring(i, 6).Equals("union " )) i+= 6;
482
483 char c = typeName.CharAt<NC>(i);
484 if (c==':')
485 {
486 ALIB_ASSERT(typeName.CharAt<NC>(i+1) == ':')
487 nameStart= i+2;
488 ++i;
489 continue;
490 }
491 if (!(isalnum(c) || c=='_') || i == typeName.Length() - 1) // (c=='<' || c=='>' || c==',' || c=='(')
492 {
493 if (startedWithDoubleColon)
494 result << "::";
495 result << typeName.Substring(nameStart, i-nameStart+1);
496 nameStart= i+1;
497 startedWithDoubleColon= typeName.CharAt(nameStart) == ':';
498 }
499 }
500
501 // some ABIs add a disambiguation-space, others don't (for example some MacOS compiler)
502 // Thus we remove the space to have a unique behavior (and have the unit tests succeed).
503 result.SearchAndReplace("> >", ">>");
504 return result;
505 }
506 #endif
507
508
509} // namespace [alib}
510
511#endif // ALIB_DEBUG && !DOXYGEN
512
513// #################################################################################################
514// Namespace documentation alib and alib
515// #################################################################################################
516/// # 1. Introduction #
517/// This is the root namespace of \alib, a general purpose C++ library. \alib is developed by
518/// A-Worx GmbH, Germany, published under <em>Boost Software License</em>.
519///
520/// This namespace is almost empty, apart from:
521/// - sub-namespaces of \alibmods_nl,
522/// - the single unique non-module related sub-namespace \ref alib::lang.
523/// - sub-namespace #alib::compatibility, which is not even a real C++ namespace! In fact, it is used
524/// by various modules to place "documentation" of entities that provide compatibility to types of
525/// the standard C++ class library and 3rd-party libraries.
526/// - Functions and types related to \ref alib_manual_bootstrapping "bootstrapping ALib".
527///
528/// Nevertheless, this namespace is quite bloated with <em>type aliases</em>, which is explained
529/// in the next section.
530///
531/// \anchor alib_nsalib_type_aliases
532/// # 2. Type Aliases In Namespace alib #
533/// This namespace is overcrowded with types.
534/// However, almost all of them are just aliased types created with C++ keyword <c>"using"</c>.
535///
536/// Motivation for the existence of the aliases and details of their use is given in appendix chapter
537/// \ref alib_manual_appendix_typealiases of the General Programmer's Manual of \alib.
538///
539/// # 3. Domain-Specific Constants and Variables #
540/// Similar to the concept of mirroring important interface classes into this <b>namespace alib</b>
541/// (which is described in the previous paragraph), it is also agreed to place important global
542/// constants here. The impact and benefits are quite the same.<br>
543/// As a sample, see
544/// \alib{lang::system;DIRECTORY_SEPARATOR} or \alib{NEW_LINE}, which appear in this namespace as
545/// soon as header \alibheader{lang/system/path.hpp}, respectively \ref alib/strings/cstring.hpp
546/// is included.
547///
548/// # 4. Documentation #
549/// The \ref alib_manual provides extensive documentation, including various separated manuals of
550/// \alibmods, tutorials with sample code, information about configuring and compiling the
551/// library and so forth.<br>
552/// For people new to \alib, the \ref alib_manual is the right place to start!
553///
554/// # Reference Documentation #
555namespace alib {}
556
557/// \dir alib
558/// This is the root folder of all source files of \alib.
559
560/// \dir alib/alox
561/// This directory contains header files and compilation units of module \alib_alox.
562
563/// \dir alib/alox/detail
564/// This directory contains header files and compilation units of module \alib_alox.
565
566/// \dir alib/alox/textlogger
567/// This directory contains header files and compilation units of module \alib_alox.
568
569/// \dir alib/alox/loggers
570/// This directory contains header files and compilation units of module \alib_alox.
571
572/// \dir alib/bitbuffer
573/// This directory contains header files and compilation units of module \alib_bitbuffer.
574
575/// \dir alib/bitbuffer/ac_v1
576/// This directory contains detail header files and compilation units of module \alib_bitbuffer.
577
578/// \dir alib/boxing
579/// This directory contains header files and compilation units of module \alib_boxing.
580
581/// \dir alib/boxing/detail
582/// This directory contains detail header files and compilation units of module \alib_boxing.
583
584/// \dir alib/characters
585/// This directory contains header files and compilation units of module \alib_characters.
586
587/// \dir alib/cli
588/// This directory contains header files and compilation units of module \alib_cli.
589
590/// \dir alib/compatibility
591/// This directory contains optional header files that provide compatibility between
592/// \alib types and concepts and those of the C++ standard library as well as 3rd party libraries.
593
594/// \dir alib/config
595/// This directory contains header files and compilation units of module \alib_config.
596
597/// \dir alib/containers
598/// This directory contains header files and compilation units of module \alib_containers.
599
600/// \dir alib/containers/detail
601/// This directory contains detail header files and compilation units of module \alib_containers.
602
603/// \dir alib/enums
604/// This directory contains header files and compilation units of module \alib_enums.
605
606/// \dir alib/enums/detail
607/// This directory contains detail header files and compilation units of module \alib_enums.
608
609/// \dir alib/expressions
610/// This directory contains header files and compilation units of module \alib_expressions.
611
612/// \dir alib/expressions/detail
613/// This directory contains detail header files and compilation units of module \alib_expressions.
614
615/// \dir alib/expressions/plugins
616/// This directory contains header files and compilation units of module \alib_expressions.
617
618/// \dir alib/expressions/util
619/// This directory contains header files and compilation units of module \alib_expressions.
620
621/// \dir alib/lang
622/// This directory contains general language extension types, functions and preprocessor code
623/// of \aliblong, which are to be included in any \alibdist, regardless of the selected module subset.
624
625/// \dir alib/lang/basecamp
626/// This directory contains header files that define \alibcamps and extended bootstrapping
627/// functionality as well as the compilation units of special \alib module \alib_basecamp.
628
629/// \dir alib/lang/system
630/// This directory contains header files and compilation units of module \alib_basecamp.
631
632/// \dir alib/lang/resources
633/// This directory contains header files and compilation units of module \alib_basecamp.
634
635/// \dir alib/lang/resources/detail
636/// This directory contains detail header files and compilation units of module \alib_basecamp.
637
638/// \dir alib/lang/message
639/// This directory contains header files and compilation units of module \alib_basecamp.
640/// As an exception to the general rules, the types defined herein are exposed to
641/// namespace \ref alib::lang.
642
643/// \dir alib/lang/format
644/// This directory contains header files and compilation units of module \alib_basecamp.
645
646/// \dir alib/monomem
647/// This directory contains header files and compilation units of module \alib_monomem.
648
649/// \dir alib/singletons
650/// This directory contains header files and compilation units of module \alib_singletons.
651
652/// \dir alib/strings
653/// This directory contains header files and compilation units of module \alib_strings.
654
655/// \dir alib/strings/detail
656/// This directory contains detail header files and compilation units of module \alib_strings.
657
658/// \dir alib/strings/util
659/// This directory contains header files and compilation units of utility types of module \alib_strings.
660
661/// \dir alib/threads
662/// This directory contains header files and compilation units of module \alib_threads.
663
664/// \dir alib/threads/detail
665/// This directory contains detail header files and compilation units of module \alib_threads.
666
667/// \dir alib/time
668/// This directory contains header files and compilation units of module \alib_time.
669
670
bool failed
If true, demangling failed.
ALIB_API NAString & GetShort(NAString &target)
ALIB_API const char * Get()
ALIB_API ~DbgTypeDemangler()
Destructor.
const char * name
The translated name.
ALIB_API DbgTypeDemangler(const std::type_info &typeInfo)
lang::Placeholder< lang::DbgCriticalSections > DbgCriticalSectionsPH
DbgLockAsserter Dbg
The debug tool instance.
#define IF_ALIB_BOXING(...)
Definition alib.hpp:248
#define ALIB_REVISION
Definition alib.hpp:25
#define IF_ALIB_THREADS(...)
Definition alib.hpp:352
#define ALIB_VERSION
Definition alib.hpp:24
#define ALIB_WARNINGS_RESTORE
Definition alib.hpp:849
#define IF_ALIB_SINGLETONS(...)
Definition alib.hpp:320
#define IF_ALIB_THREADMODEL(...)
Definition alib.hpp:344
#define ALIB_ERROR(...)
Definition alib.hpp:1267
#define IF_ALIB_TIME(...)
Definition alib.hpp:360
#define IF_ALIB_ENUMS(...)
Definition alib.hpp:288
#define ALIB_WARNINGS_ALLOW_UNSAFE_BUFFER_USAGE
Definition alib.hpp:760
#define ALIB_DBG(...)
Definition alib.hpp:390
#define ALIB_ASSERT(cond)
Definition alib.hpp:1270
void Shutdown()
Definition boxing.cpp:701
void Shutdown()
Definition records.cpp:297
constexpr bool IsNull(const T &t)
platform_specific integer
Definition integers.hpp:43
ALIB_API void DbgSimpleALibMsg(const CallerInfo &ci, int type, const char *topic, const char *msg1=nullptr, const char *msg2=nullptr, const char *msg3=nullptr, const char *msg4=nullptr, const char *msg5=nullptr)
unsigned int DBG_CRITICAL_SECTION_YIELD_OR_SLEEP_TIME_IN_NS
Definition alib.cpp:298
void(* DBG_SIMPLE_ALIB_MSG_PLUGIN)(const CallerInfo &ci, int type, const char *topic, int qtyMsgs, const char **msgs)
Definition alib.cpp:316
@ Get
Denotes to search data.
ALIB_API MonoAllocator GLOBAL_ALLOCATOR
ALIB_API RecursiveLock GLOBAL_ALLOCATOR_LOCK
ALIB_API void Bootstrap()
void Shutdown()
Definition thread.cpp:133
void Shutdown()
Definition time.cpp:64
Definition alib.cpp:69
@ Destruct
The main phase of termination that destructs everything.
ALIB_WARNINGS_ALLOW_UNSAFE_BUFFER_USAGE void AssertALibVersionAndFlags(int alibVersion, int alibRevision, TCompilationFlags compilationFlags)
Definition alib.cpp:184
CompilationFlagMeaningsEntry COMPILATION_FLAG_MEANINGS[37]
Definition alib.cpp:135
lang::uinteger uinteger
Type alias in namespace alib.
Definition integers.hpp:276
@ Final
The final initialization phase. Here, camps are initializing their custom setup.
strings::TString< nchar > NString
Type alias in namespace alib.
strings::TAString< nchar, lang::HeapAllocator > NAString
Type alias in namespace alib.
bool NonCampModulesInitialized
Definition alib.cpp:75
const char ** ARG_VN
Definition alib.cpp:72
ALIB_API List< MonoAllocator, lang::Camp * > CAMPS
monomem::TMonoAllocator< lang::HeapAllocator > MonoAllocator
void BootstrapAddDefaultCamps()
Definition bootstrap.cpp:59
int ARG_C
Definition alib.cpp:71
ALIB_WARNINGS_RESTORE void Bootstrap(int alibVersion, int alibRevision, TCompilationFlags compilationFlags)
Definition alib.cpp:84
unsigned char REVISION
Definition alib.cpp:78
void Shutdown()
Definition alib.cpp:122
const wchar_t ** ARG_VW
Definition alib.cpp:73
void DbgAssertSingleThreaded()
Definition alib.cpp:267
lang::integer integer
Type alias in namespace alib.
Definition integers.hpp:273
ALIB_WARNINGS_ALLOW_UNSAFE_BUFFER_USAGE TCompilationFlags COMPILATION_FLAGS
Definition alib.cpp:80
int VERSION
Definition alib.cpp:77
This is a struct composing an entry in COMPILATION_FLAG_MEANINGS.
Definition alib.hpp:1445
unsigned char bits[6]
The Flags.
Definition alib.hpp:1313
const char * Func
Definition alib.hpp:1132
const char * File
The name of the source file as given by compiler.
Definition alib.hpp:1130
int Line
The line number within File.
Definition alib.hpp:1131