10# if !defined(HPP_ALIB_LANG_BASECAMP)
13# if !defined (HPP_ALIB_CAMP_PROCESSINFO)
16# if !defined (HPP_ALIB_STRINGS_UTIL_TOKENIZER)
19# if !defined (HPP_ALIB_STRINGS_NUMBERFORMAT)
22# if !defined (HPP_ALIB_STRINGS_FORMAT)
25# if !defined (HPP_ALIB_STRINGS_SUBSTRING)
28# if !defined (HPP_ALIB_STRINGS_DETAIL_NUMBERCONVERSION)
31# if !defined(HPP_ALIB_TIME_TIME)
34# if !defined (HPP_ALIB_LANG_RESOURCES_RESOURCES)
37# if !defined (HPP_ALIB_CAMP_DIRECTORY)
40# if !defined (HPP_ALIB_CAMP_CALENDAR)
43# if !defined (HPP_ALIB_ENUMS_RECORDBOOTSTRAP)
46# if !defined(HPP_ALIB_ENUMS_SERIALIZATION)
50# if !defined (HPP_ALIB_CAMP_MESSAGE_REPORT)
54# if !defined(HPP_ALIB_LANG_FORMAT_FWDS)
57# if !defined(HPP_ALIB_LANG_FORMAT_EXCEPTIONS)
60# if !defined (HPP_ALIB_LANG_FORMAT_FORMATTER_PYTHONSTYLE)
63# if !defined (HPP_ALIB_LANG_FORMAT_FORMATTER_JAVASTYLE)
66# if !defined (HPP_ALIB_LANG_FORMAT_BYTESIZE)
69# if !defined (HPP_ALIB_CAMP_ENVIRONMENT)
75# if !defined (HPP_ALIB_CONFIG_CONFIG)
78# if !defined (HPP_ALIB_CONFIG_INI_FILE)
81# if !defined (HPP_ALIB_CONFIG_VARIABLE)
84# if !defined (HPP_ALIB_CONFIG_CONFIGURATION)
90# if !defined (HPP_ALIB_ALOXMODULE)
95# if !defined (HPP_ALIB_CLI_CLI)
100# if !defined (HPP_ALIB_EXPRESSIONS_EXPRESSIONS)
105# if !defined (HPP_ALIB_FILES_CAMP)
110# if !defined (HPP_AWORX_ALIB_BITBUFFER_ARRAY_COMPRESSOR)
115#if !defined (HPP_ALIB_COMPATIBILITY_STD_STRINGS_IOSTREAM)
118# if !defined (HPP_ALIB_LANG_CAMP_INLINES)
122# if !defined (HPP_ALIB_LANG_CAMP_INLINES)
153#if !defined(ALIB_DOX)
175 int type,
const char* topic,
int qtyMsgs,
const nchar** msgs)
178 for (
int i= 0; i< qtyMsgs; ++i )
179 message.
Add( msgs[i] );
184#if !defined(ALIB_DOX)
199#if !defined(ALIB_DOX)
222 NSecSingular, SIZE_OF_UNITS
225 String units[SIZE_OF_UNITS];
234, LocaleFound(nullptr)
237 "Instances of class BaseCamp must not be created. Use singleton alib::BASECAMP" )
256#if !ALIB_RESOURCES_OMIT_DEFAULTS
261 "Alignment",
A_CHAR(
"0" "," "Left" "," "1" ","
262 "1" "," "Right" "," "1" ","
263 "2" "," "Center" "," "1" ),
265 "Bool",
A_CHAR(
"0" "," "False" "," "1" ","
266 "1" "," "True" "," "1" ","
267 "0" "," "0" "," "1" ","
268 "1" "," "1" "," "1" ","
269 "0" "," "No" "," "1" ","
270 "1" "," "Yes" "," "1" ","
271 "0" "," "Off" "," "2" ","
272 "1" "," "On" "," "2" ","
273 "0" "," "-" "," "1" ","
274 "1" "," "Ok" "," "2" ),
276 "Caching",
A_CHAR(
"0" "," "Disabled" "," "1" ","
277 "1" "," "Enabled" "," "1" ","
278 "1" "," "Auto" "," "1" ),
280 "Case",
A_CHAR(
"0" "," "Sensitive" "," "1" ","
281 "1" "," "Ignore" "," "1" ),
283 "ContainerOp",
A_CHAR(
"0" "," "Insert" "," "1" ","
284 "1" "," "Remove" "," "1" ","
285 "3" "," "GetCreate" "," "4" ","
286 "2" "," "Get" "," "1" ","
287 "4" "," "Create" "," "1" ),
292 "CurrentData",
A_CHAR(
"0" "," "Keep" "," "1" ","
293 "1" "," "Clear" "," "1" ),
295 "Inclusion",
A_CHAR(
"0" "," "Include" "," "1" ","
296 "1" "," "Exclude" "," "1" ),
298 "Initialization",
A_CHAR(
"0" "," "DontInitialize" "," "1" ","
299 "1" "," "Initialize" "," "1" ","
300 "0" "," "Suppress" "," "1" ","
301 "1" "," "Perform" "," "1" ),
303 "Phase",
A_CHAR(
"0" "," "Begin" "," "1" ","
304 "1" "," "End" "," "1" ),
306 "Propagation",
A_CHAR(
"0" "," "Omit" "," "1" ","
307 "1" "," "ToDescendants" "," "1" ),
309 "Reach",
A_CHAR(
"0" "," "Global" "," "1" ","
310 "1" "," "Local" "," "1" ),
314 "Responsibility",
A_CHAR(
"0" "," "KeepWithSender" "," "1" ","
315 "1" "," "Transfer" "," "1" ),
317 "Safeness",
A_CHAR(
"0" "," "Safe" "," "1" ","
318 "1" "," "Unsafe" "," "1" ),
320 "Side",
A_CHAR(
"0" "," "Left" "," "1" ","
321 "1" "," "Right" "," "1" ),
323 "SortOrder",
A_CHAR(
"0" "," "Ascending" "," "1" ","
324 "1" "," "Descending" "," "1" ),
326 "SourceData",
A_CHAR(
"0" "," "Copy" "," "1" ","
327 "1" "," "Move" "," "1" ),
329 "Switch",
A_CHAR(
"0" "," "Off" "," "2" ","
330 "1" "," "On" "," "2" ),
332 "Timezone",
A_CHAR(
"0" "," "Local" "," "1" ","
333 "1" "," "UTC" "," "1" ),
335 "Timing",
A_CHAR(
"0" "," "Async" "," "1" ","
336 "1" "," "Sync" "," "1" ","
337 "0" "," "Asynchronous" "," "1" ","
338 "1" "," "Synchronous" "," "1" ","
339 "1" "," "Synchronized" "," "1" ),
341 "ValueReference",
A_CHAR(
"0" "," "Absolute" "," "1" ","
342 "1" "," "Relative" "," "1" ),
344 "Whitespaces",
A_CHAR(
"0" "," "Trim" "," "1" ","
345 "1" "," "Keep" "," "1" ),
349 "TSts",
A_CHAR(
"0" "," "Unstarted" "," "1" ","
350 "1" "," "Started" "," "3" ","
351 "2" "," "Running" "," "1" ","
352 "3" "," "Stopped" "," "3" ","
353 "4" "," "Terminated" "," "1" ),
359 "Var0",
A_CHAR(
"1|ALIB|LOCALE|||"),
360 "Var1",
A_CHAR(
"2|ALIB|WAIT_FOR_KEY_PRESS|||"),
361 "Var2",
A_CHAR(
"3|ALIB|HAS_CONSOLE_WINDOW|||"),
364 "Var_C1",
A_CHAR(
"Defines the locale of the application. If empty or not set, the system's locale is used."),
365 "Var_C2",
A_CHAR(
"If true, the process waits for a key stroke on termination. If empty, under Windows" "\n"
366 "behavior is detected, under other OSes, defaults to false." ),
367 "Var_C3",
A_CHAR(
"Boolean value that denotes what its name indicates. If empty, under Windows value is " "\n"
368 "detected, under other OSes, defaults to true." ),
377 "INI_CMT_ALIB",
A_CHAR(
"@>'/// '@HL-General ALib library settings.\n@HL-"),
380 "EXIT_MSG" ,
A_CHAR(
"ALIB: Press 'Enter' to exit..." ),
383 "ACAlgos" ,
A_CHAR(
"0" ",NONE" "," "1" ","
384 "31" ",ALL" "," "1" ","
385 "1" ",Uncompressed" "," "1" ","
386 "2" ",MinMax" "," "1" ","
387 "4" ",Sparse" "," "1" ","
388 "8" ",VerySparse" "," "1" ","
389 "16" ",Incremental" "," "1" ","
390 "32" ",Huffman" "," "1" ),
394 "Months" ,
A_CHAR(
"January,February,March,April,May,June,July,August,September,October,November,December")
395 ,
"Days" ,
A_CHAR(
"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,") EOS
397 "DurUnts" ,
A_CHAR(
"zero time" ","
413 "DFMT",
A_CHAR(
"yyyy-MM-dd HH:mm:ss"),
417 "E",
A_CHAR(
"0,OK" ",NON" ) EOS
420 "SpecialFolder",
A_CHAR(
"0,Root" ",1,"
426 "6,VarTemp" ",1" ) EOS
429 #
if defined (__GLIBC__) || defined(__APPLE__)
430 "SE<" ,
A_CHAR(
"glibc::" ),
431 "OSERR" ,
A_CHAR(
"GNU-C Library call returned {!Q} ({})."),
432 "UknSE" ,
A_CHAR(
"GNU-C Library call returned ({}). (Unknown error number)"),
433 #elif defined(_WIN32)
434 "SE<" ,
A_CHAR(
"WindowsOS::" ),
435 "OSERR" ,
A_CHAR(
"Windows system call returned {!Q} ({})."),
436 "UknSE" ,
A_CHAR(
"Windows system call returned ({}). (Unknown error number)"),
440 A_CHAR(
"-1" "," "UNKNOWN" "," "UknSE" "," )
441 A_CHAR(
"0" "," "OK" "," "," )
443#
if defined (__GLIBC__) || defined(__APPLE__) || defined(__ANDROID_NDK__)
444 A_CHAR(
"1" "," "EPERM" "," "OSERR" ","
445 "2" "," "ENOENT" "," "OSERR" ","
446 "3" "," "ESRCH" "," "OSERR" ","
447 "4" "," "EINTR" "," "OSERR" ","
448 "5" "," "EIO" "," "OSERR" ","
449 "6" "," "ENXIO" "," "OSERR" ","
450 "7" "," "E2BIG" "," "OSERR" ","
451 "8" "," "ENOEXEC" "," "OSERR" ","
452 "9" "," "EBADF" "," "OSERR" ","
453 "10" "," "ECHILD" "," "OSERR" ","
454 "11" "," "EAGAIN" "," "OSERR" ","
455 "12" "," "ENOMEM" "," "OSERR" ","
456 "13" "," "EACCES" "," "OSERR" ","
457 "14" "," "EFAULT" "," "OSERR" ","
458 "15" "," "ENOTBLK" "," "OSERR" ","
459 "16" "," "EBUSY" "," "OSERR" ","
460 "17" "," "EEXIST" "," "OSERR" ","
461 "18" "," "EXDEV" "," "OSERR" ","
462 "19" "," "ENODEV" "," "OSERR" ","
463 "20" "," "ENOTDIR" "," "OSERR" ","
464 "21" "," "EISDIR" "," "OSERR" ","
465 "22" "," "EINVAL" "," "OSERR" ","
466 "23" "," "ENFILE" "," "OSERR" ","
467 "24" "," "EMFILE" "," "OSERR" ","
468 "25" "," "ENOTTY" "," "OSERR" ","
469 "26" "," "ETXTBSY" "," "OSERR" ","
470 "27" "," "EFBIG" "," "OSERR" ","
471 "28" "," "ENOSPC" "," "OSERR" ","
472 "29" "," "ESPIPE" "," "OSERR" ","
473 "30" "," "EROFS" "," "OSERR" ","
474 "31" "," "EMLINK" "," "OSERR" ","
475 "32" "," "EPIPE" "," "OSERR" ","
476 "33" "," "EDOM" "," "OSERR" ","
477 "34" "," "ERANGE" "," "OSERR" ","
478 "35" "," "EDEADLK" "," "OSERR" ","
479 "36" "," "ENAMETOOLONG" "," "OSERR" ","
480 "37" "," "ENOLCK" "," "OSERR" ","
481 "38" "," "ENOSYS" "," "OSERR" ","
482 "39" "," "ENOTEMPTY" "," "OSERR" ","
483 "40" "," "ELOOP" "," "OSERR" ","
484 "42" "," "ENOMSG" "," "OSERR" ","
485 "43" "," "EIDRM" "," "OSERR" "," )
486#
if !defined(__APPLE__)
487 A_CHAR(
"44" "," "ECHRNG" "," "OSERR" ","
488 "45" "," "EL2NSYNC" "," "OSERR" ","
489 "46" "," "EL3HLT" "," "OSERR" ","
490 "47" "," "EL3RST" "," "OSERR" ","
491 "48" "," "ELNRNG" "," "OSERR" ","
492 "49" "," "EUNATCH" "," "OSERR" ","
493 "50" "," "ENOCSI" "," "OSERR" ","
494 "51" "," "EL2HLT" "," "OSERR" ","
495 "52" "," "EBADE" "," "OSERR" ","
496 "53" "," "EBADR" "," "OSERR" ","
497 "54" "," "EXFULL" "," "OSERR" ","
498 "55" "," "ENOANO" "," "OSERR" ","
499 "56" "," "EBADRQC" "," "OSERR" ","
500 "57" "," "EBADSLT" "," "OSERR" ","
501 "59" "," "EBFONT" "," "OSERR" ",")
503 A_CHAR(
"60" "," "ENOSTR" "," "OSERR" ","
504 "61" "," "ENODATA" "," "OSERR" ","
505 "62" "," "ETIME" "," "OSERR" ","
506 "63" "," "ENOSR" "," "OSERR" ",")
507#
if !defined(__APPLE__)
508 A_CHAR(
"64" "," "ENONET" "," "OSERR" ","
509 "65" "," "ENOPKG" "," "OSERR" ",")
511 A_CHAR(
"66" "," "EREMOTE" "," "OSERR" ","
512 "67" "," "ENOLINK" "," "OSERR" ",")
513#
if !defined(__APPLE__)
514 A_CHAR(
"68" "," "EADV" "," "OSERR" ","
515 "69" "," "ESRMNT" "," "OSERR" ","
516 "70" "," "ECOMM" "," "OSERR" ",")
518 A_CHAR(
"71" "," "EPROTO" "," "OSERR" ","
519 "72" "," "EMULTIHOP" "," "OSERR" ",")
520#
if !defined(__APPLE__)
521 A_CHAR(
"73" "," "EDOTDOT" "," "OSERR" ",")
523 A_CHAR(
"74" "," "EBADMSG" "," "OSERR" ","
524 "75" "," "EOVERFLOW" "," "OSERR" ",")
525#
if !defined(__APPLE__)
526 A_CHAR(
"76" "," "ENOTUNIQ" "," "OSERR" ","
527 "77" "," "EBADFD" "," "OSERR" ","
528 "78" "," "EREMCHG" "," "OSERR" ","
529 "79" "," "ELIBACC" "," "OSERR" ","
530 "80" "," "ELIBBAD" "," "OSERR" ","
531 "81" "," "ELIBSCN" "," "OSERR" ","
532 "82" "," "ELIBMAX" "," "OSERR" ","
533 "83" "," "ELIBEXEC" "," "OSERR" ",")
535 A_CHAR(
"84" "," "EILSEQ" "," "OSERR" ",")
536#
if !defined(__APPLE__)
537 A_CHAR(
"85" "," "ERESTART" "," "OSERR" ","
538 "86" "," "ESTRPIPE" "," "OSERR" ",")
540 A_CHAR(
"87" "," "EUSERS" "," "OSERR" ","
541 "88" "," "ENOTSOCK" "," "OSERR" ","
542 "89" "," "EDESTADDRREQ" "," "OSERR" ","
543 "90" "," "EMSGSIZE" "," "OSERR" ","
544 "91" "," "EPROTOTYPE" "," "OSERR" ","
545 "92" "," "ENOPROTOOPT" "," "OSERR" ","
546 "93" "," "EPROTONOSUPPORT" "," "OSERR" ","
547 "94" "," "ESOCKTNOSUPPORT" "," "OSERR" ","
548 "95" "," "EOPNOTSUPP" "," "OSERR" ","
549 "96" "," "EPFNOSUPPORT" "," "OSERR" ","
550 "97" "," "EAFNOSUPPORT" "," "OSERR" ","
551 "98" "," "EADDRINUSE" "," "OSERR" ","
552 "99" "," "EADDRNOTAVAIL" "," "OSERR" ","
553 "100" "," "ENETDOWN" "," "OSERR" ","
554 "101" "," "ENETUNREACH" "," "OSERR" ","
555 "102" "," "ENETRESET" "," "OSERR" ","
556 "103" "," "ECONNABORTED" "," "OSERR" ","
557 "104" "," "ECONNRESET" "," "OSERR" ","
558 "105" "," "ENOBUFS" "," "OSERR" ","
559 "106" "," "EISCONN" "," "OSERR" ","
560 "107" "," "ENOTCONN" "," "OSERR" ","
561 "108" "," "ESHUTDOWN" "," "OSERR" ","
562 "109" "," "ETOOMANYREFS" "," "OSERR" ","
563 "110" "," "ETIMEDOUT" "," "OSERR" ","
564 "111" "," "ECONNREFUSED" "," "OSERR" ","
565 "112" "," "EHOSTDOWN" "," "OSERR" ","
566 "113" "," "EHOSTUNREACH" "," "OSERR" ","
567 "114" "," "EALREADY" "," "OSERR" ","
568 "115" "," "EINPROGRESS" "," "OSERR" ","
569 "116" "," "ESTALE" "," "OSERR" "," )
570#
if !defined(__APPLE__)
571 A_CHAR(
"117" "," "EUCLEAN" "," "OSERR" ","
572 "118" "," "ENOTNAM" "," "OSERR" ","
573 "119" "," "ENAVAIL" "," "OSERR" ","
574 "120" "," "EISNAM" "," "OSERR" ","
575 "121" "," "EREMOTEIO" "," "OSERR" "," )
577 A_CHAR(
"122" "," "EDQUOT" "," "OSERR" "," )
578#
if !defined(__APPLE__)
579 A_CHAR(
"123" "," "ENOMEDIUM" "," "OSERR" ","
580 "124" "," "EMEDIUMTYPE" "," "OSERR" "," )
582 A_CHAR(
"125" "," "ECANCELED" "," "OSERR" "," )
583#
if !defined(__APPLE__)
584 A_CHAR(
"126" "," "ENOKEY" "," "OSERR" ","
585 "127" "," "EKEYEXPIRED" "," "OSERR" ","
586 "128" "," "EKEYREVOKED" "," "OSERR" ","
587 "129" "," "EKEYREJECTED" "," "OSERR" "," )
589 A_CHAR(
"130" "," "EOWNERDEAD" "," "OSERR" ","
590 "131" "," "ENOTRECOVERABLE" "," "OSERR" )
591#
if !defined(__APPLE__)
593 "132" "," "ERFKILL" "," "OSERR" ","
594 "133" "," "EHWPOISON" "," "OSERR" )
599 A_CHAR(
"1" "," "EPERM" "," "OSERR" ","
600 "2" "," "ENOENT" "," "OSERR" ","
601 "3" "," "ESRCH" "," "OSERR" ","
602 "4" "," "EINTR" "," "OSERR" ","
603 "5" "," "EIO" "," "OSERR" ","
604 "6" "," "ENXIO" "," "OSERR" ","
605 "7" "," "E2BIG" "," "OSERR" ","
606 "8" "," "ENOEXEC" "," "OSERR" ","
607 "9" "," "EBADF" "," "OSERR" ","
608 "10" "," "ECHILD" "," "OSERR" ","
609 "11" "," "EAGAIN" "," "OSERR" ","
610 "12" "," "ENOMEM" "," "OSERR" ","
611 "13" "," "EACCES" "," "OSERR" ","
612 "14" "," "EFAULT" "," "OSERR" ","
613 "16" "," "EBUSY" "," "OSERR" ","
614 "17" "," "EEXIST" "," "OSERR" ","
615 "18" "," "EXDEV" "," "OSERR" ","
616 "19" "," "ENODEV" "," "OSERR" ","
617 "20" "," "ENOTDIR" "," "OSERR" ","
618 "21" "," "EISDIR" "," "OSERR" ","
619 "23" "," "ENFILE" "," "OSERR" ","
620 "24" "," "EMFILE" "," "OSERR" ","
621 "25" "," "ENOTTY" "," "OSERR" ","
622 "27" "," "EFBIG" "," "OSERR" ","
623 "28" "," "ENOSPC" "," "OSERR" ","
624 "29" "," "ESPIPE" "," "OSERR" ","
625 "30" "," "EROFS" "," "OSERR" ","
626 "31" "," "EMLINK" "," "OSERR" ","
627 "32" "," "EPIPE" "," "OSERR" ","
628 "33" "," "EDOM" "," "OSERR" ","
629 "36" "," "EDEADLK" "," "OSERR" ","
630 "38" "," "ENAMETOOLONG" "," "OSERR" ","
631 "39" "," "ENOLCK" "," "OSERR" ","
632 "40" "," "ENOSYS" "," "OSERR" ","
633 "41" "," "ENOTEMPTY" "," "OSERR" ","
634 "22" "," "EINVAL" "," "OSERR" ","
635 "34" "," "ERANGE" "," "OSERR" ","
636 "42" "," "EILSEQ" "," "OSERR" ","
637 "80" "," "STRUNCATE" "," "OSERR" ","
638 "100" "," "EADDRINUSE" "," "OSERR" ","
639 "101" "," "EADDRNOTAVAIL" "," "OSERR" ","
640 "102" "," "EAFNOSUPPORT" "," "OSERR" ","
641 "103" "," "EALREADY" "," "OSERR" ","
642 "104" "," "EBADMSG" "," "OSERR" ","
643 "105" "," "ECANCELED" "," "OSERR" ","
644 "106" "," "ECONNABORTED" "," "OSERR" ","
645 "107" "," "ECONNREFUSED" "," "OSERR" ","
646 "108" "," "ECONNRESET" "," "OSERR" ","
647 "109" "," "EDESTADDRREQ" "," "OSERR" ","
648 "110" "," "EHOSTUNREACH" "," "OSERR" ","
649 "111" "," "EIDRM" "," "OSERR" ","
650 "112" "," "EINPROGRESS" "," "OSERR" ","
651 "113" "," "EISCONN" "," "OSERR" ","
652 "114" "," "ELOOP" "," "OSERR" ","
653 "115" "," "EMSGSIZE" "," "OSERR" ","
654 "116" "," "ENETDOWN" "," "OSERR" ","
655 "117" "," "ENETRESET" "," "OSERR" ","
656 "118" "," "ENETUNREACH" "," "OSERR" ","
657 "119" "," "ENOBUFS" "," "OSERR" ","
658 "120" "," "ENODATA" "," "OSERR" ","
659 "121" "," "ENOLINK" "," "OSERR" ","
660 "122" "," "ENOMSG" "," "OSERR" ","
661 "123" "," "ENOPROTOOPT" "," "OSERR" ","
662 "124" "," "ENOSR" "," "OSERR" ","
663 "125" "," "ENOSTR" "," "OSERR" ","
664 "126" "," "ENOTCONN" "," "OSERR" ","
665 "127" "," "ENOTRECOVERABLE" "," "OSERR" ","
666 "128" "," "ENOTSOCK" "," "OSERR" ","
667 "129" "," "ENOTSUP" "," "OSERR" ","
668 "130" "," "EOPNOTSUPP" "," "OSERR" ","
669 "131" "," "EOTHER" "," "OSERR" ","
670 "132" "," "EOVERFLOW" "," "OSERR" ","
671 "133" "," "EOWNERDEAD" "," "OSERR" ","
672 "134" "," "EPROTO" "," "OSERR" ","
673 "135" "," "EPROTONOSUPPORT" "," "OSERR" ","
674 "136" "," "EPROTOTYPE" "," "OSERR" ","
675 "137" "," "ETIME" "," "OSERR" ","
676 "138" "," "ETIMEDOUT" "," "OSERR" ","
677 "139" "," "ETXTBSY" "," "OSERR" ","
678 "140" "," "EWOULDBLOCK" "," "OSERR" ) EOS
682 "REPE<" ,
A_CHAR(
"lang::") ,
683 "REPE" ,
A_CHAR(
"1,ErrorWritingReport,REPED1") ,
685 "REPED1",
A_CHAR(
"Error writing ALib report."),
687 "ExcFmtExc",
A_CHAR(
"\nAn exception occurred while formatting another (!) exception:\n" ),
688 "RepFmtExc",
A_CHAR(
"\nAn exception occurred while formatting an ALib report (!):\n" ),
691 "FE<",
A_CHAR(
"format::"),
695 "FE0" ,
A_CHAR(
"11,ArgumentIndexIs0" ",FMG11" ),
696 "FE1" ,
A_CHAR(
"12,ArgumentIndexOutOfBounds" ",FMG12" ),
697 "FE2" ,
A_CHAR(
"13,IncompatibleTypeCode" ",FMG13" ),
700 "FE3" ,
A_CHAR(
"101,MissingClosingBracket" ",FPS101" ),
703 "FE4" ,
A_CHAR(
"102,MissingPrecisionValuePS" ",FPS102" ),
704 "FE5" ,
A_CHAR(
"103,DuplicateTypeCode" ",FPS103" ),
705 "FE6" ,
A_CHAR(
"104,UnknownTypeCode" ",FPS104" ),
706 "FE7" ,
A_CHAR(
"105,ExclamationMarkExpected" ",FPS105" ),
707 "FE8" ,
A_CHAR(
"106,UnknownConversionPS" ",FPS106" ),
708 "FE9" ,
A_CHAR(
"107,PrecisionSpecificationWithInteger" ",FPS107" ),
709 "FE10",
A_CHAR(
"108,MissingReplacementStrings" ",FPS108" ),
712 "FE11" ,
A_CHAR(
"201,NegativeValuesInBracketsNotSupported" ",FJS101" ),
713 "FE12" ,
A_CHAR(
"202,MissingPrecisionValueJS" ",FJS102" ),
714 "FE13" ,
A_CHAR(
"203,HexadecimalFloatFormatNotSupported" ",FJS103" ),
715 "FE14" ,
A_CHAR(
"204,NoAlternateFormOfConversion" ",FJS104" ),
716 "FE15" ,
A_CHAR(
"205,NoPrecisionWithConversion" ",FJS105" ),
717 "FE16" ,
A_CHAR(
"206,UnknownDateTimeConversionSuffix" ",FJS106" ),
718 "FE17" ,
A_CHAR(
"207,UnknownConversionJS" ",FJS107" ),
721 "FE18" ,
A_CHAR(
"501,UnknownPropertyInFormatString" ",PFM501" ),
722 "FE19" ,
A_CHAR(
"502,ErrorInResultingFormatString" ",PFM502" ),
723 "FE20" ,
A_CHAR(
"510,MissingConfigurationVariable" ",PFM510" ),
726 "FE21" ,
A_CHAR(
"601,UnknownMarker" ",ST601" ),
727 "FE22" ,
A_CHAR(
"602,EndmarkerWithoutStart" ",ST602" ),
730 "FMG11" ,
A_CHAR(
"Argument index 0 not allowed.\n"
731 "In: {!Q}\n {!Fill}^" ),
732 "FMG12" ,
A_CHAR(
"Argument index #{} is out of bounds. {} arguments are available.\n"
733 "In: {!Q}\n {!Fill}^" ),
734 "FMG13" ,
A_CHAR(
"Incompatible type code {!Q'} for argument #{} which is of type {!Q}.\n"
735 "In: {!Q}\n {!Fill}^" ),
738 "FPS101" ,
A_CHAR(
"Closing bracket '}}' of placeholder not found (or syntax error).\n"
739 "In: {!Q}\n {!Fill}^" ),
743 "FPS102" ,
A_CHAR(
"Missing precision value after '.' character."
744 "\nIn: {!Q}\n {!Fill}^" ),
745 "FPS103" ,
A_CHAR(
"Duplicate type code {!Q'} given (previous was {!Q'})."
746 "\nIn: {!Q}\n {!Fill}^" ),
747 "FPS104" ,
A_CHAR(
"Unknown type code {!Q'} given."
748 "\nIn: {!Q}\n {!Fill}^" ),
749 "FPS105" ,
A_CHAR(
"Expected '!' in continuation of placeholder."
750 "\nIn: {!Q}\n {!Fill}^" ),
751 "FPS106" ,
A_CHAR(
"Unknown conversion \"!{}\"."
752 "\nIn: {!Q}\n {!Fill}^" ),
753 "FPS107" ,
A_CHAR(
"Precision not allowed with integer format."
754 "\nIn: {!Q}\n {!Fill}^" ),
755 "FPS108" ,
A_CHAR(
"Missing pair of replacement strings \")<src><repl>\" after \"!Replace\"."
756 "\nIn: {!Q}\n {!Fill}^" ),
760 "FJS101" ,
A_CHAR(
"Brackets for negative values not implemented/supported."
761 "\nIn: {!Q}\n {!Fill}^" ),
762 "FJS102" ,
A_CHAR(
"Missing precision value after '.' character."
763 "\nIn: {!Q}\n {!Fill}^" ),
764 "FJS103" ,
A_CHAR(
"Hexadecimal float format not implemented/supported."
765 "\nIn: {!Q}\n {!Fill}^" ),
766 "FJS104" ,
A_CHAR(
"Alternate form '#' not supported with conversion {!Q}."
767 "\nIn: {!Q}\n {!Fill}^" ),
768 "FJS105" ,
A_CHAR(
"Precision specification (\".{}\") is not supported with conversion {!Q}."
769 "\nIn: {!Q}\n {!Fill}^" ),
770 "FJS106" ,
A_CHAR(
"Unknown date/time conversion suffix {!Q'}."
771 "\nIn: {!Q}\n {!Fill}^" ),
772 "FJS107" ,
A_CHAR(
"Unknown conversion character {!Q'}."
773 "\nIn: {!Q}\n {!Fill}^" ),
777 "PFM501" ,
A_CHAR(
"Unknown property identifier \"{}{}\" in format string.\n"
778 "Format string: {!Q}.\n"
779 "Allowed identifiers: " ),
780 "PFM502" ,
A_CHAR(
"Error in resulting format string.\nSource format: {!Q}." ),
781 "PFM510" ,
A_CHAR(
"Missing or empty configuration variable {!Q} containing user defined format string." ),
784 "ST601" ,
A_CHAR(
"Unknown marker at position {}.\n"
785 " Marked text: {!Q}.\n"
787 "ST602" ,
A_CHAR(
"Found an end-marker without a start marker at position {}.\n"
788 " Marked text: {!Q}.\n"
843 #if ALIB_BITBUFFER && ALIB_BOXING && ALIB_ENUMS
855DOX_MARKER( [DOX_ALIB_ENUMS_MAKE_PARSABLE_22] )
857DOX_MARKER( [DOX_ALIB_ENUMS_MAKE_PARSABLE_22] )
895 parser=
GetResource(
"Months" );
for(
int i= 0 ; i < 12 ; ++i ) { months[i]= parser.ConsumeToken(
','); }
896 parser=
GetResource(
"Days" );
for(
int i= 0 ; i < 7 ; ++i ) { days[i]= parser.ConsumeToken(
','); }
899 for(
int i= 0 ; i < Units::SIZE_OF_UNITS ; ++i )
900 units[i]= parser.ConsumeToken(
',');
902 ALIB_ASSERT( units[Units::SIZE_OF_UNITS-1].IsNotEmpty() )
914 #if ALIB_CONFIGURATION
916 if (
config->
Load( variable ) != Priorities::NONE
917 && variable.GetString().IsNotEmpty() )
920 locale.
_( variable.GetString() );
931 if( !setlocale(LC_ALL, nLocale ) )
933 NString256 msg(
"ALib Error: setlocale(\""); msg << nLocale <<
"\") failed. Setting read from ";
934 msg << ( receivedFrom == 1 ?
"config variable 'ALIB_LOCALE'" :
935 receivedFrom == 2 ?
"environment variable 'LANG'" :
936 receivedFrom == 3 ?
"environment variable 'LANGUAGE'" :
"ERROR" );
940 std::cerr <<
". Trying 'setlocale(LC_ALL, \"\")': ";
941 if ( setlocale(LC_ALL,
"" ) )
942 std::cerr <<
" success.";
945 std::cerr <<
"failed. Trying 'setlocale(LC_ALL, \"C\")': ";
946 if ( setlocale(LC_ALL,
"C" ) )
947 std::cerr <<
" success.";
949 std::cerr << std::endl <<
" Panic: No standard locale setting was successful!";
951 std::cerr << std::endl;
965 #if ALIB_CONFIGURATION
968 if ( variable.Size() > 0 )
972 #if defined(_WIN32) && ALIB_DEBUG
981 #if defined(_WIN32) && ALIB_DEBUG
992 #if ALIB_CONFIGURATION
995 if ( variable.Size() > 0 && variable.GetString().Length() > 0 )
1014 #if ALIB_CONFIGURATION
1026 OutputDebugStringA(
"\r\nALIB: Waiting for 'Enter' key in the console window.\r\n" );
1029 std::cout << std::endl <<
GetResource(
"EXIT_MSG") << std::endl;
1030 while ( getchar() !=
'\n' )
1036 "ALIB",
"DefaultFormatter still shared more than once: ",
1058 #if defined(__unix__) || defined(__APPLE__)
1060 String DebuggerProcessNames=
A_CHAR(
"gdb|debugserver");
1067 #if defined(__unix__) || defined(__APPLE__)
1072 if ( parentPID == 0 )
1076 Tokenizer tknzr( DebuggerProcessNames,
'|' );
1085 #elif defined(_WIN32)
1090 #pragma message ("Unknown Platform in file: " __FILE__ )
1103 if( enumRecord ==
nullptr )
1104 return Exception( file, line, func, SystemErrors::UNKNOWN, errNo );
1150 ALIB_WARNING(
"ALIB",
"Format Error: Missing single Quote" )
1151 target <<
"Format Error: Missing single Quote" ;
1155 target.
_<
false>( format, 0, end );
1171 target.
_<
false>(
Hour < 12 ?
" am" :
" pm" );
1181 else if ( n == 3 ) target.
_<
false>( days[
DayOfWeek], 0, 3 );
1187 else if ( n == 3 ) target.
_<
false>( months[
Month-1], 0, 3 );
1188 else target.
_<
false>( months[
Month-1] );
1213#if !defined(ALIB_DOX)
1214DOX_MARKER([DOX_ALIB_BOXING_IFORMAT_DATETIME])
1218 tct.Format( formatSpec.
IsNotEmpty() ? formatSpec
1222DOX_MARKER([DOX_ALIB_BOXING_IFORMAT_DATETIME])
1230#if !defined(ALIB_DOX)
1236using namespace lang;
1240 template<
typename TChar>
1241 void appendDateTime(TAString<TChar>& target,
const DateTime::Duration pSrc)
1244 using Duration= DateTime::Duration;
1246 auto nanos= src.InNanoseconds();
1249 target << units[Units::TS_ZERO];
1256 src= Duration() - src;
1260 nf.FractionalPartWidth= 2;
1261 int64_t v= src.InAbsoluteDays();
1264 target << TFormat<TChar>( src.InDays(), &nf ) << units[Units::DayPlural];
1270 target << v << ( v != 1 ? units[Units::DayPlural]
1271 : units[Units::DaySingular] );
1273 Duration cpy= src - ( Duration::FromAbsoluteDays(v) );
1275 target << ' ' << TFormat<TChar>( cpy.InHours(), &nf ) << units[Units::HourPlural];
1279 v= src.InAbsoluteHours();
1282 target << v << ( v != 1 ? units[Units::HourPlural]
1283 : units[Units::HourSingular] );
1285 Duration cpy= src - ( Duration::FromAbsoluteHours(v) );
1287 auto minutes= cpy.InAbsoluteMinutes();
1288 target <<
' ' << minutes << (minutes!= 1 ? units[Units::MinPlural]
1289 : units[Units::MinSingular] );
1293 v= src.InAbsoluteMinutes();
1296 target << v << ( v != 1 ? units[Units::MinPlural]
1297 : units[Units::MinSingular] );
1299 Duration cpy= src - ( Duration::FromAbsoluteMinutes(v) );
1301 auto seconds= cpy.InAbsoluteSeconds();
1302 target <<
' ' << seconds << (seconds!= 1 ? units[Units::SecPlural]
1303 : units[Units::SecSingular] );
1307 v= src.InAbsoluteSeconds();
1310 target << TFormat<TChar>( src.InSeconds(), &nf ) << units[Units::SecPlural];
1314 nf.DecMinimumFieldWidth= 3;
1316 auto val= src.InAbsoluteMilliseconds();
1319 target << TFormat<TChar>(val,&nf) << ( val!= 1 ? units[Units::MlSecPlural]
1320 : units[Units::MlSecSingular] );
1324 val= src.InAbsoluteMicroseconds();
1327 target << TFormat<TChar>(val,&nf) << ( val!= 1 ? units[Units::McSecPlural]
1328 : units[Units::McSecSingular] );
1332 val= src.InNanoseconds();
1333 target << TFormat<TChar>(val,&nf) << ( val!= 1 ? units[Units::NSecPlural]
1334 : units[Units::NSecSingular] );
1341template<
typename TChar>
1344 appendDateTime( target, src );
1347template<
typename TChar>
1351 appendDateTime( target, time::DateTime::Duration::FromNanoseconds( src.InNanoseconds() ));
1369#if !defined(ALIB_DOX)
1375 double v= double(val);
1378 if( unit < ByteSizeUnits::IEC_END)
1381 divisor= double(1024);
1385 loopEnd= int(unit) - ByteSizeUnits::SI;
1386 divisor= double(1000);
1389 for (
int i = 0; i < loopEnd; ++i)
1398 if( val < byteLimit )
1404 if( val < byteLimit * factor)
1405 return std::make_pair(
double(val) /
double(factor), unit );
1418 auto magnitude= (unit == ByteSizeUnits::IEC) ? getMagnitude(val, magnitudeThreshold, 1024ull)
1419 : getMagnitude(val, magnitudeThreshold, 1000ull);
1421 if( magnitude.second == 0 )
1422 target <<
Format( val,
nullptr );
1428 target << unitSeparator;
1429 target << (magnitude.second + unit);
1435 result.second+= ByteSizeUnits::IEC;
1442 result.second+= ByteSizeUnits::SI;
1447double ByteSizeSI ::ConvertTo(
ByteSizeUnits unit) {
return convertTo(Value, unit); };
const TUnboxable Unbox() const
ALIB_API Priorities Load(Variable &variable)
static ALIB_API void AddResourcedSectionComments(Configuration &config, ResourcePool &resourcePool, const NString &resourceCategory, const NString &resourceNamePrefix)
resources::ResourcePool & GetResourcePool()
NCString ResourceCategory
lang::resources::ResourcePool * resourcePool
config::Configuration & GetConfig()
config::Configuration * config
const String & GetResource(const NString &name)
ALIB_API void DoReport(Message &message)
static ALIB_API Report * defaultReport
static Report & GetDefault()
virtual ALIB_API void bootstrap(BootstrapPhases phase) override
virtual ALIB_API void shutdown(ShutdownPhases phase) override
ALIB_API bool IsDebuggerPresent()
bool WaitForKeyPressOnTermination
virtual void BootstrapBulk(const nchar *category,...)=0
ALIB_API AString & Format(Substring format, AString &target, lang::CurrentData targetData=lang::CurrentData::Keep) const
static ALIB_API const ProcessInfo & Current()
ALIB_FORCE_INLINE T * Emplace(TArgs &&... args)
strings::TString< TChar > EmplaceString(const strings::TString< TChar > &src)
static TDerivedClass * singleton
TAString & InsertChars(TChar c, integer qty)
TAString & _(const TString< TChar > &src, integer regionStart, integer regionLength=MAX_LEN)
void EnsureRemainingCapacity(integer spaceNeeded)
void SetLength(integer newLength)
integer IndexOf(TChar needle, integer startIdx=0) const
constexpr bool IsNotEmpty() const
constexpr integer Length() const
bool StartsWith(const TString &needle) const
constexpr const TChar * Buffer() const
integer ConsumeChars(integer regionLength, TSubstring *target=nullptr)
ALIB_API TSubstring< TChar > & Next(lang::Whitespaces trimming=lang::Whitespaces::Trim, TChar newDelim='\0')
#define ALIB_IF_CONFIGURATION(...)
#define ALIB_WARNING(...)
#define ALIB_IF_BITBUFFER(...)
#define ALIB_BOXING_VTABLE_DEFINE(TMapped, Identifier)
#define ALIB_IF_THREADS(...)
#define ALIB_WARNINGS_RESTORE
#define ALIB_STRINGS_TO_NARROW( src, dest, bufSize)
#define ALIB_BOXING_BOOTSTRAP_REGISTER_FAPPEND_FOR_APPENDABLE_TYPE_X(TAppendable)
#define ALIB_BOXING_BOOTSTRAP_REGISTER_FAPPEND_FOR_APPENDABLE_TYPE(TAppendable)
#define ALIB_BOXING_BOOTSTRAP_VTABLE_DBG_REGISTER(Identifier)
#define ALIB_ASSERT_ERROR(cond,...)
#define ALIB_BOXING_BOOTSTRAP_REGISTER_FAPPEND_FOR_APPENDABLE_TYPE_N(TAppendable)
#define ALIB_WARNINGS_ALLOW_UNSAFE_BUFFER_USAGE
#define ALIB_ASSERT_WARNING(cond,...)
#define ALIB_BOXING_BOOTSTRAP_REGISTER_FAPPEND_FOR_APPENDABLE_TYPE_W(TAppendable)
#define ALIB_WARNINGS_IGNORE_NOTHING_RETURNED
#define ALIB_ASSERT(cond)
#define ALIB_CONFIGURATION
const T_EnumRecords< TEnum >::Type * TryRecord(TEnum element)
@ HAS_CONSOLE_WINDOW
See ALIB_HAS_CONSOLE_WINDOW.
@ WAIT_FOR_KEY_PRESS
See ALIB_WAIT_FOR_KEY_PRESS.
Exception CreateSystemException(const NCString &file, int line, const NCString &func, int errNo)
ALIB_API void FFormat_DateTime(const Box &self, const String &formatSpec, NumberFormat &nf, AString &target)
platform_specific integer
ALIB_WARNINGS_ALLOW_UNSAFE_BUFFER_USAGE void debugReportPlugin(const char *file, int line, const char *method, int type, const char *topic, int qtyMsgs, const nchar **msgs)
void(* DBG_SIMPLE_ALIB_MSG_PLUGIN)(const char *file, int line, const char *method, int type, const char *topic, int qtyMsgs, const char **msgs)
platform_specific uinteger
@ Clear
Chooses to clear existing data.
MonoAllocator GlobalAllocator(8 *1024)
ALIB_API integer WriteFloat(double value, TChar *buffer, integer idx, int minWidth, const TNumberFormat< TChar > &nf)
lang::Exception Exception
Type alias in namespace alib.
lang::uinteger uinteger
Type alias in namespace alib.
lang::basecamp::BaseCamp BASECAMP
@ PrepareConfig
Initializes up to the creation of a field config .
@ Final
The final initialization phase.
lang::format::FormatterPythonStyle FormatterPythonStyle
Type alias in namespace alib.
strings::TFormat< character > Format
Type alias in namespace alib.
lang::format::FormatterJavaStyle FormatterJavaStyle
Type alias in namespace alib.
characters::character character
Type alias in namespace alib.
lang::format::ByteSizeUnits ByteSizeUnits
Type alias in namespace alib.
characters::nchar nchar
Type alias in namespace alib.
static void Bootstrap(TEnum element, TArgs &&... args) noexcept
static ALIB_API bool Get(const CString &varName, AString &target, lang::CurrentData targetData=lang::CurrentData::Clear)
void operator()(TAString< TChar > &target, const TAppendable &src)