ALib C++ Library
Library Version: 2511 R0
Documentation generated by doxygen
Loading...
Searching...
No Matches
bootstrap.cpp
1//##################################################################################################
2// ALib C++ Library
3//
4// Copyright 2013-2025 A-Worx GmbH, Germany
5// Published under 'Boost Software License' (a free software license, see LICENSE.txt)
6//##################################################################################################
7#include "alib_precompile.hpp"
8#if !defined(ALIB_C20_MODULES) || ((ALIB_C20_MODULES != 0) && (ALIB_C20_MODULES != 1))
9# error "Symbol ALIB_C20_MODULES has to be given to the compiler as either 0 or 1"
10#endif
11#if ALIB_C20_MODULES
12 module;
13#endif
14//========================================= Global Fragment ========================================
24#if ALIB_DEBUG && !DOXYGEN
25# if defined(__GNUC__) || defined(__clang__)
26# include <cxxabi.h>
27# include <cassert>
28# endif
29# include <cstdlib>
30# if defined(_WIN32)
31# include <cstring>
32# endif
33#endif
34
35#if !DOXYGEN
37# if (ALIB_DEBUG)
38# include <cassert>
39# include <cstring>
40# if defined( _WIN32 ) && !defined(_STRING_)
41# include <string>
42# endif
43# endif
44
45#endif // !DOXYGEN
46
47#include <iostream>
48#include <iomanip>
49
50#if (ALIB_SINGLE_THREADED && ALIB_EXT_LIB_THREADS_AVAILABLE)
51# include <thread>
52#endif
53
54//============================================== Module ============================================
55#if ALIB_C20_MODULES
56 module ALib.Bootstrap;
57 import ALib.Lang;
58 import ALib.Time;
59 import ALib.Threads;
60# if ALIB_MONOMEM
61 import ALib.Monomem;
62# endif
63# if ALIB_STRINGS
64 import ALib.Strings;
65# endif
66# if ALIB_SINGLETONS
67 import ALib.Singletons;
68# endif
69# if ALIB_BOXING
70 import ALib.Boxing;
71# endif
72# if ALIB_ENUMRECORDS
73 import ALib.EnumRecords.Bootstrap;
74# endif
75# if ALIB_THREADMODEL
76 import ALib.ThreadModel;
77# endif
78# if ALIB_EXCEPTIONS
79 import ALib.Exceptions;
80# endif
81# if ALIB_SYSTEM
82 import ALib.System;
83# endif
84# if ALIB_FORMAT
85 import ALib.Format;
86 import ALib.Format.StdImplementation;
87 import ALib.Format.FormatterPythonStyle;
88 import ALib.Format.FormatterJavaStyle;
89# endif
90# if ALIB_CAMP
91 import ALib.Camp;
92 import ALib.Camp.Base;
93 import ALib.Resources;
94 import ALib.Variables;
95# endif
96# if ALIB_BITBUFFER
97 import ALib.BitBuffer;
98# endif
99# if ALIB_ALOX
100 import ALib.ALox;
101 import ALib.ALox.Impl;
102# endif
103# if ALIB_EXPRESSIONS
104 import ALib.Expressions;
105# endif
106# if ALIB_CLI
107 import ALib.CLI;
108# endif
109# if ALIB_FILES
110 import ALib.Files;
111# endif
112
113#else
114# include "ALib.Lang.H"
115# include "ALib.Time.H"
116# include "ALib.Threads.H"
117# include "ALib.Monomem.H"
118# include "ALib.Strings.H"
119# include "ALib.Singletons.H"
120# include "ALib.Boxing.H"
122# include "ALib.ThreadModel.H"
123# include "ALib.Exceptions.H"
124# include "ALib.System.H"
125# include "ALib.Format.H"
129# include "ALib.Variables.H"
130# include "ALib.BitBuffer.H"
131# include "ALib.Camp.H"
132# include "ALib.Camp.Base.H"
133# include "ALib.Bootstrap.H"
134# include "ALib.CLI.H"
135# include "ALib.Expressions.H"
136# include "ALib.ALox.Impl.H"
137# include "ALib.Files.H"
138#endif
139
140//========================================== Implementation ========================================
141# include "ALib.Lang.CIFunctions.H"
142namespace alib {
143
144//==================================================================================================
145//=== Version and compilation flag verification
146//==================================================================================================
147
149unsigned char REVISION = ALIB_REVISION;
150TCompilationFlags COMPILATION_FLAGS = {ALIB_COMPILATION_FLAGS};
151
153 { 0, "ALOX" }, // modules
154 { 1, "BITBUFFER" },
155 { 2, "BOXING" },
156 { 3, "CAMP" },
157 { 4, "CONTAINERS" },
158 { 5, "CLI" },
159 { 6, "ENUMRECORDS" },
160 { 7, "EXCEPTIONS" },
161
162 { 8, "EXPRESSIONS" },
163 { 9, "FILES" },
164 { 10, "FORMAT" },
165 { 11, "MONOMEM" },
166 { 12, "RESOURCES" },
167 { 13, "SINGLETONS" },
168 { 14, "STRINGS" },
169 { 15, "SYSTEM" },
170
171 { 16, "THREADMODEL" },
172 { 17, "VARIABLES" },
173 { 18, "DEBUG" }, // debug features
174 { 19, "ALIB_DEBUG_ARRAY_COMPRESSION" },
175 { 20, "ALIB_DEBUG_ALLOCATIONS" },
176 { 21, "ALIB_DEBUG_BOXING" },
177 { 22, "ALIB_DEBUG_CONTAINERS" },
178 { 23, "ALIB_DEBUG_CRITICAL_SECTIONS" },
179
180 { 24, "ALIB_DEBUG_MEMORY" },
181 { 25, "ALIB_DEBUG_STRINGS" },
182 { 26, "ALIB_DEBUG_RESOURCES" },
183 { 27, "ALIB_C20_MODULES" }, // other features
184 { 28, "ALIB_SINGLE_THREADED" },
185 { 29, "FEAT_SINGLETON_MAPPED" },
186 { 30, "CHARACTERS_WIDE" },
187 { 31, "CHARACTERS_WCHAR_IS_4" },
188
189 { 32, "FEAT_BOXING_BIJECTIVE_INTEGRALS" },
190 { 33, "FEAT_BOXING_BIJECTIVE_CHARACTERS" },
191 { 34, "FEAT_BOXING_BIJECTIVE_FLOATS" },
192 { 35, "ALIB_FEAT_BOOST_REGEX" },
193 { 36, "DBG_LOG" },
194 { 37, "DBG_LOG_CI" },
195 { 38, "REL_LOG" },
196 { 39, "REL_LOG_CI" },
197};
198
199
200void AssertALibVersionAndFlags( int alibVersion, int alibRevision,
201 TCompilationFlags compilationFlags ) {
202 // verify requested ALib version is met
203 if (VERSION != alibVersion || REVISION != alibRevision ) {
204 std::cerr << "!!! Error in ALox library compilation: linked against wrong version of ALib" << std::endl;
205 std::cerr << "!!! ALib library version: " << VERSION << "R" << int(REVISION) << std::endl;
206 std::cerr << "!!! ALib requested version: " << alibVersion << "R" << alibRevision << std::endl;
207 std::cerr << "!!! Exiting with exit(-1)" << std::endl;
208 exit(1);
209 }
210
211 // verify the flags
212 if ( compilationFlags.bits[0] == COMPILATION_FLAGS.bits[0]
213 && compilationFlags.bits[1] == COMPILATION_FLAGS.bits[1]
214 && compilationFlags.bits[2] == COMPILATION_FLAGS.bits[2]
215 && compilationFlags.bits[3] == COMPILATION_FLAGS.bits[3] )
216 return;
217
218 std::cerr << "!!! Error in ALib library compilation: linked library of ALib has "
219 "different compiler-symbols set than the using executable (or library)." << std::endl;
220
221 // dump out the flags
222 std::cerr << std::left << std::setw(35) << "Symbol" << '|' << std::setw(5) << " Lib" <<'|' << " Comp. Unit" << std::endl;
223 std::cerr<< std::setw(62) << std::setfill('-') << ' ' << std::endl << std::setfill(' ');
224
225 for( auto& p : COMPILATION_FLAG_MEANINGS ) {
226 bool libFlag= (COMPILATION_FLAGS.bits[p.Flag/8] & (1 << (p.Flag % 8))) != 0;
227 bool reqFlag= (compilationFlags.bits[p.Flag/8] & (1 << (p.Flag % 8))) != 0;
228
229 std::cerr << std::setw(35) << p.Name << '|' << std::setw(5) << (libFlag ? " On" : " Off")
230 << "|" << std::setw(5) << (reqFlag ? " On" : " Off")
231 << ( libFlag != reqFlag ? " <-- Mismatch! " : "")
232 << std::endl;
233 }
234
235 // we just quit!
236 std::cerr << "!!! Exiting with exit(-1)" << std::endl;
237 exit(1);
238}
239
241
242
243//==================================================================================================
244//========================================= Non-Camp Version =======================================
245//==================================================================================================
246#if !ALIB_CAMP
247void Bootstrap( int alibVersion, int alibRevision, TCompilationFlags compilationFlags )
248{
249 // verify ALib
250 AssertALibVersionAndFlags( alibVersion, alibRevision, compilationFlags );
251
252 #if ALIB_MONOMEM
253 // if the global allocator was not initialized from outside, then we have to do it.
254 if (!monomem::GLOBAL_ALLOCATOR.IsInitialized())
255 new (&monomem::GLOBAL_ALLOCATOR) MonoAllocator(ALIB_DBG("Global",) 128);
256 #endif
257
259 IF_ALIB_BOXING ( boxing ::bootstrap(); )
261
262 #if ALIB_FORMAT
263 Formatter::Default .InsertDerived<FormatterPythonStyle>();
264 Formatter::Default->Next.InsertDerived<FormatterJavaStyle >();
265 # if !ALIB_SINGLE_THREADED
266 ALIB_DBG(Formatter::DefaultLock.Dbg.Name= "DefaultFormatter";)
267 # if ALIB_DEBUG_CRITICAL_SECTIONS && ALIB_MONOMEM
269 Formatter::DefaultLock.Dbg.Name= "DefaultFormatter";
270 # endif
271 # endif
272 #endif
273
274 //--------------------------------------------------------------------------------------------
275 //--- Non-resourced versions of enum records
276 //--------------------------------------------------------------------------------------------
277#if ALIB_ENUMRECORDS
278
279// CodeMarker_CommonEnums
280
282 { lang::Alignment::Left , A_CHAR("Left" ) , 1 },
283 { lang::Alignment::Right , A_CHAR("Right" ) , 1 },
284 { lang::Alignment::Center , A_CHAR("Center") , 1 },
285} );
286
287DOX_MARKER([DOX_ENUMS_MULTIPLE_RECORDS])
289 { lang::Bool::False, A_CHAR("False"), 1 },
290 { lang::Bool::True , A_CHAR("True" ), 1 },
291 { lang::Bool::False, A_CHAR("0" ), 1 },
292 { lang::Bool::True , A_CHAR("1" ), 1 },
293 { lang::Bool::False, A_CHAR("No" ), 1 },
294 { lang::Bool::True , A_CHAR("Yes" ), 1 },
295 { lang::Bool::False, A_CHAR("Off" ), 2 },
296 { lang::Bool::True , A_CHAR("On" ), 2 },
297 { lang::Bool::False, A_CHAR("-" ), 1 },
298 { lang::Bool::True , A_CHAR("Ok" ), 2 }
299} );
300DOX_MARKER([DOX_ENUMS_MULTIPLE_RECORDS])
301
303 { lang::Caching::Disabled , A_CHAR("Disabled") , 1 },
304 { lang::Caching::Enabled , A_CHAR("Enabled" ) , 1 },
305 { lang::Caching::Auto , A_CHAR("Auto" ) , 1 },
306} );
307
309 { lang::Case::Sensitive, A_CHAR("Sensitive"), 1 },
310 { lang::Case::Ignore , A_CHAR("Ignore" ), 1 },
311} );
312
313DOX_MARKER([DOX_ENUMS_MULTIPLE_RECORDS_2])
315 { lang::ContainerOp::Insert , A_CHAR("Insert" ), 1 }, // integral 0
316 { lang::ContainerOp::Remove , A_CHAR("Remove" ), 1 }, // integral 1
317 { lang::ContainerOp::GetCreate, A_CHAR("GetCreate"), 4 }, // integral 3 <-- Switched order
318 { lang::ContainerOp::Get , A_CHAR("Get" ), 1 }, // integral 2 <--
319 { lang::ContainerOp::Create , A_CHAR("Create" ), 1 }, // integral 4
320} );
321DOX_MARKER([DOX_ENUMS_MULTIPLE_RECORDS_2])
322
324 { lang::CreateDefaults::No , A_CHAR("False"), 1 },
325 { lang::CreateDefaults::Yes, A_CHAR("True" ), 1 },
326 { lang::CreateDefaults::No , A_CHAR("0" ), 1 },
327 { lang::CreateDefaults::Yes, A_CHAR("1" ), 1 },
328 { lang::CreateDefaults::No , A_CHAR("No" ), 1 },
329 { lang::CreateDefaults::Yes, A_CHAR("Yes" ), 1 },
330 { lang::CreateDefaults::No , A_CHAR("Off" ), 2 },
331 { lang::CreateDefaults::Yes, A_CHAR("On" ), 2 },
332 { lang::CreateDefaults::No , A_CHAR("-" ), 1 },
333 { lang::CreateDefaults::Yes, A_CHAR("Ok" ), 2 }
334} );
335
337 { lang::CreateIfNotExists::No , A_CHAR("False"), 1 },
338 { lang::CreateIfNotExists::Yes, A_CHAR("True" ), 1 },
339 { lang::CreateIfNotExists::No , A_CHAR("0" ), 1 },
341 { lang::CreateIfNotExists::No , A_CHAR("No" ), 1 },
342 { lang::CreateIfNotExists::Yes, A_CHAR("Yes" ), 1 },
343 { lang::CreateIfNotExists::No , A_CHAR("Off" ), 2 },
345 { lang::CreateIfNotExists::No , A_CHAR("-" ), 1 },
347} );
348
350 { lang::CurrentData::Keep , A_CHAR("Keep" ) , 1 },
351 { lang::CurrentData::Clear , A_CHAR("Clear") , 1 },
352} );
353
355 { lang::Inclusion::Include , A_CHAR("Include") , 1 },
356 { lang::Inclusion::Exclude , A_CHAR("Exclude") , 1 },
357} );
358
360 { lang::Initialization::Suppress , A_CHAR("Suppress" ) , 1 },
361 { lang::Initialization::Default , A_CHAR("Default" ) , 1 },
362 { lang::Initialization::Nulled , A_CHAR("Nulled" ) , 1 },
363 { lang::Initialization::Suppress , A_CHAR("None" ) , 2 },
364 { lang::Initialization::Default , A_CHAR("Initialize") , 1 },
365 { lang::Initialization::Nulled , A_CHAR("Zero" ) , 1 },
366} );
367
369 { lang::LineFeeds::None , A_CHAR("None" ) , 1 },
370 { lang::LineFeeds::Ignore , A_CHAR("Ignore" ) , 1 },
371 { lang::LineFeeds::Unix , A_CHAR("Unix" ) , 1 },
372 { lang::LineFeeds::WindowsOS , A_CHAR("WindowsOS") , 1 },
373 { lang::LineFeeds::Platform , A_CHAR("Platform" ) , 1 },
374} );
375
377 { lang::Phase::Begin , A_CHAR("Begin") , 1 },
378 { lang::Phase::End , A_CHAR("End" ) , 1 },
379} );
380
382 { lang::Propagation::Omit , A_CHAR("Omit" ) , 1 },
383 { lang::Propagation::ToDescendants , A_CHAR("ToDescendants") , 1 },
384} );
385
387 { lang::Reach::Global , A_CHAR("Global") , 1 },
388 { lang::Reach::Local , A_CHAR("Local" ) , 1 },
389} );
390
392 { lang::Recursive::No , A_CHAR("False"), 1 },
393 { lang::Recursive::Yes, A_CHAR("True" ), 1 },
394 { lang::Recursive::No , A_CHAR("0" ), 1 },
395 { lang::Recursive::Yes, A_CHAR("1" ), 1 },
396 { lang::Recursive::No , A_CHAR("No" ), 1 },
397 { lang::Recursive::Yes, A_CHAR("Yes" ), 1 },
398 { lang::Recursive::No , A_CHAR("Off" ), 2 },
399 { lang::Recursive::Yes, A_CHAR("On" ), 2 },
400 { lang::Recursive::No , A_CHAR("-" ), 1 },
401 { lang::Recursive::Yes, A_CHAR("Ok" ), 2 }
402} );
403
405 { lang::Responsibility::KeepWithSender , A_CHAR("KeepWithSender") , 1 },
406 { lang::Responsibility::Transfer , A_CHAR("Transfer" ) , 1 },
407} );
408
410 { lang::Safeness::Safe , A_CHAR("Safe" ) , 1 },
411 { lang::Safeness::Unsafe , A_CHAR("Unsafe") , 1 },
412} );
413
415 { lang::Side::Left , A_CHAR("Left" ) , 1 },
416 { lang::Side::Right , A_CHAR("Right") , 1 },
417} );
418
420 { lang::SortOrder::Ascending , A_CHAR("Ascending" ) , 1 },
421 { lang::SortOrder::Descending , A_CHAR("Descending") , 1 },
422} );
423
425 { lang::SourceData::Copy , A_CHAR("Copy") , 1 },
426 { lang::SourceData::Move , A_CHAR("Move") , 1 },
427} );
428
430 { lang::Switch::Off , A_CHAR("Off") , 2 },
431 { lang::Switch::On , A_CHAR("On" ) , 2 },
432} );
433
435 { lang::Timezone::Local , A_CHAR("Local" ) , 1 },
436 { lang::Timezone::UTC , A_CHAR("UTC") , 1 },
437} );
438
440 { lang::Timing::Async , A_CHAR("Async" ) , 1 },
441 { lang::Timing::Sync , A_CHAR("Sync" ) , 1 },
442 { lang::Timing::Async , A_CHAR("Asynchronous") , 1 },
443 { lang::Timing::Sync , A_CHAR("Synchronous" ) , 1 },
444 { lang::Timing::Sync , A_CHAR("Synchronized") , 1 },
445} );
446
448 { lang::ValueReference::Absolute , A_CHAR("Absolute") , 1 },
449 { lang::ValueReference::Relative , A_CHAR("Relative") , 1 },
450} );
451
453 { lang::Whitespaces::Trim , A_CHAR("Trim") , 1 },
454 { lang::Whitespaces::Keep , A_CHAR("Keep") , 1 },
455} );
456
457
458// Threads
459#if !ALIB_SINGLE_THREADED
466} );
467
468#endif
469
470#if ALIB_SYSTEM
472 { system::SystemFolders::Root , A_CHAR("Root" ) , 1 },
473 { system::SystemFolders::Current , A_CHAR("Current" ) , 1 },
474 { system::SystemFolders::HomeConfig , A_CHAR("HomeConfig") , 5 },
475 { system::SystemFolders::Home , A_CHAR("Home" ) , 1 },
476 { system::SystemFolders::Module , A_CHAR("Module" ) , 1 },
477 { system::SystemFolders::Temp , A_CHAR("Temp" ) , 1 },
478 { system::SystemFolders::VarTemp , A_CHAR("VarTemp" ) , 1 },
479} );
480#endif
481
482#if ALIB_FORMAT
495} );
496
498 { format::ByteSizeUnits::B , A_CHAR("B" ) , 3 },
499 { format::ByteSizeUnits::KiB , A_CHAR("KiB" ) , 3 },
500 { format::ByteSizeUnits::MiB , A_CHAR("MiB" ) , 3 },
501 { format::ByteSizeUnits::GiB , A_CHAR("GiB" ) , 3 },
502 { format::ByteSizeUnits::TiB , A_CHAR("TiB" ) , 3 },
503 { format::ByteSizeUnits::PiB , A_CHAR("PiB" ) , 3 },
504 { format::ByteSizeUnits::EiB , A_CHAR("EiB" ) , 3 },
505 { format::ByteSizeUnits::ZiB , A_CHAR("ZiB" ) , 3 },
506 { format::ByteSizeUnits::YiB , A_CHAR("YiB" ) , 3 },
507 { format::ByteSizeUnits::RiB , A_CHAR("RiB" ) , 3 },
508 { format::ByteSizeUnits::QiB , A_CHAR("QiB" ) , 3 },
509 { format::ByteSizeUnits::B , A_CHAR("B" ) , 1 },
510 { format::ByteSizeUnits::kB , A_CHAR("kB" ) , 2 },
511 { format::ByteSizeUnits::MB , A_CHAR("MB" ) , 2 },
512 { format::ByteSizeUnits::GB , A_CHAR("GB" ) , 2 },
513 { format::ByteSizeUnits::TB , A_CHAR("TB" ) , 2 },
514 { format::ByteSizeUnits::PB , A_CHAR("PB" ) , 2 },
515 { format::ByteSizeUnits::EB , A_CHAR("EB" ) , 2 },
516 { format::ByteSizeUnits::ZB , A_CHAR("ZB" ) , 2 },
517 { format::ByteSizeUnits::YB , A_CHAR("YB" ) , 2 },
518 { format::ByteSizeUnits::RB , A_CHAR("RB" ) , 2 },
519 { format::ByteSizeUnits::QB , A_CHAR("QB" ) , 2 },
520} );
521
523 A_CHAR(
524 // general formatter errors
525 "11,ArgumentIndexIs0," "Argument index 0 not allowed.\n"
526 "In: {!Q}\n >{!FillC-}^"
527 "," "12,ArgumentIndexOutOfBounds," "Argument index #{} is out of bounds. {} arguments are available.\n"
528 "In: {!Q}\n >{!FillC-}^"
529 "," "13,IncompatibleTypeCode," "Detected placeholder type does not match given argument.\n"
530 "Placeholder number: {}\n"
531 "Placeholder type: {} ({})"
532 "Placeholder type: {} ({})\n"
533 "Deduced argument type: {!Q}\n"
534 ALIB_REL_DBG( "{!X}" , "\nNative argument type: <{}> ")
535 "In: {!Q}\n >{!FillC-}^"
536
537 "," "101,MissingClosingBracket," "Closing bracket '}}' of placeholder not found (or syntax error).\n"
538 "In: {!Q}\n >{!FillC-}^"
539 "," "102,MissingPrecisionValuePS," "Missing precision value after '.' character."
540 "\nIn: {!Q}\n >{!FillC-}^"
541 "," "103,DuplicateTypeCode," "Duplicate type code {!Q'} given (previous was {!Q'})."
542 ALIB_REL_DBG( "{!X}" , "\nNative argument type: <{}> ")
543 "\nIn: {!Q}\n >{!FillC-}^"
544 "," "104,UnknownTypeCode," "Unknown type code {!Q'} given."
545 "\nIn: {!Q}\n >{!FillC-}^"
546 ALIB_REL_DBG( "{!X}" ,"\nNative argument type: <{}>")
547 "," "105,ExclamationMarkExpected," "Expected '!' in continuation of placeholder."
548 ALIB_REL_DBG( "{!X}" , "\nNative argument type: <{}>")
549 "\nIn: {!Q}\n >{!FillC-}^"
550 "," "106,UnknownConversionPS," "Unknown conversion \"!{}\"."
551 ALIB_REL_DBG( "{!X}" , "\nNative argument type: <{}>")
552 "\nIn: {!Q}\n >{!FillC-}^"
553 "," "107,PrecisionSpecificationWithInteger," "Precision not allowed with integer format."
554 ALIB_REL_DBG( "{!X}" , "\nNative argument type: <{}>")
555 "\nIn: {!Q}\n >{!FillC-}^"
556 "," "108,MissingReplacementStrings," "Missing pair of replacement strings \"<src><repl>\" after \"!Replace\"."
557 ALIB_REL_DBG( "{!X}" , "\nNative argument type: <{}>")
558 "\nIn: {!Q}\n >{!FillC-}^"
559
560 "," "201,NegativeValuesInBracketsNotSupported," "Brackets for negative values not implemented/supported."
561 "\nIn: {!Q}\n >{!FillC-}^"
562 "," "202,MissingPrecisionValueJS," "Missing precision value after '.' character."
563 "\nIn: {!Q}\n >{!FillC-}^"
564 "," "203,HexadecimalFloatFormatNotSupported," "Hexadecimal float format not implemented/supported."
565 "\nIn: {!Q}\n >{!FillC-}^"
566 "," "204,NoAlternateFormOfConversion," "Alternate form '#' not supported with conversion {!Q}."
567 "\nIn: {!Q}\n >{!FillC-}^"
568 "," "205,NoPrecisionWithConversion," "Precision specification (\".{}\") is not supported with conversion {!Q}."
569 "\nIn: {!Q}\n >{!FillC-}^"
570 "," "206,UnknownDateTimeConversionSuffix," "Unknown date/time conversion suffix {!Q'}."
571 "\nIn: {!Q}\n >{!FillC-}^"
572 "," "207,UnknownConversionJS," "Unknown conversion character {!Q'}."
573 "\nIn: {!Q}\n >{!FillC-}^"
574
575 "," "501,UnknownPropertyInFormatString," "Unknown property identifier \"{}{}\" in format string.\n"
576 "Format string: {!Q}.\n"
577 "Allowed identifiers:"
578 "," "502,ErrorInResultingFormatString," "Error in resulting format string.\nSource format: {!Q}."
579 "," "510,MissingConfigurationVariable," "Missing or empty configuration variable {!Q} containing user-defined format string."
580
581 "," "601,UnknownMarker," "Unknown marker at position {}.\n"
582 " Marked text: {!Q}.\n"
583 " >{!FillC-}^"
584 "," "602,EndmarkerWithoutStart," "Found an end-marker without a start marker at position {}.\n"
585 " Marked text: {!Q}.\n"
586 " >{!FillC-}^"
587 )
588});
589#endif
590
591#if ALIB_VARIABLES
593 { variables::Priority::NONE , A_CHAR("NONE" ) , 1 },
594 { variables::Priority::AutoDetected , A_CHAR("AutoDetected" ) , 1 },
595 { variables::Priority::DefaultValues , A_CHAR("DefaultValues") , 1 },
596 { variables::Priority::Standard , A_CHAR("Standard" ) , 1 },
597 { variables::Priority::ConfigFile , A_CHAR("ConfigFile" ) , 2 },
598 { variables::Priority::Environment , A_CHAR("Environment" ) , 1 },
599 { variables::Priority::SessionFile , A_CHAR("SessionFile" ) , 8 },
600 { variables::Priority::CLI , A_CHAR("CLI" ) , 2 },
601 { variables::Priority::Session , A_CHAR("Session" ) , 2 },
602 { variables::Priority::Protected , A_CHAR("Protected" ) , 1 },
603});
604#endif
605
606#if ALIB_BITBUFFER
616});
617#endif
618
619#if ALIB_THREADMODEL
621 { threadmodel::Priority::Lowest , A_CHAR("Lowest" ), 4 },
622 { threadmodel::Priority::DeferredDeletion, A_CHAR("DeferredDeletion" ), 1 },
623 { threadmodel::Priority::Low , A_CHAR("Low" ), 1 },
624 { threadmodel::Priority::Standard , A_CHAR("Standard" ), 1 },
625 { threadmodel::Priority::Highest , A_CHAR("Highest" ), 5 },
626 { threadmodel::Priority::High , A_CHAR("High" ), 1 },
627} );
628#endif
629
630
631//--------------------------------------------------------------------------------------------------
632//--- END: Non-resourced versions of enum records
633//--------------------------------------------------------------------------------------------------
634#endif // ALIB_ENUMRECORDS
635
637 }
638
639DOX_MARKER([DOX_CRITICAL_SECTIONS_ADD_LOCK])
640#if ALIB_DEBUG_CRITICAL_SECTIONS && ALIB_MONOMEM
641 monomem::GLOBAL_ALLOCATOR.DbgCriticalSectionsPH.Get()->DCSLock=
643
644 monomem::GLOBAL_ALLOCATOR_LOCK.Dbg.Name= "GlobalAllocator";
645#endif
646DOX_MARKER([DOX_CRITICAL_SECTIONS_ADD_LOCK])
647}
648
649
650void Shutdown()
651{
652 #if ALIB_DEBUG_CRITICAL_SECTIONS && ALIB_MONOMEM
653 monomem::GLOBAL_ALLOCATOR.DbgCriticalSectionsPH.Get()->DCSLock= nullptr;
654 #if ALIB_FORMAT
655 Formatter::Default->DCSLock= nullptr;
656 #endif
657 #endif
658
659 IF_ALIB_THREADS ( alib::threads ::shutdown(); )
661 IF_ALIB_BOXING ( alib::boxing ::shutdown(); )
662 IF_ALIB_SINGLETONS ( alib::singletons ::shutdown(); )
663
664 #if ALIB_FORMAT
665 ALIB_ASSERT_WARNING( Formatter::Default.UseCount() == 1, "ALIB",
666 "DefaultFormatter still shared more than once: ", Formatter::Default.UseCount() )
667 Formatter::Default= nullptr;
668 #endif
669
671}
672
673#else
674//==================================================================================================
675//=========================================== Camp Version =========================================
676//==================================================================================================
677
678#if !DOXYGEN
680# include "ALib.Lang.CIFunctions.H"
681#endif
682
684 // if the global allocator was not initialized from outside, then we have to do it.
685 if (!monomem::GLOBAL_ALLOCATOR.IsInitialized())
686 new (&monomem::GLOBAL_ALLOCATOR) MonoAllocator(ALIB_DBG("Global",) 128);
687
688 ALIB_ASSERT_ERROR( CAMPS.empty(), "CAMPS", "List CAMPS already set." )
689
690 CAMPS.push_back( &BASECAMP );
691 IF_ALIB_ALOX( CAMPS.push_back( &ALOX ); )
692 IF_ALIB_CLI( CAMPS.push_back( &CLI ); )
693 IF_ALIB_EXPRESSIONS( CAMPS.push_back( &EXPRESSIONS ); )
694 IF_ALIB_FILES( CAMPS.push_back( &FILES ); )
695}
696
697void Bootstrap( BootstrapPhases targetPhase,
698 camp::Camp* targetCamp,
699 int alibVersion, int alibRevision, TCompilationFlags compilationFlags ) {
700 // verify ALib
701 AssertALibVersionAndFlags( alibVersion, alibRevision, compilationFlags );
702
703 // if not customized, create default module list
704 if( CAMPS.empty() )
706
707 if( targetCamp == nullptr )
708 targetCamp= CAMPS.back();
709
710 //std::cout << "Camp::Bootstrap called on: '" << this->ResourceCategory << "', target phase: " << int(targetPhase) << std::endl;
711
712 // Initialize non-camp modules once
714 IF_ALIB_BOXING ( boxing ::bootstrap(); )
715 IF_ALIB_THREADS( threads ::bootstrap(); )
716
717 #if ALIB_FORMAT
718 Formatter::Default .InsertDerived<FormatterPythonStyle>();
719 Formatter::Default->Next.InsertDerived<FormatterJavaStyle >();
720DOX_MARKER([DOX_CRITICAL_SECTIONS_ADD_LOCK2])
721#if ALIB_DEBUG_CRITICAL_SECTIONS && ALIB_MONOMEM
723#endif
724DOX_MARKER([DOX_CRITICAL_SECTIONS_ADD_LOCK2])
725 #endif
727 }
728
729 // find target camp in the list of camps
730 auto targetCampIt= CAMPS.rbegin();
731 while(targetCampIt != CAMPS.rend() &&
732 *targetCampIt != targetCamp )
733 ++targetCampIt;
734
735 ALIB_ASSERT_ERROR(targetCampIt != CAMPS.rend(), "CAMPS",
736 "Target camp given to function alib::Bootstrap() is not included in list alib::CAMPS.\n"
737 "Resource category of the target camp: ", targetCamp->ResourceCategory )
738
739
740 // loop over all phases
741 for ( int phaseIntegral= int(targetCamp->GetBootstrapState()) + 1 ;
742 phaseIntegral <= int( targetPhase ) ;
743 ++phaseIntegral )
744 {
745 BootstrapPhases actualPhase = BootstrapPhases( phaseIntegral );
746
747 // phase 1: distribute a resource pool
748 if ( actualPhase == BootstrapPhases::PrepareResources ) {
749 bool skipOne= false;
750
751 // create a resource pool?
752 if ( targetCamp->GetResourcePool() == nullptr ) {
755 resources::LocalResourcePool* lPool= dynamic_cast<resources::LocalResourcePool*>(spPool.Get());
756
757 // \releasetask{Update resource numbers numbers. Create resource reference dox for that}
758 integer expectedSize= 102 // [ALib]
759 IF_ALIB_ALOX( + 48 )
760 IF_ALIB_CLI ( + 17 )
761 IF_ALIB_EXPRESSIONS ( + 256 )
762 IF_ALIB_FILES ( + 49 ) ;
763
764 auto& hashMap= lPool->BootstrapGetInternalHashMap();
765 hashMap.BaseLoadFactor( 2.0 );
766 hashMap.MaxLoadFactor ( 5.0 );
767 hashMap.Reserve ( expectedSize, lang::ValueReference::Absolute );
768
769 targetCamp->BootstrapSetResourcePool( spPool );
770 skipOne= true;
771 }
772
773 // loop in reverse order over modules, start with this module
774 auto actPool = targetCamp->GetResourcePool();
775 for(auto campIt= targetCampIt ; campIt != CAMPS.rend() ; ++campIt ) {
776 if ( skipOne ) { skipOne= false; continue; }
777
778 // if a different resources object is set, then use that one from now on
779 if( (*campIt)->GetResourcePool() != nullptr
780 && (*campIt)->GetResourcePool() != actPool )
781 {
782 actPool= (*campIt)->GetResourcePool();
783 continue;
784 }
785
786 (*campIt)->BootstrapSetResourcePool( actPool );
787
788 } // resources distribution loop
789 }
790
791 // phase 2: create and distribute a configuration
792 else if ( actualPhase == BootstrapPhases::PrepareConfig) {
793 // create a configuration?
794 bool skipOne= false;
795 if ( targetCamp->GetConfig() == nullptr ) {
796 targetCamp->BootstrapSetConfig(SharedConfiguration(16u));
797 #if ALIB_DEBUG_CRITICAL_SECTIONS
798 targetCamp->GetConfig()->NodeTable().dcs.DCSName= "Camp.Config-bootstrap-created";
799 #endif
800 #if !ALIB_SINGLE_THREADED && ALIB_DEBUG
801 targetCamp->GetConfig().GetLock().Dbg.Name= "Camp.Config.Lock-bootstrap-created";
802 #endif
803 skipOne= true;
804 }
805
806 // loop in reverse order over modules, start with this module
807 SharedConfiguration* actConfig= &targetCamp->GetConfig();
808 for(auto module= targetCampIt ; module != CAMPS.rend() ; ++module ) {
809 if ( skipOne ) { skipOne= false; continue; }
810
811 // if a different config object is set, then use that one from now on
812 if( (*module)->GetConfig() != nullptr && (*module)->GetConfig() != *actConfig)
813 actConfig = &(*module)->GetConfig();
814 else
815 (*module)->BootstrapSetConfig( *actConfig );
816
817 } // resources distribution loop
818 }
819
820 // initialize modules on this phase
821 ALIB_DBG( bool foundThisModuleInList = false; )
822 for ( auto* camp : CAMPS ) {
823 // bootstrap camp
824 if(int(camp->GetBootstrapState()) >= int(actualPhase ) )
825 continue;
826
827 //std::cout << "Camp::Bootstrap '" << module->ResourceCategory << "', phase: " << int(actualPhase) << std::endl;
828
829 ALIB_ASSERT_ERROR( int(camp->GetBootstrapState()) == phaseIntegral - 1,
830 "With this invocation of Bootstrap() a camp skips a bootstrap phase.\n"
831 "Resource category of the target camp: ", camp->ResourceCategory )
832 camp->BootstrapSetPhase(actualPhase);
833 camp->Bootstrap();
834
835 // stop if this is us
836 if (camp == targetCamp ) {
837 ALIB_DBG( foundThisModuleInList = true );
838 break;
839 } }
840 ALIB_ASSERT_ERROR( foundThisModuleInList, "CAMPS",
841 "The target camp of function Bootstrap is not included in list alib::CAMPS "
842 "or was already bootstrapped for this phase!\n"
843 "Resource category of the target camp: ", targetCamp->ResourceCategory )
844 }
845
846 // Are all camps finalized?
847 if ( targetPhase == BootstrapPhases::Final && targetCamp == CAMPS.back() ) {
848 #if ALIB_DEBUG_CRITICAL_SECTIONS && ALIB_MONOMEM
849 monomem::GLOBAL_ALLOCATOR.DbgCriticalSectionsPH.Get()->DCSLock= &monomem::GLOBAL_ALLOCATOR_LOCK;
850 monomem::GLOBAL_ALLOCATOR_LOCK.Dbg.Name= "GlobalAllocator";
851 #endif
852} }
853
854void Shutdown( ShutdownPhases targetPhase, camp::Camp* targetCamp ) {
855 #if ALIB_DEBUG_CRITICAL_SECTIONS && ALIB_MONOMEM
856 monomem::GLOBAL_ALLOCATOR.DbgCriticalSectionsPH.Get()->DCSLock= nullptr;
857 Formatter::Default->DCSLock= nullptr;
858 #endif
859
860 ALIB_ASSERT_ERROR( CAMPS.IsNotEmpty(), "CAMPS",
861 "Empty camp list on shutdown. Shutdown invoked twice?" )
862 if( targetCamp == nullptr )
863 targetCamp= CAMPS.front();
864
865 //std::cout << "Camp::Shutdown called on'" << targetCamp->ResourceCategory << "', target phase: " << int(targetPhase) << std::endl;
866
867 // find target camp in the list of camps
868 auto targetCampIt= CAMPS.begin();
869 while( targetCampIt != CAMPS.end()
870 && *targetCampIt != targetCamp )
871 ++targetCampIt;
872 ALIB_ASSERT_ERROR(targetCampIt != CAMPS.end(), "CAMPS",
873 "Target camp given to function alib::Shutdown() is not included in list alib::CAMPS.\n"
874 "Resource category of the target camp: ", targetCamp->ResourceCategory )
875
876
877 ALIB_DBG( bool foundThisModuleInList= false );
878 // loop over all (both) termination levels
879 for( int phaseIntegral= int( ShutdownPhases::Announce )
880 ; phaseIntegral<= int( targetPhase )
881 ; ++phaseIntegral )
882 {
883 ShutdownPhases actualPhase = ShutdownPhases( phaseIntegral );
884
885 // shutdown in reverse order
886 for(auto campIt= CAMPS.rbegin() ; campIt != CAMPS.rend() ; ++campIt ) {
887 ALIB_ASSERT_ERROR( int(( *campIt )->GetBootstrapState()) < 0
888 || int(( *campIt )->GetBootstrapState()) == int(BootstrapPhases::Final),
889 "CAMPS", "Trying to terminate a not (fully) initialized module. "
890 "Module Name (resource category): ", targetCamp->ResourceCategory )
891
892 // shutdown module
893 if (int(( *campIt )->GetBootstrapState()) > -int(actualPhase) ) {
894 //std::cout << "Camp::Shutdown '" << (*campIt)->ResourceCategory << "', phase: " << int(actualPhase) << std::endl;
895
896 ALIB_ASSERT_ERROR( ( int(( *campIt )->GetBootstrapState()) == 3 && phaseIntegral == 1 )
897 || ( int(( *campIt )->GetBootstrapState()) == -1 && phaseIntegral == 2 ),
898 "CAMPS", "With this invocation of Bootstrap(), a camp skips a bootstrap phase \n"
899 "Resource category of the target camp: ", ( *campIt )->ResourceCategory )
900
901
902 ( *campIt )->Shutdown(actualPhase );
903 ( *campIt )->BootstrapSetPhase(BootstrapPhases(-int(actualPhase )) );
904
905 ALIB_DBG( if(( *campIt ) == targetCamp )
906 foundThisModuleInList= true; )
907 }
908
909 if(( *campIt ) == targetCamp )
910 break;
911 } }
912 ALIB_ASSERT_ERROR( foundThisModuleInList, "CAMPS",
913 "The target camp of function Shutdown is not included in list alib::CAMPS "
914 "or was already shutdown for this phase!\n"
915 "Resource category of the target camp: ", targetCamp->ResourceCategory )
916
917
918 #if ALIB_DEBUG_CRITICAL_SECTIONS
919 // deactivate assertions for non-locked access to configuration
920 if( targetPhase == ShutdownPhases::Announce)
921 for(auto campIt= CAMPS.rbegin() ; campIt != CAMPS.rend() ; ++campIt )
922 (*campIt)->GetConfig()->NodeTable().dcs.DCSLock= nullptr;
923 #endif
924
925 // delete resources/config
926 if( targetPhase == ShutdownPhases::Destruct)
927 for(auto campIt= CAMPS.rbegin() ; campIt != CAMPS.rend() ; ++campIt ) {
928 ( *campIt )->BootstrapSetResourcePool(nullptr);
929 ( *campIt )->BootstrapSetConfig(nullptr);
930
931 if(( *campIt ) == targetCamp )
932 break;
933 }
934
935 if( targetPhase == ShutdownPhases::Destruct
936 && targetCamp == CAMPS.front() )
937 {
938 IF_ALIB_THREADS( threads ::shutdown(); )
940 IF_ALIB_BOXING( boxing ::shutdown(); )
941 IF_ALIB_SINGLETONS( singletons ::shutdown(); )
942
943 ALIB_ASSERT_WARNING( Formatter::Default.UseCount() == 1, "ALIB",
944 "DefaultFormatter still shared more than once: ", Formatter::Default.UseCount() )
945 Formatter::Default= nullptr;
946
947 CAMPS.Reset();
949} }
950
951#endif // ALIB_CAMP
952} // namespace [alib]
953
954
955
956# include "ALib.Lang.CIMethods.H"
@ Huffman
Huffman encoding (byte based).
Definition ac.inl:253
@ Incremental
Only distances of the values are written.
Definition ac.inl:250
@ ALL
All compression methods selected.
Definition ac.inl:233
@ Sparse
Writes '1' if next value is equal to previous, '0' plus next value otherwise.
Definition ac.inl:244
@ MinMax
Stores the differences between the minimum and maximum value found.
Definition ac.inl:241
@ VerySparse
Writes the number of following equal or non equal values.
Definition ac.inl:247
@ NONE
No compression method selected.
Definition ac.inl:230
NCString ResourceCategory
Definition camp.inl:113
BootstrapPhases GetBootstrapState()
Definition camp.inl:174
SharedConfiguration & GetConfig()
Definition camp.inl:211
SharedPtr< resources::ResourcePool, MonoAllocator > SPResourcePool
Definition camp.inl:86
void BootstrapSetConfig(const SharedConfiguration &pConfig)
Definition camp.inl:202
void BootstrapSetResourcePool(const SPResourcePool &pResourcePool)
Definition camp.inl:228
SPResourcePool & GetResourcePool()
Definition camp.inl:238
void InsertDerived(TArgs &&... args)
@ Float
Outputs a number in floating point format.
@ IntBinary
Outputs a given number in base 2.
@ IntBase10
Outputs a given number in base 10. The default.
@ IntHex
Outputs a given number in base 16.
@ IntOctal
Outputs a given number in base 8.
static ALIB_DLL threads::RecursiveLock DefaultLock
static ALIB_DLL SPFormatter Default
lang::Placeholder< lang::DbgCriticalSections > DbgCriticalSectionsPH
TLock & GetLock() const noexcept
@ Running
The thread's Run method is currently processed.
Definition thread.inl:141
@ Started
Method Start was invoked but not running, yet.
Definition thread.inl:140
@ Terminated
The thread is terminated.
Definition thread.inl:144
#define IF_ALIB_FILES(...)
Definition alib.inl:353
#define IF_ALIB_BOXING(...)
Definition alib.inl:273
#define IF_ALIB_CLI(...)
Definition alib.inl:313
#define ALIB_REVISION
Definition alib.inl:21
#define IF_ALIB_THREADS(...)
Definition alib.inl:401
#define A_CHAR(STR)
#define ALIB_VERSION
Definition alib.inl:20
#define IF_ALIB_ALOX(...)
Definition alib.inl:257
#define IF_ALIB_SINGLETONS(...)
Definition alib.inl:369
#define ALIB_ASSERT_WARNING(cond, domain,...)
Definition alib.inl:1067
#define IF_ALIB_ENUMRECORDS(...)
Definition alib.inl:337
#define ALIB_DBG(...)
Definition alib.inl:853
#define ALIB_ASSERT_ERROR(cond, domain,...)
Definition alib.inl:1066
#define IF_ALIB_EXPRESSIONS(...)
Definition alib.inl:345
#define ALIB_REL_DBG(releaseCode,...)
Definition alib.inl:855
#define ALIB_FORMAT
Definition alib.inl:227
void Bootstrap(camp::Camp &camp, const NString &name, character innerDelim=',', character outerDelim=',')
Definition camp.inl:324
@ 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.
@ Yes
Denotes recursion.
@ 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".
@ Ignore
Same as 'None'.
@ False
False value.
@ 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.
@ Auto
Auto/default mode.
@ 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).
ALIB_DLL TMonoAllocator< lang::HeapAllocator > GLOBAL_ALLOCATOR
ALIB_DLL RecursiveLock GLOBAL_ALLOCATOR_LOCK
void bootstrap()
Definition thread.cpp:137
CompilationFlagMeaningsEntry COMPILATION_FLAG_MEANINGS[40]
format::FormatterJavaStyle FormatterJavaStyle
Type alias in namespace alib.
void AssertALibVersionAndFlags(int alibVersion, int alibRevision, TCompilationFlags compilationFlags)
unsigned char REVISION
BootstrapPhases
Definition camp.inl:15
@ Final
The final initialization phase. Here, camps are initializing their custom setup.
Definition camp.inl:35
camp::Basecamp BASECAMP
The singleton instance of ALib Camp class Basecamp.
Definition basecamp.cpp:81
containers::List< T, MonoAllocator, TRecycling > ListMA
Type alias in namespace alib.
Definition list.inl:693
void BootstrapAddDefaultCamps()
ALIB_DLL ListMA< camp::Camp * > CAMPS
ShutdownPhases
Termination levels usable with Bootstrapping ALib Camps.
Definition camp.inl:42
@ Destruct
The main phase of termination that destructs everything.
Definition camp.inl:46
lang::integer integer
Type alias in namespace alib.
Definition integers.inl:149
cli::CliCamp CLI
The singleton instance of ALib Camp class CliCamp.
Definition clicamp.cpp:42
variables::TSharedConfiguration< SharedLock > SharedConfiguration
Type alias in namespace alib.
monomem::TMonoAllocator< lang::HeapAllocator > MonoAllocator
void Bootstrap(BootstrapPhases targetPhase, camp::Camp *targetCamp, int alibVersion, int alibRevision, TCompilationFlags compilationFlags)
int VERSION
format::Formatter Formatter
Type alias in namespace alib.
lox::ALoxCamp ALOX
The singleton instance of ALib Camp class ALoxCamp.
Definition aloxcamp.cpp:53
bool NonCampModulesInitialized
files::FilesCamp FILES
The singleton instance of ALib Camp class FilesCamp.
Definition filescamp.cpp:47
expressions::ExpressionsCamp EXPRESSIONS
The singleton instance of ALib Camp class ExpressionsCamp.
TCompilationFlags COMPILATION_FLAGS
ALIB_DLL void Shutdown()
This is a struct composing an entry in COMPILATION_FLAG_MEANINGS.
Definition bootstrap.mpp:71
unsigned char bits[5]
The Flags.
Definition lang.mpp:67