ALib C++ Library
Library Version: 2312 R0
Documentation generated by doxygen
distribution.cpp
1 // #################################################################################################
2 // ALib C++ Library
3 //
4 // Copyright 2013-2023 A-Worx GmbH, Germany
5 // Published under 'Boost Software License' (a free software license, see LICENSE.txt)
6 // #################################################################################################
7 
9 
10 #if !defined(ALIB_DOX)
11 
12 #if !defined (HPP_ALIB_FS_MODULES_DISTRIBUTION)
14 #endif
15 
16 #if !defined (HPP_ALIB_COMPATIBILITY_STD_STRINGS_IOSTREAM)
18 #endif
19 
20 #if !defined (HPP_ALIB_RESOURCES_RESOURCES)
22 #endif
23 
24 # if ALIB_THREADS && ALIB_ENUMS
25 # include "alib/threads/thread.hpp"
26 # endif
27 
28 #if ALIB_CONFIGURATION
29 # if !defined (HPP_ALIB_CONFIG_CONFIG)
30 # include "alib/config/config.hpp"
31 # endif
32 # if !defined (HPP_ALIB_CONFIG_INI_FILE)
33 # include "alib/config/inifile.hpp"
34 # endif
35 # if !defined (HPP_ALIB_CONFIG_VARIABLE)
36 # include "alib/config/variable.hpp"
37 # endif
38 # if !defined (HPP_ALIB_CONFIG_CONFIGURATION)
40 # endif
41 # if !defined (HPP_ALIB_SYSTEM_ENVIRONMENT)
43 # endif
44 #endif
45 
46 #if ALIB_SYSTEM
47 # if !defined (HPP_ALIB_SYSTEM_SYSTEM)
48 # include "alib/system/system.hpp"
49 # endif
50 # if !defined (HPP_ALIB_SYSTEM_ENVIRONMENT)
52 # endif
53 # if !defined (HPP_ALIB_SYSTEM_PROCESSINFO)
55 # endif
56 # if !defined (HPP_ALIB_STRINGS_UTIL_TOKENIZER)
58 # endif
59 #endif
60 
61 #if ALIB_EXPRESSIONS
62 # if !defined (HPP_ALIB_EXPRESSIONS_EXPRESSIONS)
64 # endif
65 #endif
66 
67 #if ALIB_TEXT
68 # if !defined (HPP_ALIB_TEXT_TEXT)
69 # include "alib/text/text.hpp"
70 # endif
71 #endif
72 
73 #if ALIB_STRINGS
74 # if !defined (HPP_ALIB_STRINGS_NUMBERFORMAT)
76 # endif
77 #endif
78 
79 #if ALIB_BITBUFFER
80 # if !defined (HPP_AWORX_ALIB_BITBUFFER_ARRAY_COMPRESSOR)
82 # endif
83 #endif
84 
85 #if ALIB_MONOMEM
86 # if !defined (HPP_ALIB_MONOMEM_HASHTABLE)
88 # endif
89 #endif
90 
91 #if ALIB_RESULTS
92 # if !defined (HPP_ALIB_RESULTS_EXCEPTION)
94 # endif
95 # if !defined (HPP_ALIB_RESULTS_RESULTS)
96 # include "alib/results/results.hpp"
97 # endif
98 #endif
99 
100 #if ALIB_ALOX
101 # if !defined (HPP_ALIB_ALOXMODULE)
102 # include "alib/alox/aloxmodule.hpp"
103 # endif
104 #endif
105 
106 #if ALIB_CLI
107 # if !defined (HPP_ALIB_CLI_CLI)
108 # include "alib/cli/cli.hpp"
109 # endif
110 #endif
111 
112 #if !defined(HPP_ALIB_FS_COMMONENUMS)
114 #endif
115 
116 #if !defined (HPP_ALIB_ENUMS_RECORDBOOTSTRAP)
118 #endif
119 
120 #endif // !defined(ALIB_DOX)
121 
122 
123 namespace aworx {
124 
126 
127 namespace lib {
128 
129 // #################################################################################################
130 // Static instance and constructor
131 // #################################################################################################
132 
135 , Modules(&monomem::GlobalAllocator)
136 , LocaleFound(nullptr)
137 {
138  ALIB_ASSERT_ERROR( this == &ALIB, "MODULES",
139  "Instances of class ALibDistribution must not be created. Use singleton aworx::ALIB" )
140 
142  {
143  { "ALIB_DEBUG" , ALIB_VFYBIT_DEBUG },
144 
145  { "ALIB_MONOMEM" , ALIB_VFYBIT_MODULE_MONOMEM },
146  { "ALIB_SINGLETONS" , ALIB_VFYBIT_MODULE_SINGLETONS },
147  { "ALIB_CHARACTERS" , ALIB_VFYBIT_MODULE_CHARACTERS },
148  { "ALIB_ENUMS" , ALIB_VFYBIT_MODULE_ENUMS },
149  { "ALIB_TIME" , ALIB_VFYBIT_MODULE_TIME },
150  { "ALIB_BOXING" , ALIB_VFYBIT_MODULE_BOXING },
151  { "ALIB_STRINGS" , ALIB_VFYBIT_MODULE_STRINGS },
152  { "ALIB_BITBUFFER" , ALIB_VFYBIT_MODULE_BITBUFFER },
153  { "ALIB_RESOURCES" , ALIB_VFYBIT_MODULE_RESOURCES },
154  { "ALIB_THREADS" , ALIB_VFYBIT_MODULE_THREADS },
155  { "ALIB_TEXT" , ALIB_VFYBIT_MODULE_TEXT },
156  { "ALIB_RESULTS" , ALIB_VFYBIT_MODULE_RESULTS },
157  { "ALIB_SYSTEM" , ALIB_VFYBIT_MODULE_SYSTEM },
158  { "ALIB_CONFIGURATION" , ALIB_VFYBIT_MODULE_CONFIGURATION },
159  { "ALIB_ALOX" , ALIB_VFYBIT_MODULE_ALOX },
160  { "ALIB_EXPRESSIONS" , ALIB_VFYBIT_MODULE_EXPRESSIONS },
161  { "ALIB_CLI" , ALIB_VFYBIT_MODULE_CLI },
162 
163  { "ALIB_FEAT_SINGLETON_MAPPED" , ALIB_VFYBIT_FEAT_SINGLETON_MAPPED },
164 
165  { "ALIB_CHARACTERS_WIDE" , ALIB_VFYBIT_CHARACTERS_WIDE },
166  { "ALIB_CHARACTERS_WCHAR_IS_4" , ALIB_VFYBIT_CHARACTERS_WCHAR_IS_4 },
167 
168  { "ALIB_FEAT_BOXING_BIJECTIVE_INTEGRALS" , ALIB_VFYBIT_FEAT_BOXING_BIJECTIVE_INTEGRALS },
169  { "ALIB_FEAT_BOXING_BIJECTIVE_CHARACTERS" , ALIB_VFYBIT_FEAT_BOXING_BIJECTIVE_CHARACTERS},
170  { "ALIB_FEAT_BOXING_BIJECTIVE_FLOATS" , ALIB_VFYBIT_FEAT_BOXING_BIJECTIVE_FLOATS },
171 
172  { "ALIB_DEBUG_STRINGS" , ALIB_VFYBIT_DEBUG_STRINGS },
173  { "ALIB_DEBUG_BOXING" , ALIB_VFYBIT_DEBUG_BOXING },
174  { "ALIB_DEBUG_MONOMEM" , ALIB_VFYBIT_DEBUG_MONOMEM_MONOMEM },
175  { "ALIB_DEBUG_RESOURCES" , ALIB_VFYBIT_DEBUG_RESOURCES },
176 
177  { "ALOX_DBG_LOG" , ALOX_VFYBIT_DBG_LOG },
178  { "ALOX_DBG_LOG_CI" , ALOX_VFYBIT_DBG_LOG_CI },
179  { "ALOX_REL_LOG" , ALOX_VFYBIT_REL_LOG },
180  { "ALOX_REL_LOG_CI" , ALOX_VFYBIT_REL_LOG_CI },
181 
182  };
183 }
184 
185 
186 // #################################################################################################
187 // Module dependencies
188 // #################################################################################################
189 
190 
192 {
193  ALIB_ASSERT_ERROR( ALIB.Modules.IsEmpty(), "MODULES",
194  "List Modules::BootstrapModules already set." )
195 
196 
197  ALIB.Modules.PushBack( &TEXT );
198  ALIB.Modules.PushBack( &RESULTS );
199  ALIB_IF_SYSTEM( ALIB.Modules.PushBack( &SYSTEM ); )
200  ALIB_IF_CONFIGURATION( ALIB.Modules.PushBack( &CONFIG ); )
201  ALIB_IF_ALOX( ALIB.Modules.PushBack( &ALOX ); )
202  ALIB_IF_CLI( ALIB.Modules.PushBack( &CLI ); )
204 
205  ALIB.Modules.PushBack( &ALIB ); // this!
206 }
207 
208 
209 // #################################################################################################
210 // bootstrap/shutdown implementations
211 // #################################################################################################
212 
213 
214 
215 void ALibDistribution::bootstrap( BootstrapPhases phase, int argc, const char** argv, const wchar_t** wargv)
216 {
217  if( phase == BootstrapPhases::PrepareResources )
218  {
219  ArgC= argc;
220  ArgVN= argv;
221  ArgVW= wargv;
222 
223 
224  // ------ add resources ------
225  // enums
226 #if !ALIB_RESOURCES_OMIT_DEFAULTS
228 
229  // CodeMarker_CommonEnums
230  "Alignment", A_CHAR("0" "," "Left" "," "1" ","
231  "1" "," "Right" "," "1" ","
232  "2" "," "Center" "," "1" ),
233 
234  "Bool", A_CHAR("0" "," "False" "," "1" ","
235  "1" "," "True" "," "1" ","
236  "0" "," "0" "," "1" ","
237  "1" "," "1" "," "1" ","
238  "0" "," "No" "," "1" ","
239  "1" "," "Yes" "," "1" ","
240  "0" "," "Off" "," "2" ","
241  "1" "," "On" "," "2" ","
242  "0" "," "-" "," "1" ","
243  "1" "," "Ok" "," "2" ),
244 
245  "Caching", A_CHAR("0" "," "Disabled" "," "1" ","
246  "1" "," "Enabled" "," "1" ","
247  "1" "," "Auto" "," "1" ),
248 
249  "Case", A_CHAR("0" "," "Sensitive" "," "1" ","
250  "1" "," "Ignore" "," "1" ),
251 
252  "ContainerOp", A_CHAR("0" "," "Insert" "," "1" ","
253  "1" "," "Remove" "," "1" ","
254  "3" "," "GetCreate" "," "4" ","
255  "2" "," "Get" "," "1" ","
256  "4" "," "Create" "," "1" ),
257 
258  // CreateDefaults: using Bool
259  // CreateIfNotExists: using Bool
260 
261  "CurrentData", A_CHAR("0" "," "Keep" "," "1" ","
262  "1" "," "Clear" "," "1" ),
263 
264  "Inclusion", A_CHAR("0" "," "Include" "," "1" ","
265  "1" "," "Exclude" "," "1" ),
266 
267  "Initialization", A_CHAR("0" "," "DontInitialize" "," "1" ","
268  "1" "," "Initialize" "," "1" ","
269  "0" "," "Suppress" "," "1" ","
270  "1" "," "Perform" "," "1" ),
271 
272  "Phase", A_CHAR("0" "," "Begin" "," "1" ","
273  "1" "," "End" "," "1" ),
274 
275  "Propagation", A_CHAR("0" "," "Omit" "," "1" ","
276  "1" "," "ToDescendants" "," "1" ),
277 
278  "Reach", A_CHAR("0" "," "Global" "," "1" ","
279  "1" "," "Local" "," "1" ),
280 
281  "Responsibility", A_CHAR("0" "," "KeepWithSender" "," "1" ","
282  "1" "," "Transfer" "," "1" ),
283 
284  "Safeness", A_CHAR("0" "," "Safe" "," "1" ","
285  "1" "," "Unsafe" "," "1" ),
286 
287  "Side", A_CHAR("0" "," "Left" "," "1" ","
288  "1" "," "Right" "," "1" ),
289 
290  "SortOrder", A_CHAR("0" "," "Ascending" "," "1" ","
291  "1" "," "Descending" "," "1" ),
292 
293  "SourceData", A_CHAR("0" "," "Copy" "," "1" ","
294  "1" "," "Move" "," "1" ),
295 
296  "Switch", A_CHAR("0" "," "Off" "," "2" ","
297  "1" "," "On" "," "2" ),
298 
299  "Timezone", A_CHAR("0" "," "Local" "," "1" ","
300  "1" "," "UTC" "," "1" ),
301 
302  "Timing", A_CHAR("0" "," "Async" "," "1" ","
303  "1" "," "Sync" "," "1" ","
304  "0" "," "Asynchronous" "," "1" ","
305  "1" "," "Synchronous" "," "1" ","
306  "1" "," "Synchronized" "," "1" ),
307 
308  "ValueReference", A_CHAR("0" "," "Absolute" "," "1" ","
309  "1" "," "Relative" "," "1" ),
310 
311  "Whitespaces", A_CHAR("0" "," "Trim" "," "1" ","
312  "1" "," "Keep" "," "1" ),
313 
314 
315  #if ALIB_THREADS
316  "TSts", A_CHAR( "0" "," "Unstarted" "," "1" ","
317  "1" "," "Started" "," "3" ","
318  "2" "," "Running" "," "1" ","
319  "3" "," "Stopped" "," "3" ","
320  "4" "," "Terminated" "," "1" ),
321  #endif
322 
323 
325  // variables
326  "Var0", A_CHAR("1|ALIB|LOCALE|||"),
327  "Var1", A_CHAR("2|ALIB|WAIT_FOR_KEY_PRESS|||"),
328  "Var2", A_CHAR("3|ALIB|HAS_CONSOLE_WINDOW|||"),
329 
330 
331  "Var_C1", A_CHAR("Defines the locale of the application. If empty or not set, the system's locale is used."),
332  "Var_C2", A_CHAR("If true, the process waits for a key stroke on termination. If empty, under Windows" "\n"
333  "behavior is detected, under other OSes, defaults to false." ),
334  "Var_C3", A_CHAR("Boolean value that denotes what its name indicates. If empty, under Windows value is " "\n"
335  "detected, under other OSes, defaults to true." ),
336 
337  // default values
338  "Var_D2", A_CHAR("No"),
339  "Var_D3", A_CHAR("No"),
340 
341  #endif // ALIB_CONFIGURATION
342 
343  // INI-File comment for section ALIB
344  "INI_CMT_ALIB", A_CHAR("@>'/// '@HL-General ALib library settings.\n@HL-"),
345 
346  // Exit message when waiting for key-press requested with variable WAIT_FOR_KEY_PRESS
347  "EXIT_MSG" , A_CHAR( "ALIB: Press 'Enter' to exit..." ),
348 
350  "ACAlgos" , A_CHAR( "0" ",NONE" "," "1" ","
351  "31" ",ALL" "," "1" ","
352  "1" ",Uncompressed" "," "1" ","
353  "2" ",MinMax" "," "1" ","
354  "4" ",Sparse" "," "1" ","
355  "8" ",VerySparse" "," "1" ","
356  "16" ",Incremental" "," "1" ","
357  "32" ",Huffman" "," "1" ),
358  #endif
359  // end of BootstrapBulk()
360  nullptr );
361 #endif // !ALIB_RESOURCES_OMIT_DEFAULTS
362 
363  #if ALIB_BITBUFFER && ALIB_BOXING && ALIB_ENUMS
365  #endif
366 
367  }
368 
369  else if( phase == BootstrapPhases::PrepareConfig )
370  {
372 
373 #if ALIB_BITBUFFER
375 #endif
376 
377  // CodeMarker_CommonEnums
381 DOX_MARKER( [DOX_ALIB_ENUMS_MAKE_PARSABLE_22] )
383 DOX_MARKER( [DOX_ALIB_ENUMS_MAKE_PARSABLE_22] )
384  EnumRecords<aworx::lib::ContainerOp >::Bootstrap( *this, "ContainerOp" );
387  EnumRecords<aworx::lib::CurrentData >::Bootstrap( *this, "CurrentData" );
389  EnumRecords<aworx::lib::Initialization >::Bootstrap( *this, "Initialization" );
391  EnumRecords<aworx::lib::Propagation >::Bootstrap( *this, "Propagation" );
393  EnumRecords<aworx::lib::Responsibility >::Bootstrap( *this, "Responsibility" );
401  EnumRecords<aworx::lib::ValueReference >::Bootstrap( *this, "ValueReference" );
402  EnumRecords<aworx::lib::Whitespaces >::Bootstrap( *this, "Whitespaces" );
403 
404 #if ALIB_THREADS
405  // Enums from non-resourced modules
407 #endif
408  }
409 
410 
411  else if( phase == BootstrapPhases::Final )
412  {
413  ALIB_IF_CONFIGURATION( Variable variable; )
414 
415  //############### set locale ###############
416  int receivedFrom= 0;
417  String256 locale;
418  #if ALIB_CONFIGURATION
419  variable.Declare( Variables::LOCALE );
420  if ( config->Load( variable ) != Priorities::NONE
421  && variable.GetString().IsNotEmpty() )
422  {
423  receivedFrom= 1;
424  locale._( variable.GetString() );
425  }
426  else
427  #endif
428 
430  if ( EnvironmentVariables::Get( A_CHAR("LANG") ,locale ) ) receivedFrom= 2;
431  else if ( EnvironmentVariables::Get( A_CHAR("LANGUAGE") ,locale ) ) receivedFrom= 3; )
432 
433  if( receivedFrom > 0 && !locale.Equals<Case::Ignore>( A_CHAR("none") ) )
434  {
435  ALIB_STRINGS_TO_NARROW( locale, nLocale, 1024)
436  if( !setlocale(LC_ALL, nLocale ) )
437  {
438  NString256 msg( "ALib Error: setlocale(\""); msg << nLocale <<"\") failed. Setting read from ";
439  msg << ( receivedFrom == 1 ? "config variable 'ALIB_LOCALE'" :
440  receivedFrom == 2 ? "environment variable 'LANG'" :
441  receivedFrom == 3 ? "environment variable 'LANGUAGE'" : "ERROR" );
442 
443  std::cerr.write( msg.Buffer(), msg.Length() );
444 
445  std::cerr << ". Trying 'setlocale(LC_ALL, \"\")': ";
446  if ( setlocale(LC_ALL, "" ) )
447  std::cerr << " success.";
448  else
449  {
450  std::cerr << "failed. Trying 'setlocale(LC_ALL, \"C\")': ";
451  if ( setlocale(LC_ALL, "C" ) )
452  std::cerr << " success.";
453  else
454  std::cerr << std::endl << " Panic: No standard locale setting was successful!";
455  }
456  std::cerr << std::endl;
457  }
458  else
460  }
461 
462  // set the system's locale as the default for our static default number format
463  #if ALIB_STRINGS
466  #endif
467 
468 
469  // --- determine if we want to wait for a keypress upon termination ---
470  #if ALIB_CONFIGURATION
471  variable.Declare( Variables::WAIT_FOR_KEY_PRESS );
472  config->Load( variable );
473  if ( variable.Size() > 0 )
474  WaitForKeyPressOnTermination= variable.IsTrue();
475  else
476  {
477  #if defined(_WIN32) && ALIB_DEBUG
479  && IsDebuggerPresent();
480  #else
482  #endif
483  }
484  #else
485  {
486  #if defined(_WIN32) && ALIB_DEBUG
488  && IsDebuggerPresent();
489  #else
491  #endif
492  }
493  #endif
494 
495  // --- determine if we have a console window ---
496  // read configuration
497  #if ALIB_CONFIGURATION
498  variable.Declare( Variables::HAS_CONSOLE_WINDOW );
499  config->Load( variable );
500  if ( variable.Size() > 0 && variable.GetString().Length() > 0 )
501  HasConsoleWindow= variable.IsTrue();
502  else
503  #endif // ALIB_CONFIGURATION
504  {
505  #if defined(_WIN32)
506  // determine if we have a console window
507  HasConsoleWindow= GetConsoleWindow() != NULL;
508  #else
509  HasConsoleWindow= true;
510  #endif
511  }
512 
513  // test if all modules have been initialized
514  #if ALIB_DEBUG
516  ALIB_IF_CLI ( assert( lib::CLI .IsBootstrapped( ) ); )
517  ALIB_IF_ALOX ( assert( lib::ALOX .IsBootstrapped( ) ); )
519  ALIB_IF_SYSTEM ( assert( lib::SYSTEM .IsBootstrapped( ) ); )
520  ALIB_IF_RESULTS ( assert( lib::RESULTS .IsBootstrapped( ) ); )
521  ALIB_IF_TEXT ( assert( lib::TEXT.IsBootstrapped( ) ); )
522  #endif // ALIB_DEBUG
523 
524  // Set global debug flag about ALib's bootstrap
525  #if ALIB_DEBUG
526  DbgIsBootstrapped= true;
527  #endif
528  }
529 }
530 
531 
533 {
534  if( phase == ShutdownPhases::Announce )
535  {
536  #if ALIB_CONFIGURATION
538  GetResourcePool(), ResourceCategory, "INI_CMT_" );
539  #endif
540  return;
541  }
542 
544  {
545  #if defined(_WIN32)
546  OutputDebugStringA( "\r\nALIB: Waiting for 'Enter' key in the console window.\r\n" );
547  #endif
548 
549  std::cout << std::endl << GetResource("EXIT_MSG") << std::endl;
550  while ( getchar() != '\n' )
551  ;
552  }
553 
554  // Set global debug flag about ALib's bootstrap
555  #if ALIB_DEBUG
556  DbgIsBootstrapped= false;
557  #endif
558 
559 }
560 
561 
562 // #############################################################################################
563 // Environment definition/detection
564 // #############################################################################################
565 
566 #if ALIB_SYSTEM
567 
568 //! @cond NO_DOX
569  #if defined(__unix__) || defined(__APPLE__)
570  namespace {
571  String DebuggerProcessNames= A_CHAR("gdb|debugserver");
572  }
573  #endif
574 //! @endcond
575 
577  {
578  #if defined(__unix__) || defined(__APPLE__)
579 
580  // Unix: search debugger process in parent processes
581  const ProcessInfo& pi= ProcessInfo::Current();
582  uinteger parentPID= pi.PPID;
583  if ( parentPID == 0 )
584  return false;
585 
586  ProcessInfo actPI( parentPID );
587  Tokenizer tknzr( DebuggerProcessNames, '|' );
588  while(tknzr.HasNext() )
589  {
590  Substring& debuggerName= tknzr.Next();
591  if (actPI.Name.StartsWith( debuggerName ) )
592  return true;
593  }
594  return false;
595 
596  #elif defined(_WIN32)
597 
598  return (bool) ( ::IsDebuggerPresent() != 0 ) ;
599 
600  #else
601  #pragma message ("Unknown Platform in file: " __FILE__ )
602  return false;
603  #endif
604  }
605 
606 #endif // ALIB_SYSTEM
607 
608 
609 // #############################################################################################
610 // CheckDistribution
611 // #############################################################################################
612 void ALibDistribution::CheckDistribution( int alibVersion, uint64_t compilationFlags )
613 {
614  if (Version != alibVersion )
615  {
616  std::cout << "!!! Error in ALox library compilation: linked against wrong version of ALib" << std::endl;
617  std::cout << "!!! ALib library version: " << Version << std::endl;
618  std::cout << "!!! ALib requested version: " << alibVersion << std::endl;
619  std::cout << "!!! Exiting with exit(-1)" << std::endl;
620  exit(-1);
621  }
622 
623  // verify the given (actual compilation units') flags against ALib
624  if (!VerifyCompilationFlags( compilationFlags ) )
625  {
626  std::cout << "!!! Error in ALib library compilation: linked library of ALib has different compiler symbols set." << std::endl;
627  exit(-1);
628  }
629 }
630 
631 
632 }} // namespace [aworx::lib]
633 
634 
635 /**
636  * \dir alib
637  * This is the root folder of all source files of \alib.
638  */
639 
640 /**
641  * \dir alib/alox
642  * This directory contains header files and compilation units of module \alib_alox.
643  */
644 
645 /**
646  * \dir alib/alox/detail
647  * This directory contains header files and compilation units of module \alib_alox.
648  */
649 
650 /**
651  * \dir alib/alox/detail/textlogger
652  * This directory contains header files and compilation units of module \alib_alox.
653  */
654 
655 /**
656  * \dir alib/alox/loggers
657  * This directory contains header files and compilation units of module \alib_alox.
658  */
659 
660 /**
661  * \dir alib/bitbuffer
662  * This directory contains header files and compilation units of module \alib_bitbuffer.
663  */
664 
665 /**
666  * \dir alib/bitbuffer/ac_v1
667  * This directory contains detail header files and compilation units of module \alib_bitbuffer.
668  */
669 
670 /**
671  * \dir alib/boxing
672  * This directory contains header files and compilation units of module \alib_boxing.
673  */
674 
675 /**
676  * \dir alib/boxing/detail
677  * This directory contains detail header files and compilation units of module \alib_boxing.
678  */
679 
680 /**
681  * \dir alib/characters
682  * This directory contains header files and compilation units of module \alib_characters.
683  */
684 
685 /**
686  * \dir alib/cli
687  * This directory contains header files and compilation units of module \alib_cli.
688  */
689 
690 /**
691  * \dir alib/compatibility
692  * This directory contains optional header files that provide compatibility between
693  * \alib types and concepts and those of the C++ standard library as well as 3rd party libraries.
694  */
695 
696 /**
697  * \dir alib/config
698  * This directory contains header files and compilation units of module \alib_config.
699  */
700 
701 /**
702  * \dir alib/enums
703  * This directory contains header files and compilation units of module \alib_enums.
704  */
705 
706 /**
707  * \dir alib/enums/detail
708  * This directory contains detail header files and compilation units of module \alib_enums.
709  */
710 
711 /**
712  * \dir alib/expressions
713  * This directory contains header files and compilation units of module \alib_expressions.
714  */
715 
716 /**
717  * \dir alib/expressions/detail
718  * This directory contains detail header files and compilation units of module \alib_expressions.
719  */
720 
721 /**
722  * \dir alib/expressions/plugins
723  * This directory contains header files and compilation units of module \alib_expressions.
724  */
725 
726 /**
727  * \dir alib/expressions/util
728  * This directory contains header files and compilation units of module \alib_expressions.
729  */
730 
731 /**
732  * \dir alib/lib
733  * This directory contains source files of \ref alib_manual_modules_filesets "file sets" and
734  * other general (module independent) sources of \aliblong.
735  */
736 
737 /**
738  * \dir alib/lib
739  * This directory contains headers of \alib that mostly concern preprocessor definitions.
740  * In addition, several sub-directories reside here, which correspond to the different
741  * \ref alib_manual_modules_filesets "ALib Filesets".
742  */
743 
744 /**
745  * \dir alib/lib/fs_commonenums
746  * This directory contains files contained in \ref alib_manual_modules_filesets "fileset" "Common Enums".
747  * The availability of this directory depends on the \alibdist and can be tested with
748  * code selection symbol ALIB_FILESET_COMMON_ENUMS.
749  */
750 
751 /**
752  * \dir alib/lib/fs_lists
753  * This directory contains files contained in \ref alib_manual_modules_filesets "fileset" "Lists".
754  * The availability of this directory depends on the \alibdist and can be tested with
755  * code selection symbol ALIB_FILESET_LISTS.
756  */
757 
758 /**
759  * \dir alib/lib/fs_modules
760  * This directory contains files contained in \ref alib_manual_modules_filesets "fileset" "Modules".
761  * The availability of this directory depends on the \alibdist and can be tested with
762  * code selection symbol ALIB_FILESET_MODULES.
763  */
764 
765 /**
766  * \dir alib/lib/fs_owner
767  * This directory contains files contained in \ref alib_manual_modules_filesets "fileset" "Owner".
768  * The availability of this directory depends on the \alibdist and can be tested with
769  * code selection symbol ALIB_FILESET_OWNER.
770  */
771 
772 /**
773  * \dir alib/lib/fs_plugins
774  * This directory contains files contained in \ref alib_manual_modules_filesets "fileset" "Plugins".
775  * The availability of this directory depends on the \alibdist and can be tested with
776  * code selection symbol ALIB_FILESET_PLUGINS.
777  */
778 
779 /**
780  * \dir alib/monomem
781  * This directory contains header files and compilation units of module \alib_monomem.
782  */
783 
784 /**
785  * \dir alib/monomem/detail
786  * This directory contains detail header files and compilation units of module \alib_monomem.
787  */
788 
789 /**
790  * \dir alib/monomem/util
791  * This directory contains header files and compilation units of utility types of module \alib_monomem.
792  */
793 
794 /**
795  * \dir alib/resources
796  * This directory contains header files and compilation units of module \alib_resources.
797  */
798 
799 /**
800  * \dir alib/resources/detail
801  * This directory contains detail header files and compilation units of module \alib_resources.
802  */
803 
804 /**
805  * \dir alib/results
806  * This directory contains header files and compilation units of module \alib_results.
807  */
808 
809 /**
810  * \dir alib/singletons
811  * This directory contains header files and compilation units of module \alib_singletons.
812  */
813 
814 /**
815  * \dir alib/strings
816  * This directory contains header files and compilation units of module \alib_strings.
817  */
818 
819 /**
820  * \dir alib/strings/detail
821  * This directory contains detail header files and compilation units of module \alib_strings.
822  */
823 
824 /**
825  * \dir alib/strings/util
826  * This directory contains header files and compilation units of utility types of module \alib_strings.
827  */
828 
829 /**
830  * \dir alib/system
831  * This directory contains header files and compilation units of module \alib_system.
832  */
833 
834 /**
835  * \dir alib/text
836  * This directory contains header files and compilation units of module \alib_text.
837  */
838 
839 /**
840  * \dir alib/threads
841  * This directory contains header files and compilation units of module \alib_threads.
842  */
843 
844 /**
845  * \dir alib/threads/detail
846  * This directory contains detail header files and compilation units of module \alib_threads.
847  */
848 
849 /**
850  * \dir alib/time
851  * This directory contains header files and compilation units of module \alib_time.
852  */
aworx::lib::system::ProcessInfo::PPID
uinteger PPID
Definition: processinfo.hpp:58
aworx::lib::strings::TString::Length
constexpr integer Length() const
Definition: string.hpp:341
ALIB_THREADS
#define ALIB_THREADS
Definition: modules.hpp:227
aworx::lib::config::Priorities::NONE
aworx::lib::strings::TNumberFormat< character >::Global
static TNumberFormat Global
Definition: numberformat.hpp:150
aworx::lib::Module::resourcePool
resources::ResourcePool * resourcePool
Definition: module.hpp:114
aworx::lib::strings::TNumberFormat::SetFromLocale
void SetFromLocale()
aworx::lib::config::Configuration::Load
ALIB_API Priorities Load(Variable &variable)
Definition: configuration.cpp:100
aworx::lib::ALibDistribution::ArgC
int ArgC
Definition: lib/fs_modules/distribution.hpp:246
config.hpp
aworx::lib::ALibDistribution::CheckDistribution
ALIB_API void CheckDistribution(int alibVersion=ALIB_VERSION, uint64_t compilationFlags=ALIB_COMPILATION_FLAGS)
Definition: distribution.cpp:612
aworx::lib::system::ProcessInfo::Current
static const ALIB_API ProcessInfo & Current()
Definition: processinfo.cpp:51
hashtable.hpp
aworx::lib::Module::ShutdownPhases
ShutdownPhases
Definition: module.hpp:88
aworx::lib::ALibDistribution
Definition: lib/fs_modules/distribution.hpp:180
aworx::lib::ALibDistribution::BootstrapFillDefaultModuleList
ALIB_API void BootstrapFillDefaultModuleList()
Definition: distribution.cpp:191
configuration.hpp
resources.hpp
aworx::lib::config::IniFile::AddResourcedSectionComments
static ALIB_API void AddResourcedSectionComments(Configuration &config, ResourcePool &resourcePool, const NString &resourceCategory, const NString &resourceNamePrefix)
Definition: inifile.cpp:616
ALIB_IF_CLI
#define ALIB_IF_CLI(...)
Definition: modules.hpp:276
aworx::lib::system::ProcessInfo::Name
AString Name
Definition: processinfo.hpp:41
aworx::lib::enums::EnumRecords::Bootstrap
static void Bootstrap(TEnum element, TArgs &&... args) noexcept
aworx::lib::Module::BootstrapPhases
BootstrapPhases
Definition: module.hpp:78
ALIB_STRINGS_TO_NARROW
#define ALIB_STRINGS_TO_NARROW( src, dest, bufSize)
Definition: strings/fwds.hpp:330
aworx::lib::CLI
cli::Cli CLI
Definition: cli.cpp:33
aworx::lib::ALOX
lox::ALox ALOX
Definition: aloxmodule.cpp:52
aworx::lib::monomem::GlobalAllocator
MonoAllocator GlobalAllocator(8 *1024)
Definition: monoallocator.hpp:710
aworx::lib::ALibDistribution::LocaleFound
String LocaleFound
Definition: lib/fs_modules/distribution.hpp:238
recordbootstrap.hpp
aworx::lib::SYSTEM
system::System SYSTEM
Definition: system.cpp:58
cli.hpp
ALIB_IF_ALOX
#define ALIB_IF_ALOX(...)
Definition: modules.hpp:252
ALIB_BITBUFFER
#define ALIB_BITBUFFER
Definition: modules.hpp:208
aworx::lib::Module::BootstrapPhases::PrepareResources
numberformat.hpp
inifile.hpp
aworx::lib::strings::TString< character >
processinfo.hpp
variable.hpp
aworx::lib::config::Variable
Definition: variable.hpp:196
aworx::lib::DbgIsBootstrapped
bool DbgIsBootstrapped
Definition: alib.cpp:17
aworx::lib::ALibDistribution::IsDebuggerPresent
ALIB_API bool IsDebuggerPresent()
Definition: distribution.cpp:576
aworx::lib::Module::ResourceCategory
NCString ResourceCategory
Definition: module.hpp:172
aworx::lib::Case::Ignore
alib_precompile.hpp
ALIB_ENUMS
#define ALIB_ENUMS
Definition: modules.hpp:213
aworx::lib::Module::config
config::Configuration * config
Definition: module.hpp:138
aworx::lib::ALibDistribution::ArgVN
const char ** ArgVN
Definition: lib/fs_modules/distribution.hpp:253
aworx::lib::ALibDistribution::bootstrap
virtual void bootstrap(BootstrapPhases phase, int argc, const char **argv, const wchar_t **wargv) override
Definition: distribution.cpp:215
aworx::lib::bitbuffer::ac_v1::ArrayCompressor::Algorithm
Algorithm
Definition: ac.hpp:90
aworx::lib::ALibDistribution::ALibDistribution
ALibDistribution()
Definition: distribution.cpp:133
ALIB_IF_EXPRESSIONS
#define ALIB_IF_EXPRESSIONS(...)
Definition: modules.hpp:300
thread.hpp
aworx::lib::strings::TString::Buffer
constexpr const TChar * Buffer() const
Definition: string.hpp:334
ALIB_REVISION
#define ALIB_REVISION
Definition: modules.hpp:21
aworx::lib::ALibDistribution::ArgVW
const wchar_t ** ArgVW
Definition: lib/fs_modules/distribution.hpp:260
ALIB_COMPILATION_FLAGS
#define ALIB_COMPILATION_FLAGS
aworx::lib::strings::TSubstring< character >
aworx
Definition: alox/alox.hpp:40
aworx::lib::ALibDistribution::HasConsoleWindow
bool HasConsoleWindow
Definition: lib/fs_modules/distribution.hpp:230
results.hpp
aworx::lib::strings::util::TTokenizer::Next
ALIB_API TSubstring< TChar > & Next(Whitespaces trimming=Whitespaces::Trim, TChar newDelim='\0')
Definition: tokenizer.cpp:18
aloxmodule.hpp
ALIB_IF_TEXT
#define ALIB_IF_TEXT(...)
Definition: modules.hpp:356
aworx::ALIB
lib::ALibDistribution ALIB
Definition: distribution.cpp:125
aworx::lib::strings::TLocalString
Definition: strings/fwds.hpp:46
aworx::lib::Module::BootstrapPhases::Final
The final initialization phase.
aworx::lib::Module::GetConfig
config::Configuration & GetConfig()
Definition: module.hpp:401
aworx::lib::TEXT
text::Text TEXT
Definition: text.cpp:48
ALIB_BOXING_BOOTSTRAP_REGISTER_FAPPEND_FOR_APPENDABLE_TYPE
#define ALIB_BOXING_BOOTSTRAP_REGISTER_FAPPEND_FOR_APPENDABLE_TYPE(TAppendable)
Definition: functions.inl:502
expressions.hpp
aworx::lib::Variables::LOCALE
ALib Resourced variable.
aworx::lib::resources::ResourcePool::BootstrapBulk
virtual void BootstrapBulk(const nchar *category,...)=0
A_CHAR
#define A_CHAR(STR)
ALIB_DEBUG
#define ALIB_DEBUG
aworx::lib::strings::TNumberFormat::WriteGroupChars
bool WriteGroupChars
Definition: numberformat.hpp:308
ALIB_IF_RESULTS
#define ALIB_IF_RESULTS(...)
Definition: modules.hpp:316
ALIB_ASSERT_ERROR
#define ALIB_ASSERT_ERROR(cond,...)
Definition: tools.hpp:185
aworx::lib::Module::VerifyCompilationFlags
ALIB_API bool VerifyCompilationFlags(uint64_t compilationFlags)
Definition: module.cpp:354
aworx::lib::strings::TAString::_
TAString & _(const TString< TChar > &src, integer regionStart, integer regionLength=MAX_LEN)
Definition: astring.hpp:1048
ALIB_IF_CONFIGURATION
#define ALIB_IF_CONFIGURATION(...)
Definition: modules.hpp:284
aworx::lib::uinteger
platform_specific uinteger
Definition: integers.hpp:55
aworx::lib::strings::util::TTokenizer
Definition: tokenizer.hpp:66
text.hpp
aworx::lib::EXPRESSIONS
expressions::Expressions EXPRESSIONS
Definition: expressions.cpp:44
exception.hpp
aworx::lib::CONFIG
Config CONFIG
Definition: config.cpp:40
aworx::lib::Variables::WAIT_FOR_KEY_PRESS
ALib Resourced variable.
aworx::lib::Module::CompilationFlagMeanings
std::vector< std::pair< const nchar *, uint64_t > > CompilationFlagMeanings
Definition: module.hpp:188
distribution.hpp
ALIB_VERSION
#define ALIB_VERSION
Definition: modules.hpp:20
aworx::lib::Module::BootstrapPhases::PrepareConfig
system.hpp
aworx::lib::Variables::HAS_CONSOLE_WINDOW
ALib Resourced variable.
aworx::lib::system::EnvironmentVariables::Get
static ALIB_API bool Get(const CString &varName, AString &target, CurrentData targetData=CurrentData::Clear)
Definition: environment.cpp:30
aworx::lib::ALibDistribution::shutdown
virtual void shutdown(ShutdownPhases phase) override
Definition: distribution.cpp:532
aworx::lib::Module
Definition: module.hpp:74
tokenizer.hpp
aworx::lib::Module::ShutdownPhases::Announce
commonenums.hpp
aworx::lib::Module::IsBootstrapped
bool IsBootstrapped()
Definition: module.hpp:361
aworx::lib::strings::util::TTokenizer::HasNext
bool HasNext()
Definition: tokenizer.hpp:199
aworx::lib::strings::TString::StartsWith
bool StartsWith(const TString &needle) const
Definition: string.hpp:774
std_strings_iostream.hpp
ALIB_CONFIGURATION
#define ALIB_CONFIGURATION
Definition: modules.hpp:212
aworx::lib::enums::EnumRecords
Definition: records.hpp:281
aworx::lib::Module::Version
const int Version
Definition: module.hpp:158
aworx::lib::Module::GetResource
const String & GetResource(const NString &name)
Definition: module.hpp:462
aworx::lib::monomem::MonoAllocator::EmplaceString
strings::TString< TChar > EmplaceString(const strings::TString< TChar > &src)
Definition: monoallocator.hpp:591
aworx::lib::ALibDistribution::Modules
List< Module * > Modules
Definition: lib/fs_modules/distribution.hpp:199
aworx::lib::ALibDistribution::WaitForKeyPressOnTermination
bool WaitForKeyPressOnTermination
Definition: lib/fs_modules/distribution.hpp:211
aworx::lib::RESULTS
results::Results RESULTS
Definition: results.cpp:35
aworx::lib::system::ProcessInfo
Definition: processinfo.hpp:22
arraycompressor.hpp
ALIB_IF_SYSTEM
#define ALIB_IF_SYSTEM(...)
Definition: modules.hpp:348
aworx::lib::Module::GetResourcePool
ResourcePool & GetResourcePool()
Definition: module.hpp:435
environment.hpp