31 { 16,
"THREADMODEL" },
34 { 19,
"ALIB_DEBUG_ARRAY_COMPRESSION" },
35 { 20,
"ALIB_DEBUG_ALLOCATIONS" },
36 { 21,
"ALIB_DEBUG_BOXING" },
37 { 22,
"ALIB_DEBUG_CONTAINERS" },
38 { 23,
"ALIB_DEBUG_CRITICAL_SECTIONS" },
40 { 24,
"ALIB_DEBUG_MEMORY" },
41 { 25,
"ALIB_DEBUG_STRINGS" },
42 { 26,
"ALIB_DEBUG_RESOURCES" },
43 { 27,
"ALIB_C20_MODULES" },
44 { 28,
"ALIB_SINGLE_THREADED" },
45 { 29,
"FEAT_SINGLETON_MAPPED" },
46 { 30,
"CHARACTERS_WIDE" },
47 { 31,
"CHARACTERS_WCHAR_IS_4" },
49 { 32,
"FEAT_BOXING_BIJECTIVE_INTEGRALS" },
50 { 33,
"FEAT_BOXING_BIJECTIVE_CHARACTERS" },
51 { 34,
"FEAT_BOXING_BIJECTIVE_FLOATS" },
52 { 35,
"ALIB_FEAT_BOOST_REGEX" },
64 std::cerr <<
"!!! Error in ALox library compilation: linked against wrong version of ALib" << std::endl;
65 std::cerr <<
"!!! ALib library version: " <<
VERSION <<
"R" << int(
REVISION) << std::endl;
66 std::cerr <<
"!!! ALib requested version: " << alibVersion <<
"R" << alibRevision << std::endl;
67 std::cerr <<
"!!! Exiting with exit(-1)" << std::endl;
78 std::cerr <<
"!!! Error in ALib library compilation: linked library of ALib has "
79 "different configuration macros set than the using executable (or library)." << std::endl;
82 std::cerr << std::left << std::setw(35) <<
"Symbol" <<
'|' << std::setw(5) <<
" Lib" <<
'|' <<
" Comp. Unit" << std::endl;
83 std::cerr<< std::setw(62) << std::setfill(
'-') <<
' ' << std::endl << std::setfill(
' ');
87 bool reqFlag= (compilationFlags.
bits[p.Flag/8] & (1 << (p.Flag % 8))) != 0;
89 std::cerr << std::setw(35) << p.Name <<
'|' << std::setw(5) << (libFlag ?
" On" :
" Off")
90 <<
"|" << std::setw(5) << (reqFlag ?
" On" :
" Off")
91 << ( libFlag != reqFlag ?
" <-- Mismatch! " :
"")
96 std::cerr <<
"!!! Exiting with exit(-1)" << std::endl;
125 # if !ALIB_SINGLE_THREADED
127 # if ALIB_DEBUG_CRITICAL_SECTIONS && ALIB_MONOMEM
147DOX_MARKER([DOX_ENUMS_MULTIPLE_RECORDS])
160DOX_MARKER([DOX_ENUMS_MULTIPLE_RECORDS])
173DOX_MARKER([DOX_ENUMS_MULTIPLE_RECORDS_2])
181DOX_MARKER([DOX_ENUMS_MULTIPLE_RECORDS_2])
319#if !ALIB_SINGLE_THREADED
332 { system::SystemFolders::Root ,
A_CHAR(
"Root" ) , 1 },
333 { system::SystemFolders::Current ,
A_CHAR(
"Current" ) , 1 },
334 { system::SystemFolders::HomeConfig ,
A_CHAR(
"HomeConfig") , 5 },
335 { system::SystemFolders::Home ,
A_CHAR(
"Home" ) , 1 },
336 { system::SystemFolders::Module ,
A_CHAR(
"Module" ) , 1 },
337 { system::SystemFolders::Temp ,
A_CHAR(
"Temp" ) , 1 },
338 { system::SystemFolders::VarTemp ,
A_CHAR(
"VarTemp" ) , 1 },
358 { format::ByteSizeUnits::B ,
A_CHAR(
"B" ) , 3 },
359 { format::ByteSizeUnits::KiB ,
A_CHAR(
"KiB" ) , 3 },
360 { format::ByteSizeUnits::MiB ,
A_CHAR(
"MiB" ) , 3 },
361 { format::ByteSizeUnits::GiB ,
A_CHAR(
"GiB" ) , 3 },
362 { format::ByteSizeUnits::TiB ,
A_CHAR(
"TiB" ) , 3 },
363 { format::ByteSizeUnits::PiB ,
A_CHAR(
"PiB" ) , 3 },
364 { format::ByteSizeUnits::EiB ,
A_CHAR(
"EiB" ) , 3 },
365 { format::ByteSizeUnits::ZiB ,
A_CHAR(
"ZiB" ) , 3 },
366 { format::ByteSizeUnits::YiB ,
A_CHAR(
"YiB" ) , 3 },
367 { format::ByteSizeUnits::RiB ,
A_CHAR(
"RiB" ) , 3 },
368 { format::ByteSizeUnits::QiB ,
A_CHAR(
"QiB" ) , 3 },
369 { format::ByteSizeUnits::B ,
A_CHAR(
"B" ) , 1 },
370 { format::ByteSizeUnits::kB ,
A_CHAR(
"kB" ) , 2 },
371 { format::ByteSizeUnits::MB ,
A_CHAR(
"MB" ) , 2 },
372 { format::ByteSizeUnits::GB ,
A_CHAR(
"GB" ) , 2 },
373 { format::ByteSizeUnits::TB ,
A_CHAR(
"TB" ) , 2 },
374 { format::ByteSizeUnits::PB ,
A_CHAR(
"PB" ) , 2 },
375 { format::ByteSizeUnits::EB ,
A_CHAR(
"EB" ) , 2 },
376 { format::ByteSizeUnits::ZB ,
A_CHAR(
"ZB" ) , 2 },
377 { format::ByteSizeUnits::YB ,
A_CHAR(
"YB" ) , 2 },
378 { format::ByteSizeUnits::RB ,
A_CHAR(
"RB" ) , 2 },
379 { format::ByteSizeUnits::QB ,
A_CHAR(
"QB" ) , 2 },
385 "11,ArgumentIndexIs0," "Argument index 0 not allowed.\n"
386 "In: {!Q}\n >{!FillC-}^"
387 "," "12,ArgumentIndexOutOfBounds," "Argument index #{} is out of bounds. {} arguments are available.\n"
388 "In: {!Q}\n >{!FillC-}^"
389 "," "13,IncompatibleTypeCode," "Detected placeholder type does not match given argument.\n"
390 "Placeholder number: {}\n"
391 "Placeholder type: {} ({})"
392 "Placeholder type: {} ({})\n"
393 "Deduced argument type: {!Q}\n"
394 "In: {!Q}\n >{!FillC-}^"
396 "," "101,MissingClosingBracket," "Closing bracket '}}' of placeholder not found (or syntax error).\n"
397 "In: {!Q}\n >{!FillC-}^"
398 "," "102,MissingPrecisionValuePS," "Missing precision value after '.' character."
399 "\nIn: {!Q}\n >{!FillC-}^"
400 "," "103,DuplicateTypeCode," "Duplicate type code {!Q'} given (previous was {!Q'})."
401 "\nIn: {!Q}\n >{!FillC-}^"
402 "," "104,UnknownTypeCode," "Unknown type code {!Q'} given."
403 "\nIn: {!Q}\n >{!FillC-}^"
404 "," "105,ExclamationMarkExpected," "Expected '!' in continuation of placeholder."
405 "\nIn: {!Q}\n >{!FillC-}^"
406 "," "106,UnknownConversionPS," "Unknown conversion \"!{}\"."
407 "\nIn: {!Q}\n >{!FillC-}^"
408 "," "107,PrecisionSpecificationWithInteger," "Precision not allowed with integer format."
409 "\nIn: {!Q}\n >{!FillC-}^"
410 "," "108,MissingReplacementStrings," "Missing pair of replacement strings \"<src><repl>\" after \"!Replace\"."
411 "\nIn: {!Q}\n >{!FillC-}^"
413 "," "201,NegativeValuesInBracketsNotSupported," "Brackets for negative values not implemented/supported."
414 "\nIn: {!Q}\n >{!FillC-}^"
415 "," "202,MissingPrecisionValueJS," "Missing precision value after '.' character."
416 "\nIn: {!Q}\n >{!FillC-}^"
417 "," "203,HexadecimalFloatFormatNotSupported," "Hexadecimal float format not implemented/supported."
418 "\nIn: {!Q}\n >{!FillC-}^"
419 "," "204,NoAlternateFormOfConversion," "Alternate form '#' not supported with conversion {!Q}."
420 "\nIn: {!Q}\n >{!FillC-}^"
421 "," "205,NoPrecisionWithConversion," "Precision specification (\".{}\") is not supported with conversion {!Q}."
422 "\nIn: {!Q}\n >{!FillC-}^"
423 "," "206,UnknownDateTimeConversionSuffix," "Unknown date/time conversion suffix {!Q'}."
424 "\nIn: {!Q}\n >{!FillC-}^"
425 "," "207,UnknownConversionJS," "Unknown conversion character {!Q'}."
426 "\nIn: {!Q}\n >{!FillC-}^"
428 "," "501,UnknownPropertyInFormatString," "Unknown property identifier \"{}{}\" in format string.\n"
429 "Format string: {!Q}.\n"
430 "Allowed identifiers:"
431 "," "502,ErrorInResultingFormatString," "Error in resulting format string.\nSource format: {!Q}."
432 "," "510,MissingConfigurationVariable," "Missing or empty configuration variable {!Q} containing user-defined format string."
434 "," "601,UnknownMarker," "Unknown marker at position {}.\n"
435 " Marked text: {!Q}.\n"
437 "," "602,EndmarkerWithoutStart," "Found an end-marker without a start marker at position {}.\n"
438 " Marked text: {!Q}.\n"
446 { variables::Priority::NONE ,
A_CHAR(
"NONE" ) , 1 },
447 { variables::Priority::AutoDetected ,
A_CHAR(
"AutoDetected" ) , 1 },
448 { variables::Priority::DefaultValues ,
A_CHAR(
"DefaultValues") , 1 },
449 { variables::Priority::Standard ,
A_CHAR(
"Standard" ) , 1 },
450 { variables::Priority::ConfigFile ,
A_CHAR(
"ConfigFile" ) , 2 },
451 { variables::Priority::Environment ,
A_CHAR(
"Environment" ) , 1 },
452 { variables::Priority::SessionFile ,
A_CHAR(
"SessionFile" ) , 8 },
453 { variables::Priority::CLI ,
A_CHAR(
"CLI" ) , 2 },
454 { variables::Priority::Session ,
A_CHAR(
"Session" ) , 2 },
455 { variables::Priority::Protected ,
A_CHAR(
"Protected" ) , 1 },
474 { threadmodel::Priority::Lowest ,
A_CHAR(
"Lowest" ), 4 },
475 { threadmodel::Priority::DeferredDeletion,
A_CHAR(
"DeferredDeletion" ), 1 },
476 { threadmodel::Priority::Low ,
A_CHAR(
"Low" ), 1 },
477 { threadmodel::Priority::Standard ,
A_CHAR(
"Standard" ), 1 },
478 { threadmodel::Priority::Highest ,
A_CHAR(
"Highest" ), 5 },
479 { threadmodel::Priority::High ,
A_CHAR(
"High" ), 1 },
492DOX_MARKER([DOX_CRITICAL_SECTIONS_ADD_LOCK])
493#if ALIB_DEBUG_CRITICAL_SECTIONS && ALIB_MONOMEM
499DOX_MARKER([DOX_CRITICAL_SECTIONS_ADD_LOCK])
505 #if ALIB_DEBUG_CRITICAL_SECTIONS && ALIB_MONOMEM
566 std::ranges::copy(
CAMPS.begin(),
CAMPS.end(), std::back_inserter(dedup) );
567 std::ranges::sort(dedup);
568 for(
auto it= dedup.begin() + 1; it != dedup.end(); ++it)
570 "Duplicate entry in CAMPS list. ResourceCategory of duplicated camp is: ",
571 (*it)->ResourceCategory )
576 if( targetCamp ==
nullptr )
577 targetCamp=
CAMPS.back();
589DOX_MARKER([DOX_CRITICAL_SECTIONS_ADD_LOCK2])
590#if ALIB_DEBUG_CRITICAL_SECTIONS && ALIB_MONOMEM
593DOX_MARKER([DOX_CRITICAL_SECTIONS_ADD_LOCK2])
599 auto targetCampIt=
CAMPS.rbegin();
600 while(targetCampIt !=
CAMPS.rend() &&
601 *targetCampIt != targetCamp )
605 "Target camp given to function alib::Bootstrap() is not included in list alib::CAMPS.\n"
611 phaseIntegral <=
int( targetPhase ) ;
621 if ( !targetCamp->
HasPool() ) {
633 auto& hashMap= lPool->BootstrapGetInternalHashMap();
634 hashMap.BaseLoadFactor( 2.0 );
635 hashMap.MaxLoadFactor ( 5.0 );
644 for(
auto campIt= targetCampIt ; campIt !=
CAMPS.rend() ; ++campIt ) {
645 if ( skipOne ) { skipOne=
false;
continue; }
648 if( (*campIt)->GetResourcePoolSP() !=
nullptr
649 && (*campIt)->GetResourcePoolSP() != actPoolSP )
651 actPoolSP= (*campIt)->GetResourcePoolSP();
655 (*campIt)->BootstrapSetResourcePool( actPoolSP );
664 if ( targetCamp->
GetConfig() ==
nullptr ) {
666 #if ALIB_DEBUG_CRITICAL_SECTIONS
667 targetCamp->
GetConfig()->NodeTable().dcs.DCSName=
"Camp.Config-bootstrap-created";
669 #if !ALIB_SINGLE_THREADED && ALIB_DEBUG
670 targetCamp->
GetConfig().
GetLock().Dbg.Name=
"Camp.Config.Lock-bootstrap-created";
677 for(
auto moduleIt= targetCampIt ; moduleIt !=
CAMPS.rend() ; ++moduleIt ) {
678 if ( skipOne ) { skipOne=
false;
continue; }
681 if( (*moduleIt)->GetConfig() !=
nullptr && (*moduleIt)->GetConfig() != *actConfig)
682 actConfig = &(*moduleIt)->GetConfig();
684 (*moduleIt)->BootstrapSetConfig( *actConfig );
690 ALIB_DBG(
bool foundThisModuleInList =
false; )
693 if(
int(
camp->GetBootstrapState()) >=
int(actualPhase ) )
699 "With this invocation of Bootstrap() a camp skips a bootstrap phase.\n"
700 "Resource category of the target camp: ",
camp->ResourceCategory )
701 camp->BootstrapSetPhase(actualPhase);
705 if (
camp == targetCamp ) {
706 ALIB_DBG( foundThisModuleInList =
true );
710 "The target camp of function Bootstrap is not included in list alib::CAMPS "
711 "or was already bootstrapped for this phase!\n"
717 #if ALIB_DEBUG_CRITICAL_SECTIONS && ALIB_MONOMEM
724 #if ALIB_DEBUG_CRITICAL_SECTIONS && ALIB_MONOMEM
730 "Empty camp list on shutdown. Shutdown invoked twice?" )
731 if( targetCamp ==
nullptr )
732 targetCamp=
CAMPS.front();
737 auto targetCampIt=
CAMPS.begin();
738 while( targetCampIt !=
CAMPS.end()
739 && *targetCampIt != targetCamp )
742 "Target camp given to function alib::Shutdown() is not included in list alib::CAMPS.\n"
746 ALIB_DBG(
bool foundThisModuleInList=
false );
749 ; phaseIntegral<= int( targetPhase )
755 for(
auto campIt=
CAMPS.rbegin() ; campIt !=
CAMPS.rend() ; ++campIt ) {
758 "CAMPS",
"Trying to terminate a not (fully) initialized module. "
762 if (
int(( *campIt )->GetBootstrapState()) > -
int(actualPhase) ) {
765 ALIB_ASSERT_ERROR( (
int(( *campIt )->GetBootstrapState()) == 3 && phaseIntegral == 1 )
766 || (
int(( *campIt )->GetBootstrapState()) == -1 && phaseIntegral == 2 ),
767 "CAMPS",
"With this invocation of Bootstrap(), a camp skips a bootstrap phase \n"
768 "Resource category of the target camp: ", ( *campIt )->ResourceCategory )
771 ( *campIt )->Shutdown(actualPhase );
774 ALIB_DBG(
if(( *campIt ) == targetCamp )
775 foundThisModuleInList=
true; )
778 if(( *campIt ) == targetCamp )
782 "The target camp of function Shutdown is not included in list alib::CAMPS "
783 "or was already shutdown for this phase!\n"
787 #if ALIB_DEBUG_CRITICAL_SECTIONS
790 for(
auto campIt=
CAMPS.rbegin() ; campIt !=
CAMPS.rend() ; ++campIt )
791 (*campIt)->GetConfig()->NodeTable().dcs.DCSLock=
nullptr;
796 for(
auto campIt=
CAMPS.rbegin() ; campIt !=
CAMPS.rend() ; ++campIt ) {
797 ( *campIt )->BootstrapSetResourcePool(
nullptr);
798 ( *campIt )->BootstrapSetConfig(
nullptr);
800 if(( *campIt ) == targetCamp )
805 && targetCamp ==
CAMPS.front() )
#define IF_ALIB_BOXING(...)
#define IF_ALIB_THREADS(...)
#define IF_ALIB_ALOX(...)
#define IF_ALIB_SINGLETONS(...)
#define ALIB_ASSERT_WARNING(cond, domain,...)
#define ALIB_LOCK_RECURSIVE_WITH(lock)
#define IF_ALIB_ENUMRECORDS(...)
#define ALIB_ASSERT_ERROR(cond, domain,...)
#define IF_ALIB_FILETREE(...)
#define IF_ALIB_EXPRESSIONS(...)
#define ALIB_COMPILATION_FLAGS
@ Huffman
Huffman encoding (byte based).
@ Incremental
Only distances of the values are written.
@ ALL
All compression methods selected.
@ Sparse
Writes '1' if next value is equal to previous, '0' plus next value otherwise.
@ MinMax
Stores the differences between the minimum and maximum value found.
@ VerySparse
Writes the number of following equal or non equal values.
@ NONE
No compression method selected.
BootstrapPhases GetBootstrapState()
SharedConfiguration & GetConfig()
void BootstrapSetConfig(const SharedConfiguration &pConfig)
void BootstrapSetResourcePool(const SPResourcePool &pResourcePool)
void InsertDerived(TArgs &&... args)
lang::Placeholder< lang::DbgCriticalSections > DbgCriticalSectionsPH
TLock & GetLock() const noexcept
SPResourcePool & GetResourcePoolSP()
NCString ResourceCategory
SharedPtr< resources::ResourcePool, MonoAllocator > SPResourcePool
@ Running
The thread's #".Run" method is currently processed.
@ Started
Method #".Start" was invoked but not running, yet.
@ Terminated
The thread is terminated.
void Bootstrap(camp::Camp &camp, const NString &name, character innerDelim=',', character outerDelim=',')
@ Ascending
Chooses ascending sort oder.
@ Descending
Chooses descending sort oder.
@ Right
Denotes the right side of something.
@ Left
Denotes the left side of something.
@ Copy
Chooses not to clear existing data.
@ Move
Chooses to clear existing data.
@ Global
Denotes global reach.
@ Local
Denotes local reach.
@ No
Denotes non-recursive.
@ Center
Chooses centered alignment.
@ Right
Chooses right alignment.
@ Left
Chooses left alignment.
@ WindowsOS
WindowsOS style line-feeds "\r\n".
@ Platform
Platform specific. Equals to either 'Unix' or 'WindowsOS'.
@ None
No line-feeds, not specified, etc.
@ Unix
Unix-style line-feeds "\n".
@ Remove
Denotes removals.
@ GetCreate
Denotes to create data if not found.
@ Create
Denotes to create data.
@ Insert
Denotes insertions.
@ Get
Denotes to search data.
@ On
Switch it on, switched on, etc.
@ Off
Switch it off, switched off, etc.
@ Begin
The start of a transaction.
@ End
The end of a transaction.
@ Yes
Create if something does not exist.
@ Keep
Chooses not no clear existing data.
@ Clear
Chooses to clear existing data.
@ Yes
Create default values.
@ Keep
Keep whitespaces in string.
@ Trim
Trim whitespaces away.
@ Enabled
Caching is enabled.
@ Disabled
Caching is disabled.
@ KeepWithSender
Keeps responsibility, e.g., when passing an object.
@ Transfer
Transfers responsibility to the receiving party.
@ Omit
Do not propagate changes.
@ ToDescendants
Propagate changes to descendants/children/subcomponents.
@ Relative
Referring to a relative value.
@ Absolute
Referring to an absolute value.
@ Safe
Do it or treat it with safety.
@ Unsafe
Omit checks or perform unsafe operations.
@ Exclude
Chooses exclusion.
@ Include
Chooses inclusion.
@ Local
Denotes local time.
@ UTC
Denotes UTC (coordinated universal time).
RecursiveLock GLOBAL_ALLOCATOR_LOCK
TMonoAllocator< lang::HeapAllocator > GLOBAL_ALLOCATOR
monomem::TMonoAllocator< lang::HeapAllocator > MonoAllocator
format::Formatter Formatter
Type alias in namespace #"%alib".
filetree::FilesCamp FILETREE
The singleton instance of ALib Camp class #"FilesCamp".
ListMA< camp::Camp * > CAMPS
@ Final
The final initialization phase. Here, camps are initializing their custom setup.
void BootstrapAddDefaultCamps()
void Bootstrap(BootstrapPhases targetPhase, camp::Camp *targetCamp, int alibVersion, int alibRevision, TCompilationFlags compilationFlags)
CompilationFlagMeaningsEntry COMPILATION_FLAG_MEANINGS[40]
containers::List< T, MonoAllocator, TRecycling > ListMA
Type alias in namespace #"%alib".
lox::ALoxCamp ALOX
The singleton instance of ALib Camp class #"ALoxCamp".
ShutdownPhases
Termination levels usable with #"alib_mod_bs_camps;Bootstrapping ALib Camps".
@ Destruct
The main phase of termination that destructs everything.
lang::integer integer
Type alias in namespace #"%alib".
TCompilationFlags COMPILATION_FLAGS
variables::TSharedConfiguration< SharedLock > SharedConfiguration
Type alias in namespace #"%alib".
expressions::ExpressionsCamp EXPRESSIONS
The singleton instance of ALib Camp class #"ExpressionsCamp".
camp::Basecamp BASECAMP
The singleton instance of ALib Camp class #"Basecamp".
bool NonCampModulesInitialized
app::AppCamp APP
The singleton instance of the camp class used by class #"App".
std::vector< T, StdMA< T > > StdVectorMA
Type alias in namespace #"%alib".
format::FormatterJavaStyle FormatterJavaStyle
Type alias in namespace #"%alib".
void AssertALibVersionAndFlags(int alibVersion, int alibRevision, TCompilationFlags compilationFlags)
This is a struct composing an entry in #"COMPILATION_FLAG_MEANINGS".
unsigned char bits[5]
The Flags.