37# if ALIB_CONFIGURATION
99 int qtyMsgs,
const nchar** msgs)
103 for (
int i= 0; i< qtyMsgs; ++i )
104 message.
Add( msgs[i] );
145 NSecSingular, SIZE_OF_UNITS
148 String units[SIZE_OF_UNITS];
157, LocaleFound(nullptr)
160 "Instances of class BaseCamp must not be created. Use singleton alib::BASECAMP" )
176#if !ALIB_RESOURCES_OMIT_DEFAULTS
181 "Alignment",
A_CHAR(
"0" "," "Left" "," "1" ","
182 "1" "," "Right" "," "1" ","
183 "2" "," "Center" "," "1" ),
185 "Bool",
A_CHAR(
"0" "," "False" "," "1" ","
186 "1" "," "True" "," "1" ","
187 "0" "," "0" "," "1" ","
188 "1" "," "1" "," "1" ","
189 "0" "," "No" "," "1" ","
190 "1" "," "Yes" "," "1" ","
191 "0" "," "Off" "," "2" ","
192 "1" "," "On" "," "2" ","
193 "0" "," "-" "," "1" ","
194 "1" "," "Ok" "," "2" ),
196 "Caching",
A_CHAR(
"0" "," "Disabled" "," "1" ","
197 "1" "," "Enabled" "," "1" ","
198 "1" "," "Auto" "," "1" ),
200 "Case",
A_CHAR(
"0" "," "Sensitive" "," "1" ","
201 "1" "," "Ignore" "," "1" ),
203 "ContainerOp",
A_CHAR(
"0" "," "Insert" "," "1" ","
204 "1" "," "Remove" "," "1" ","
205 "3" "," "GetCreate" "," "4" ","
206 "2" "," "Get" "," "1" ","
207 "4" "," "Create" "," "1" ),
212 "CurrentData",
A_CHAR(
"0" "," "Keep" "," "1" ","
213 "1" "," "Clear" "," "1" ),
215 "Inclusion",
A_CHAR(
"0" "," "Include" "," "1" ","
216 "1" "," "Exclude" "," "1" ),
218 "Initialization",
A_CHAR(
"0" "," "Suppress" "," "1" ","
219 "1" "," "Default" "," "1" ","
220 "2" "," "Nulled" "," "1" ","
221 "0" "," "None" "," "2" ","
222 "1" "," "Initialize" "," "1" ","
223 "2" "," "Zero" "," "1" ),
225 "Phase",
A_CHAR(
"0" "," "Begin" "," "1" ","
226 "1" "," "End" "," "1" ),
228 "Propagation",
A_CHAR(
"0" "," "Omit" "," "1" ","
229 "1" "," "ToDescendants" "," "1" ),
231 "Reach",
A_CHAR(
"0" "," "Global" "," "1" ","
232 "1" "," "Local" "," "1" ),
236 "Responsibility",
A_CHAR(
"0" "," "KeepWithSender" "," "1" ","
237 "1" "," "Transfer" "," "1" ),
239 "Safeness",
A_CHAR(
"0" "," "Safe" "," "1" ","
240 "1" "," "Unsafe" "," "1" ),
242 "Side",
A_CHAR(
"0" "," "Left" "," "1" ","
243 "1" "," "Right" "," "1" ),
245 "SortOrder",
A_CHAR(
"0" "," "Ascending" "," "1" ","
246 "1" "," "Descending" "," "1" ),
248 "SourceData",
A_CHAR(
"0" "," "Copy" "," "1" ","
249 "1" "," "Move" "," "1" ),
251 "Switch",
A_CHAR(
"0" "," "Off" "," "2" ","
252 "1" "," "On" "," "2" ),
254 "Timezone",
A_CHAR(
"0" "," "Local" "," "1" ","
255 "1" "," "UTC" "," "1" ),
257 "Timing",
A_CHAR(
"0" "," "Async" "," "1" ","
258 "1" "," "Sync" "," "1" ","
259 "0" "," "Asynchronous" "," "1" ","
260 "1" "," "Synchronous" "," "1" ","
261 "1" "," "Synchronized" "," "1" ),
263 "ValueReference",
A_CHAR(
"0" "," "Absolute" "," "1" ","
264 "1" "," "Relative" "," "1" ),
266 "Whitespaces",
A_CHAR(
"0" "," "Trim" "," "1" ","
267 "1" "," "Keep" "," "1" ),
271 "TSts",
A_CHAR(
"0" "," "Unstarted" "," "1" ","
272 "1" "," "Started" "," "3" ","
273 "2" "," "Running" "," "1" ","
274 "3" "," "Done" "," "3" ","
275 "4" "," "Terminated" "," "1" ),
278 "TMDWP",
A_CHAR(
"0" "," "Lowest" "," "4" ","
279 "500" "," "DeferredDeletion" "," "1" ","
280 "1000" "," "Low" "," "1" ","
281 "2000" "," "Standard" "," "1" ","
282 "4000" "," "Highest" "," "5" ","
283 "3000" "," "High" "," "1" ),
291DOX_MARKER([DOX_CONFIG_DECLARATION6])
292"Var0",
A_CHAR(
"1|ALIB/LOCALE|" "S" ),
293"Var1",
A_CHAR(
"2|ALIB/WAIT_FOR_KEY_PRESS|" "B" ),
294"Var2",
A_CHAR(
"3|ALIB/HAS_CONSOLE_WINDOW|" "B" ),
296"Var_C1",
A_CHAR(
"Defines the locale of the application. If empty or not set, the system's locale is used.\n"
297 "If set, a UTF8 local should be used, for example 'us_US.UTF-8' or 'de_DE.UTF-8'" ),
298"Var_C2",
A_CHAR(
"If true, the process waits for a key stroke on termination. If empty, under Windows" "\n"
299 "behavior is detected, under other OSes, defaults to false." ),
300"Var_C3",
A_CHAR(
"Boolean value that denotes what its name indicates. If empty, under Windows value is " "\n"
301 "detected, under other OSes, defaults to true." ),
302DOX_MARKER([DOX_CONFIG_DECLARATION6])
307 "INI_CMT_ALIB",
A_CHAR(
"@>'/// '@HL-General ALib library settings.\n@HL-"),
310 "EXIT_MSG" ,
A_CHAR(
"ALIB: Press 'Enter' to exit..." ),
313 "ACAlgos" ,
A_CHAR(
"0" ",NONE" "," "1" ","
314 "31" ",ALL" "," "1" ","
315 "1" ",Uncompressed" "," "1" ","
316 "2" ",MinMax" "," "1" ","
317 "4" ",Sparse" "," "1" ","
318 "8" ",VerySparse" "," "1" ","
319 "16" ",Incremental" "," "1" ","
320 "32" ",Huffman" "," "1" ),
324 "Months" ,
A_CHAR(
"January,February,March,April,May,June,July,August,September,October,November,December")
325 ,
"Days" ,
A_CHAR(
"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,") EOS
327 "DurUnts" ,
A_CHAR(
"zero time" ","
343 "FMTDT" ,
A_CHAR(
"yyyy-MM-dd HH:mm:ss"),
344 "FMTCI" ,
A_CHAR(
"[@ sf:sl from ''ya'' by ''ta'']"),
345 "FMTCINT",
A_CHAR(
"<None>"),
346 "FMTCINY",
A_CHAR(
"<None>"),
347 "FMTCINR",
A_CHAR(
"<Null>"),
351 "E",
A_CHAR(
"0,OK" ",NON" ) EOS
354 "SystemFolders",
A_CHAR(
"0,Root" ",1,"
360 "6,VarTemp" ",1" ) EOS
363 #
if defined (__GLIBC__) || defined(__APPLE__)
364 "SE<" ,
A_CHAR(
"glibc::" ),
365 "OSERR" ,
A_CHAR(
"GNU-C Library call returned {!Q} ({})."),
366 "UknSE" ,
A_CHAR(
"GNU-C Library call returned ({}). (Unknown error number)"),
367 #elif defined(_WIN32)
368 "SE<" ,
A_CHAR(
"WindowsOS::" ),
369 "OSERR" ,
A_CHAR(
"Windows system call returned {!Q} ({})."),
370 "UknSE" ,
A_CHAR(
"Windows system call returned ({}). (Unknown error number)"),
374 A_CHAR(
"-1" "," "UNKNOWN" "," "UknSE" "," )
375 A_CHAR(
"0" "," "OK" "," "," )
377#
if defined (__GLIBC__) || defined(__APPLE__) || defined(__ANDROID_NDK__)
378 A_CHAR(
"1" "," "EPERM" "," "OSERR" ","
379 "2" "," "ENOENT" "," "OSERR" ","
380 "3" "," "ESRCH" "," "OSERR" ","
381 "4" "," "EINTR" "," "OSERR" ","
382 "5" "," "EIO" "," "OSERR" ","
383 "6" "," "ENXIO" "," "OSERR" ","
384 "7" "," "E2BIG" "," "OSERR" ","
385 "8" "," "ENOEXEC" "," "OSERR" ","
386 "9" "," "EBADF" "," "OSERR" ","
387 "10" "," "ECHILD" "," "OSERR" ","
388 "11" "," "EAGAIN" "," "OSERR" ","
389 "12" "," "ENOMEM" "," "OSERR" ","
390 "13" "," "EACCES" "," "OSERR" ","
391 "14" "," "EFAULT" "," "OSERR" ","
392 "15" "," "ENOTBLK" "," "OSERR" ","
393 "16" "," "EBUSY" "," "OSERR" ","
394 "17" "," "EEXIST" "," "OSERR" ","
395 "18" "," "EXDEV" "," "OSERR" ","
396 "19" "," "ENODEV" "," "OSERR" ","
397 "20" "," "ENOTDIR" "," "OSERR" ","
398 "21" "," "EISDIR" "," "OSERR" ","
399 "22" "," "EINVAL" "," "OSERR" ","
400 "23" "," "ENFILE" "," "OSERR" ","
401 "24" "," "EMFILE" "," "OSERR" ","
402 "25" "," "ENOTTY" "," "OSERR" ","
403 "26" "," "ETXTBSY" "," "OSERR" ","
404 "27" "," "EFBIG" "," "OSERR" ","
405 "28" "," "ENOSPC" "," "OSERR" ","
406 "29" "," "ESPIPE" "," "OSERR" ","
407 "30" "," "EROFS" "," "OSERR" ","
408 "31" "," "EMLINK" "," "OSERR" ","
409 "32" "," "EPIPE" "," "OSERR" ","
410 "33" "," "EDOM" "," "OSERR" ","
411 "34" "," "ERANGE" "," "OSERR" ","
412 "35" "," "EDEADLK" "," "OSERR" ","
413 "36" "," "ENAMETOOLONG" "," "OSERR" ","
414 "37" "," "ENOLCK" "," "OSERR" ","
415 "38" "," "ENOSYS" "," "OSERR" ","
416 "39" "," "ENOTEMPTY" "," "OSERR" ","
417 "40" "," "ELOOP" "," "OSERR" ","
418 "42" "," "ENOMSG" "," "OSERR" ","
419 "43" "," "EIDRM" "," "OSERR" "," )
420#
if !defined(__APPLE__)
421 A_CHAR(
"44" "," "ECHRNG" "," "OSERR" ","
422 "45" "," "EL2NSYNC" "," "OSERR" ","
423 "46" "," "EL3HLT" "," "OSERR" ","
424 "47" "," "EL3RST" "," "OSERR" ","
425 "48" "," "ELNRNG" "," "OSERR" ","
426 "49" "," "EUNATCH" "," "OSERR" ","
427 "50" "," "ENOCSI" "," "OSERR" ","
428 "51" "," "EL2HLT" "," "OSERR" ","
429 "52" "," "EBADE" "," "OSERR" ","
430 "53" "," "EBADR" "," "OSERR" ","
431 "54" "," "EXFULL" "," "OSERR" ","
432 "55" "," "ENOANO" "," "OSERR" ","
433 "56" "," "EBADRQC" "," "OSERR" ","
434 "57" "," "EBADSLT" "," "OSERR" ","
435 "59" "," "EBFONT" "," "OSERR" ",")
437 A_CHAR(
"60" "," "ENOSTR" "," "OSERR" ","
438 "61" "," "ENODATA" "," "OSERR" ","
439 "62" "," "ETIME" "," "OSERR" ","
440 "63" "," "ENOSR" "," "OSERR" ",")
441#
if !defined(__APPLE__)
442 A_CHAR(
"64" "," "ENONET" "," "OSERR" ","
443 "65" "," "ENOPKG" "," "OSERR" ",")
445 A_CHAR(
"66" "," "EREMOTE" "," "OSERR" ","
446 "67" "," "ENOLINK" "," "OSERR" ",")
447#
if !defined(__APPLE__)
448 A_CHAR(
"68" "," "EADV" "," "OSERR" ","
449 "69" "," "ESRMNT" "," "OSERR" ","
450 "70" "," "ECOMM" "," "OSERR" ",")
452 A_CHAR(
"71" "," "EPROTO" "," "OSERR" ","
453 "72" "," "EMULTIHOP" "," "OSERR" ",")
454#
if !defined(__APPLE__)
455 A_CHAR(
"73" "," "EDOTDOT" "," "OSERR" ",")
457 A_CHAR(
"74" "," "EBADMSG" "," "OSERR" ","
458 "75" "," "EOVERFLOW" "," "OSERR" ",")
459#
if !defined(__APPLE__)
460 A_CHAR(
"76" "," "ENOTUNIQ" "," "OSERR" ","
461 "77" "," "EBADFD" "," "OSERR" ","
462 "78" "," "EREMCHG" "," "OSERR" ","
463 "79" "," "ELIBACC" "," "OSERR" ","
464 "80" "," "ELIBBAD" "," "OSERR" ","
465 "81" "," "ELIBSCN" "," "OSERR" ","
466 "82" "," "ELIBMAX" "," "OSERR" ","
467 "83" "," "ELIBEXEC" "," "OSERR" ",")
469 A_CHAR(
"84" "," "EILSEQ" "," "OSERR" ",")
470#
if !defined(__APPLE__)
471 A_CHAR(
"85" "," "ERESTART" "," "OSERR" ","
472 "86" "," "ESTRPIPE" "," "OSERR" ",")
474 A_CHAR(
"87" "," "EUSERS" "," "OSERR" ","
475 "88" "," "ENOTSOCK" "," "OSERR" ","
476 "89" "," "EDESTADDRREQ" "," "OSERR" ","
477 "90" "," "EMSGSIZE" "," "OSERR" ","
478 "91" "," "EPROTOTYPE" "," "OSERR" ","
479 "92" "," "ENOPROTOOPT" "," "OSERR" ","
480 "93" "," "EPROTONOSUPPORT" "," "OSERR" ","
481 "94" "," "ESOCKTNOSUPPORT" "," "OSERR" ","
482 "95" "," "EOPNOTSUPP" "," "OSERR" ","
483 "96" "," "EPFNOSUPPORT" "," "OSERR" ","
484 "97" "," "EAFNOSUPPORT" "," "OSERR" ","
485 "98" "," "EADDRINUSE" "," "OSERR" ","
486 "99" "," "EADDRNOTAVAIL" "," "OSERR" ","
487 "100" "," "ENETDOWN" "," "OSERR" ","
488 "101" "," "ENETUNREACH" "," "OSERR" ","
489 "102" "," "ENETRESET" "," "OSERR" ","
490 "103" "," "ECONNABORTED" "," "OSERR" ","
491 "104" "," "ECONNRESET" "," "OSERR" ","
492 "105" "," "ENOBUFS" "," "OSERR" ","
493 "106" "," "EISCONN" "," "OSERR" ","
494 "107" "," "ENOTCONN" "," "OSERR" ","
495 "108" "," "ESHUTDOWN" "," "OSERR" ","
496 "109" "," "ETOOMANYREFS" "," "OSERR" ","
497 "110" "," "ETIMEDOUT" "," "OSERR" ","
498 "111" "," "ECONNREFUSED" "," "OSERR" ","
499 "112" "," "EHOSTDOWN" "," "OSERR" ","
500 "113" "," "EHOSTUNREACH" "," "OSERR" ","
501 "114" "," "EALREADY" "," "OSERR" ","
502 "115" "," "EINPROGRESS" "," "OSERR" ","
503 "116" "," "ESTALE" "," "OSERR" "," )
504#
if !defined(__APPLE__)
505 A_CHAR(
"117" "," "EUCLEAN" "," "OSERR" ","
506 "118" "," "ENOTNAM" "," "OSERR" ","
507 "119" "," "ENAVAIL" "," "OSERR" ","
508 "120" "," "EISNAM" "," "OSERR" ","
509 "121" "," "EREMOTEIO" "," "OSERR" "," )
511 A_CHAR(
"122" "," "EDQUOT" "," "OSERR" "," )
512#
if !defined(__APPLE__)
513 A_CHAR(
"123" "," "ENOMEDIUM" "," "OSERR" ","
514 "124" "," "EMEDIUMTYPE" "," "OSERR" "," )
516 A_CHAR(
"125" "," "ECANCELED" "," "OSERR" "," )
517#
if !defined(__APPLE__)
518 A_CHAR(
"126" "," "ENOKEY" "," "OSERR" ","
519 "127" "," "EKEYEXPIRED" "," "OSERR" ","
520 "128" "," "EKEYREVOKED" "," "OSERR" ","
521 "129" "," "EKEYREJECTED" "," "OSERR" "," )
523 A_CHAR(
"130" "," "EOWNERDEAD" "," "OSERR" ","
524 "131" "," "ENOTRECOVERABLE" "," "OSERR" )
525#
if !defined(__APPLE__)
527 "132" "," "ERFKILL" "," "OSERR" ","
528 "133" "," "EHWPOISON" "," "OSERR" )
533 A_CHAR(
"1" "," "EPERM" "," "OSERR" ","
534 "2" "," "ENOENT" "," "OSERR" ","
535 "3" "," "ESRCH" "," "OSERR" ","
536 "4" "," "EINTR" "," "OSERR" ","
537 "5" "," "EIO" "," "OSERR" ","
538 "6" "," "ENXIO" "," "OSERR" ","
539 "7" "," "E2BIG" "," "OSERR" ","
540 "8" "," "ENOEXEC" "," "OSERR" ","
541 "9" "," "EBADF" "," "OSERR" ","
542 "10" "," "ECHILD" "," "OSERR" ","
543 "11" "," "EAGAIN" "," "OSERR" ","
544 "12" "," "ENOMEM" "," "OSERR" ","
545 "13" "," "EACCES" "," "OSERR" ","
546 "14" "," "EFAULT" "," "OSERR" ","
547 "16" "," "EBUSY" "," "OSERR" ","
548 "17" "," "EEXIST" "," "OSERR" ","
549 "18" "," "EXDEV" "," "OSERR" ","
550 "19" "," "ENODEV" "," "OSERR" ","
551 "20" "," "ENOTDIR" "," "OSERR" ","
552 "21" "," "EISDIR" "," "OSERR" ","
553 "23" "," "ENFILE" "," "OSERR" ","
554 "24" "," "EMFILE" "," "OSERR" ","
555 "25" "," "ENOTTY" "," "OSERR" ","
556 "27" "," "EFBIG" "," "OSERR" ","
557 "28" "," "ENOSPC" "," "OSERR" ","
558 "29" "," "ESPIPE" "," "OSERR" ","
559 "30" "," "EROFS" "," "OSERR" ","
560 "31" "," "EMLINK" "," "OSERR" ","
561 "32" "," "EPIPE" "," "OSERR" ","
562 "33" "," "EDOM" "," "OSERR" ","
563 "36" "," "EDEADLK" "," "OSERR" ","
564 "38" "," "ENAMETOOLONG" "," "OSERR" ","
565 "39" "," "ENOLCK" "," "OSERR" ","
566 "40" "," "ENOSYS" "," "OSERR" ","
567 "41" "," "ENOTEMPTY" "," "OSERR" ","
568 "22" "," "EINVAL" "," "OSERR" ","
569 "34" "," "ERANGE" "," "OSERR" ","
570 "42" "," "EILSEQ" "," "OSERR" ","
571 "80" "," "STRUNCATE" "," "OSERR" ","
572 "100" "," "EADDRINUSE" "," "OSERR" ","
573 "101" "," "EADDRNOTAVAIL" "," "OSERR" ","
574 "102" "," "EAFNOSUPPORT" "," "OSERR" ","
575 "103" "," "EALREADY" "," "OSERR" ","
576 "104" "," "EBADMSG" "," "OSERR" ","
577 "105" "," "ECANCELED" "," "OSERR" ","
578 "106" "," "ECONNABORTED" "," "OSERR" ","
579 "107" "," "ECONNREFUSED" "," "OSERR" ","
580 "108" "," "ECONNRESET" "," "OSERR" ","
581 "109" "," "EDESTADDRREQ" "," "OSERR" ","
582 "110" "," "EHOSTUNREACH" "," "OSERR" ","
583 "111" "," "EIDRM" "," "OSERR" ","
584 "112" "," "EINPROGRESS" "," "OSERR" ","
585 "113" "," "EISCONN" "," "OSERR" ","
586 "114" "," "ELOOP" "," "OSERR" ","
587 "115" "," "EMSGSIZE" "," "OSERR" ","
588 "116" "," "ENETDOWN" "," "OSERR" ","
589 "117" "," "ENETRESET" "," "OSERR" ","
590 "118" "," "ENETUNREACH" "," "OSERR" ","
591 "119" "," "ENOBUFS" "," "OSERR" ","
592 "120" "," "ENODATA" "," "OSERR" ","
593 "121" "," "ENOLINK" "," "OSERR" ","
594 "122" "," "ENOMSG" "," "OSERR" ","
595 "123" "," "ENOPROTOOPT" "," "OSERR" ","
596 "124" "," "ENOSR" "," "OSERR" ","
597 "125" "," "ENOSTR" "," "OSERR" ","
598 "126" "," "ENOTCONN" "," "OSERR" ","
599 "127" "," "ENOTRECOVERABLE" "," "OSERR" ","
600 "128" "," "ENOTSOCK" "," "OSERR" ","
601 "129" "," "ENOTSUP" "," "OSERR" ","
602 "130" "," "EOPNOTSUPP" "," "OSERR" ","
603 "131" "," "EOTHER" "," "OSERR" ","
604 "132" "," "EOVERFLOW" "," "OSERR" ","
605 "133" "," "EOWNERDEAD" "," "OSERR" ","
606 "134" "," "EPROTO" "," "OSERR" ","
607 "135" "," "EPROTONOSUPPORT" "," "OSERR" ","
608 "136" "," "EPROTOTYPE" "," "OSERR" ","
609 "137" "," "ETIME" "," "OSERR" ","
610 "138" "," "ETIMEDOUT" "," "OSERR" ","
611 "139" "," "ETXTBSY" "," "OSERR" ","
612 "140" "," "EWOULDBLOCK" "," "OSERR" ) EOS
616 "REPE<" ,
A_CHAR(
"lang::") ,
617 "REPE" ,
A_CHAR(
"1,ErrorWritingReport,REPED1") ,
619 "REPED1",
A_CHAR(
"Error writing ALib report."),
621 "ExcFmtExc",
A_CHAR(
"\nAn exception occurred while formatting another (!) exception:\n" ),
622 "RepFmtExc",
A_CHAR(
"\nAn exception occurred while formatting an ALib report (!):\n" ),
625 "FE<",
A_CHAR(
"format::"),
627 "PHT",
A_CHAR(
"0,NotGiven" ",1,"
642 "FE0" ,
A_CHAR(
"11,ArgumentIndexIs0" ",FMG11" ),
643 "FE1" ,
A_CHAR(
"12,ArgumentIndexOutOfBounds" ",FMG12" ),
644 "FE2" ,
A_CHAR(
"13,IncompatibleTypeCode" ",FMG13" ),
647 "FE3" ,
A_CHAR(
"101,MissingClosingBracket" ",FPS101" ),
650 "FE4" ,
A_CHAR(
"102,MissingPrecisionValuePS" ",FPS102" ),
651 "FE5" ,
A_CHAR(
"103,DuplicateTypeCode" ",FPS103" ),
652 "FE6" ,
A_CHAR(
"104,UnknownTypeCode" ",FPS104" ),
653 "FE7" ,
A_CHAR(
"105,ExclamationMarkExpected" ",FPS105" ),
654 "FE8" ,
A_CHAR(
"106,UnknownConversionPS" ",FPS106" ),
655 "FE9" ,
A_CHAR(
"107,PrecisionSpecificationWithInteger" ",FPS107" ),
656 "FE10",
A_CHAR(
"108,MissingReplacementStrings" ",FPS108" ),
659 "FE11" ,
A_CHAR(
"201,NegativeValuesInBracketsNotSupported" ",FJS101" ),
660 "FE12" ,
A_CHAR(
"202,MissingPrecisionValueJS" ",FJS102" ),
661 "FE13" ,
A_CHAR(
"203,HexadecimalFloatFormatNotSupported" ",FJS103" ),
662 "FE14" ,
A_CHAR(
"204,NoAlternateFormOfConversion" ",FJS104" ),
663 "FE15" ,
A_CHAR(
"205,NoPrecisionWithConversion" ",FJS105" ),
664 "FE16" ,
A_CHAR(
"206,UnknownDateTimeConversionSuffix" ",FJS106" ),
665 "FE17" ,
A_CHAR(
"207,UnknownConversionJS" ",FJS107" ),
668 "FE18" ,
A_CHAR(
"501,UnknownPropertyInFormatString" ",PFM501" ),
669 "FE19" ,
A_CHAR(
"502,ErrorInResultingFormatString" ",PFM502" ),
670 "FE20" ,
A_CHAR(
"510,MissingConfigurationVariable" ",PFM510" ),
673 "FE21" ,
A_CHAR(
"601,UnknownMarker" ",ST601" ),
674 "FE22" ,
A_CHAR(
"602,EndmarkerWithoutStart" ",ST602" ),
677 "FMG11" ,
A_CHAR(
"Argument index 0 not allowed.\n"
678 "In: {!Q}\n >{!FillC-}^" ),
679 "FMG12" ,
A_CHAR(
"Argument index #{} is out of bounds. {} arguments are available.\n"
680 "In: {!Q}\n >{!FillC-}^" ),
681 "FMG13" ,
A_CHAR(
"Detected placeholder type does not match given argument.\n"
682 "Placeholder number: {}\n"
683 "Placeholder type: {} ({})\n" )
684 "Deduced argument type: {!Q}\n"
686 A_CHAR(
"Native argument type: <{}>\n" )
687 "In: {!Q}\n >{!FillC-}^" ),
690 "FPS101" ,
A_CHAR(
"Closing bracket '}}' of placeholder not found (or syntax error).\n"
691 "In: {!Q}\n >{!FillC-}^" ),
695 "FPS102" ,
A_CHAR(
"Missing precision value after '.' character."
696 "\nIn: {!Q}\n >{!FillC-}^" ),
697 "FPS103" ,
A_CHAR(
"Duplicate type code {!Q'} given (previous was {!Q'})."
699 "\nIn: {!Q}\n >{!FillC-}^" ),
700 "FPS104" ,
A_CHAR(
"Unknown type code {!Q'} given."
701 "\nIn: {!Q}\n >{!FillC-}^" )
703 "FPS105" ,
A_CHAR(
"Expected '!' in continuation of placeholder."
705 "\nIn: {!Q}\n >{!FillC-}^" ),
706 "FPS106" ,
A_CHAR(
"Unknown conversion \"!{}\"."
708 "\nIn: {!Q}\n >{!FillC-}^" ),
709 "FPS107" ,
A_CHAR(
"Precision not allowed with integer format."
711 "\nIn: {!Q}\n >{!FillC-}^" ),
712 "FPS108" ,
A_CHAR(
"Missing pair of replacement strings \"<src><repl>\" after \"!Replace\"."
714 "\nIn: {!Q}\n >{!FillC-}^" ),
718 "FJS101" ,
A_CHAR(
"Brackets for negative values not implemented/supported."
719 "\nIn: {!Q}\n >{!FillC-}^" ),
720 "FJS102" ,
A_CHAR(
"Missing precision value after '.' character."
721 "\nIn: {!Q}\n >{!FillC-}^" ),
722 "FJS103" ,
A_CHAR(
"Hexadecimal float format not implemented/supported."
723 "\nIn: {!Q}\n >{!FillC-}^" ),
724 "FJS104" ,
A_CHAR(
"Alternate form '#' not supported with conversion {!Q}."
725 "\nIn: {!Q}\n >{!FillC-}^" ),
726 "FJS105" ,
A_CHAR(
"Precision specification (\".{}\") is not supported with conversion {!Q}."
727 "\nIn: {!Q}\n >{!FillC-}^" ),
728 "FJS106" ,
A_CHAR(
"Unknown date/time conversion suffix {!Q'}."
729 "\nIn: {!Q}\n >{!FillC-}^" ),
730 "FJS107" ,
A_CHAR(
"Unknown conversion character {!Q'}."
731 "\nIn: {!Q}\n >{!FillC-}^" ),
735 "PFM501" ,
A_CHAR(
"Unknown property identifier \"{}{}\" in format string.\n"
736 "Format string: {!Q}.\n"
737 "Allowed identifiers: " ),
738 "PFM502" ,
A_CHAR(
"Error in resulting format string.\nSource format: {!Q}." ),
739 "PFM510" ,
A_CHAR(
"Missing or empty configuration variable {!Q} containing user-defined format string." ),
742 "ST601" ,
A_CHAR(
"Unknown marker at position {}.\n"
743 " Marked text: {!Q}.\n"
745 "ST602" ,
A_CHAR(
"Found an end-marker without a start marker at position {}.\n"
746 " Marked text: {!Q}.\n"
804 alib::boxing::TMappedTo <alib::threads::Thread*> >(alib::threads::FAppend_thread);
821DOX_MARKER( [DOX_ENUMS_MAKE_PARSABLE_22] )
823DOX_MARKER( [DOX_ENUMS_MAKE_PARSABLE_22] )
849DOX_MARKER([DOX_CONFIG_DECLARATION7])
851DOX_MARKER([DOX_CONFIG_DECLARATION7])
867 #if ALIB_CONFIGURATION
876 parser=
GetResource(
"Months" );
for(
int i= 0 ; i < 12 ; ++i ) { months[i]= parser.ConsumeToken(
','); }
877 parser=
GetResource(
"Days" );
for(
int i= 0 ; i < 7 ; ++i ) { days[i]= parser.ConsumeToken(
','); }
880 for(
int i= 0 ; i < Units::SIZE_OF_UNITS ; ++i )
881 units[i]= parser.ConsumeToken(
',');
883 ALIB_ASSERT( units[Units::SIZE_OF_UNITS-1].IsNotEmpty() )
893 #if ALIB_CONFIGURATION
910 if( !setlocale(LC_ALL, nLocale ) )
912 NString256 msg(
"ALib Error: setlocale(\""); msg << nLocale <<
"\") failed. Setting read from ";
913 msg << ( receivedFrom == 1 ?
"config variable 'ALIB_LOCALE'" :
914 receivedFrom == 2 ?
"environment variable 'LANG'" :
915 receivedFrom == 3 ?
"environment variable 'LANGUAGE'" :
"ERROR" );
919 std::cerr <<
". Trying 'setlocale(LC_ALL, \"\")': ";
920 if ( setlocale(LC_ALL,
"" ) )
921 std::cerr <<
" success.";
924 std::cerr <<
"failed. Trying 'setlocale(LC_ALL, \"C\")': ";
925 if ( setlocale(LC_ALL,
"C" ) )
926 std::cerr <<
" success.";
928 std::cerr << std::endl <<
" Panic: No standard locale setting was successful!";
930 std::cerr << std::endl;
945 #if ALIB_CONFIGURATION
957 (void) varHasConsoleWindow.
Define();
970 #if ALIB_CONFIGURATION
976 #if defined(_WIN32) && ALIB_DEBUG
982 (void) varWaitForKeyPress.
Define();
986 #if defined(_WIN32) && ALIB_DEBUG
995DOX_MARKER([DOX_CRITICAL_SECTIONS_ADD_LOCK2])
996#if ALIB_DEBUG_CRITICAL_SECTIONS && ALIB_MONOMEM
999DOX_MARKER([DOX_CRITICAL_SECTIONS_ADD_LOCK2])
1008 #if ALIB_DEBUG_CRITICAL_SECTIONS && ALIB_MONOMEM
1018 OutputDebugStringA(
"\r\nALIB: Waiting for 'Enter' key in the console window.\r\n" );
1021 std::cout << std::endl <<
GetResource(
"EXIT_MSG") << std::endl;
1022 while ( getchar() !=
'\n' )
1028 "ALIB",
"DefaultFormatter still shared more than once: ",
1050 #if defined(__unix__) || defined(__APPLE__)
1052 String DebuggerProcessNames=
A_CHAR(
"gdb|debugserver");
1059 #if defined(__unix__) || defined(__APPLE__)
1064 if ( parentPID == 0 )
1068 Tokenizer tknzr( DebuggerProcessNames,
'|' );
1077 #elif defined(_WIN32)
1082 #pragma message ("Unknown Platform in file: " __FILE__ )
1095 if( enumRecord ==
nullptr )
1096 return Exception( ci, SystemErrors::UNKNOWN, errNo );
1142 ALIB_WARNING(
"ALIB",
"Format Error: Missing single Quote" )
1143 target <<
"Format Error: Missing closing single quote character <'>" ;
1147 target.
_<
NC>( format, 0, end );
1148 format.ConsumeChars<
NC>( end + 1 );
1163 target.
_<
NC>(
Hour < 12 ?
" am" :
" pm" );
1173 else if ( n == 3 ) target.
_<
NC>( days[
DayOfWeek], 0, 3 );
1179 else if ( n == 3 ) target.
_<
NC>( months[
Month-1], 0, 3 );
1180 else target.
_<
NC>( months[
Month-1] );
1206DOX_MARKER([DOX_BOXING_IFORMAT_DATETIME])
1210 tct.Format( formatSpec.
IsNotEmpty() ? formatSpec
1214DOX_MARKER([DOX_BOXING_IFORMAT_DATETIME])
1226using namespace lang;
1230 template<
typename TChar,
typename TAllocator>
1231 void appendDateTime(TAString<TChar,TAllocator>& target,
const DateTime::Duration pSrc)
1234 using Duration= DateTime::Duration;
1236 auto nanos= src.InNanoseconds();
1239 target << units[Units::TS_ZERO];
1246 src= Duration() - src;
1249 TNumberFormat<TChar> nf( TNumberFormat<TChar>::Global );
1250 nf.FractionalPartWidth= 2;
1251 int64_t v= src.InAbsoluteDays();
1254 target << TFormat<TChar>( src.InDays(), &nf ) << units[Units::DayPlural];
1260 target << v << ( v != 1 ? units[Units::DayPlural]
1261 : units[Units::DaySingular] );
1263 Duration cpy= src - ( Duration::FromAbsoluteDays(v) );
1265 target << ' ' << TFormat<TChar>( cpy.InHours(), &nf ) << units[Units::HourPlural];
1269 v= src.InAbsoluteHours();
1272 target << v << ( v != 1 ? units[Units::HourPlural]
1273 : units[Units::HourSingular] );
1275 Duration cpy= src - ( Duration::FromAbsoluteHours(v) );
1277 auto minutes= cpy.InAbsoluteMinutes();
1278 target <<
' ' << minutes << (minutes!= 1 ? units[Units::MinPlural]
1279 : units[Units::MinSingular] );
1283 v= src.InAbsoluteMinutes();
1286 target << v << ( v != 1 ? units[Units::MinPlural]
1287 : units[Units::MinSingular] );
1289 Duration cpy= src - ( Duration::FromAbsoluteMinutes(v) );
1291 auto seconds= cpy.InAbsoluteSeconds();
1292 target <<
' ' << seconds << (seconds!= 1 ? units[Units::SecPlural]
1293 : units[Units::SecSingular] );
1297 v= src.InAbsoluteSeconds();
1300 target << TFormat<TChar>( src.InSeconds(), &nf ) << units[Units::SecPlural];
1304 nf.DecMinimumFieldWidth= 3;
1306 auto val= src.InAbsoluteMilliseconds();
1309 target << TFormat<TChar>(val,&nf) << ( val!= 1 ? units[Units::MlSecPlural]
1310 : units[Units::MlSecSingular] );
1314 val= src.InAbsoluteMicroseconds();
1317 target << TFormat<TChar>(val,&nf) << ( val!= 1 ? units[Units::McSecPlural]
1318 : units[Units::McSecSingular] );
1322 val= src.InNanoseconds();
1323 target << TFormat<TChar>(val,&nf) << ( val!= 1 ? units[Units::NSecPlural]
1324 : units[Units::NSecSingular] );
1331template<
typename TChar,
typename TAllocator>
1332void T_Append<time::DateTime::Duration,TChar,TAllocator>::operator()( TAString<TChar,TAllocator>& target,
const time::DateTime::Duration src )
1334 appendDateTime( target, src );
1337template<
typename TChar,
typename TAllocator>
1338void T_Append<time::Ticks::Duration,TChar,TAllocator>::operator()( TAString<TChar,TAllocator>& target,
const time::Ticks::Duration src)
1341 appendDateTime( target, time::DateTime::Duration::FromNanoseconds( src.InNanoseconds() ));
1345template void T_Append<time::DateTime::Duration, nchar, lang::HeapAllocator>::operator()( TAString<nchar, lang::HeapAllocator>&,
const time::DateTime::Duration );
1346template void T_Append<time::DateTime::Duration, wchar, lang::HeapAllocator>::operator()( TAString<wchar, lang::HeapAllocator>&,
const time::DateTime::Duration );
1347template void T_Append<time::DateTime::Duration, xchar, lang::HeapAllocator>::operator()( TAString<xchar, lang::HeapAllocator>&,
const time::DateTime::Duration );
1348template void T_Append<time::Ticks:: Duration, nchar, lang::HeapAllocator>::operator()( TAString<nchar, lang::HeapAllocator>&,
const time::Ticks ::Duration );
1349template void T_Append<time::Ticks:: Duration, wchar, lang::HeapAllocator>::operator()( TAString<wchar, lang::HeapAllocator>&,
const time::Ticks ::Duration );
1350template void T_Append<time::Ticks:: Duration, xchar, lang::HeapAllocator>::operator()( TAString<xchar, lang::HeapAllocator>&,
const time::Ticks ::Duration );
1365 double v= double(val);
1368 if( unit < ByteSizeUnits::IEC_END)
1371 divisor= double(1024);
1375 loopEnd= int(unit) - ByteSizeUnits::SI;
1376 divisor= double(1000);
1379 for (
int i = 0; i < loopEnd; ++i)
1388 if( val < byteLimit )
1394 if( val < byteLimit * factor)
1395 return std::make_pair(
double(val) /
double(factor), unit );
1408 auto magnitude= (unit == ByteSizeUnits::IEC) ? getMagnitude(val, magnitudeThreshold, 1024ull)
1409 : getMagnitude(val, magnitudeThreshold, 1000ull);
1411 if( magnitude.second == 0 )
1412 target <<
Format( val,
nullptr );
1418 target << unitSeparator;
1419 target << (magnitude.second + unit);
1425 result.second+= ByteSizeUnits::IEC;
1432 result.second+= ByteSizeUnits::SI;
1437double ByteSizeSI ::ConvertTo(
ByteSizeUnits unit) {
return convertTo(Value, unit); };
const TUnboxable Unbox() const
ALIB_API bool Define(Priority requestedPriority=Priority::Standard)
void InsertDerived(TArgs &&... args)
NCString ResourceCategory
lang::resources::ResourcePool * resourcePool
config::Configuration * config
const String & GetResource(const NString &name)
ALIB_API void DoReport(Message &message)
static ALIB_API Report * defaultReport
The default Report used internally by ALib and usually by processes that rely on ALib.
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
int Minute
The calendar minute (0..59).
int Year
The calendar year (e.g., 2022).
int Month
The calendar month (1..12).
ALIB_API AString & Format(Substring format, AString &target, lang::CurrentData targetData=lang::CurrentData::Keep) const
int Day
The calendar day (1..31).
int Hour
The calendar hour (0..23).
int Second
The calendar second (0..59).
This class represents process information.
static ALIB_API const ProcessInfo & Current()
uinteger PPID
The parent's process id as AString. (Unix like OS / Mac OS only.)
static TDerivedClass * singleton
A pointer to the one and only 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
void Allocate(TAllocator &allocator, const TString< TChar > ©)
constexpr bool IsNotEmpty() const
constexpr integer Length() const
bool Equals(const TString< TChar > &rhs) const
bool StartsWith(const TString &needle) const
constexpr const TChar * Buffer() const
ALIB_API TSubstring< TChar > & Next(lang::Whitespaces trimming=lang::Whitespaces::Trim, TChar newDelim='\0')
DbgLockAsserter Dbg
The debug tool instance.
#define ALIB_WARNING(...)
#define ALIB_BOXING_VTABLE_DEFINE(TMapped, Identifier)
#define IF_ALIB_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 IF_ALIB_BITBUFFER(...)
#define IF_ALIB_THREADMODEL(...)
#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_REL_DBG(releaseCode,...)
#define ALIB_WARNINGS_IGNORE_NOTHING_RETURNED
#define ALIB_ASSERT(cond)
#define ALIB_CONFIGURATION
void BootstrapRegister(typename TFDecl::Signature function)
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 CallerInfo &ci, int errNo)
SystemExceptions
Denotes exceptions thrown by classes of namespace alib::lang::system.
SystemErrors
Denotes result values returned by system functions (glibc, etc).
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 CallerInfo &ci, int type, const char *topic, int qtyMsgs, const nchar **msgs)
void(* DBG_SIMPLE_ALIB_MSG_PLUGIN)(const CallerInfo &ci, int type, const char *topic, int qtyMsgs, const char **msgs)
platform_specific uinteger
@ Clear
Chooses to clear existing data.
ALIB_API MonoAllocator GLOBAL_ALLOCATOR
ALIB_API integer WriteFloat(double value, TChar *buffer, integer idx, int minWidth, const TNumberFormat< TChar > &nf)
ShutdownPhases
Termination levels usable with Bootstrapping ALib Camps.
lang::Exception Exception
Type alias in namespace alib.
lang::uinteger uinteger
Type alias in namespace alib.
lang::basecamp::BaseCamp BASECAMP
The singleton instance of ALib Camp class BaseCamp.
BootstrapPhases
Initialization levels usable with Bootstrapping ALib Camps.
@ Final
The final initialization phase. Here, camps are initializing their custom setup.
strings::TFormat< character > Format
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)