ALib C++ Library
Library Version: 2510 R0
Documentation generated by doxygen
Loading...
Searching...
No Matches
ALib Preprocessor Macros

Description:

This document lists all preprocessor macros of ALib used to generate code or prune code pieces. Often, the definition of macros depend on the ALib Compiler Symbols,

The following sections of this document lists macros that are not related to a specific ALib Module:

   ALib Version And Feature Verification
   C/C++ Preprocessor Helpers
   C/C++ Language And Linkage
   C/C++ Compiler Warning Control
   Debug Assertions, Warnings and Errors
   C++ Template Programming Tools
   Resource Locking and Recursive Programming

Followed to this, module-specific macros are documented:

   Module ALox - Debug Logging
   Module ALox - Release Logging
   Module ALox - Lowlevel Macros
   Module Basecamp
   Module Boxing
   Module Characters
   Module Config
   Module Enums
   Module Expressions
   Module Strings
   Module Threads

The last section provides macros used to include or exclude (prune) code:
   Code Pruning

ALib Version And Feature Verification

Macros used to verify that the ALib binary used has the right version is compiled with the same feature set as the current compilation unit. For this, version and feature flags are compiled statically into the library. The macros are used internally, respectively 'automatically'. Hence, they need not to be used directly clients of the library.

#define ALIB_VERSION   2510
 
#define ALIB_REVISION   0
 
#define ALIB_COMPILATION_FLAGS
 
#define ALIB_ASSERT_MODULE(modulename)
 
#define ALIB_BASE_DIR
 

C/C++ Preprocessor Helper Macros

The following macros are fundamental and building blocks for other macros.

#define ALIB_STRINGIFY(a)
 
#define ALIB_NSTRINGIFY(a)
 
#define ALIB_CONCAT(a, b)
 
#define ALIB_IDENTIFIER(prefix)
 
#define ALIB_EMPTY
 
#define ALIB_COMMA   ,
 
#define ALIB_COMMA_DBG   ,
 
#define ALIB_STATIC_ASSERT(CondVariable, Cond, Message)
 
#define ALIB_STATIC_DENY(CondVariable, Cond, Message)
 

C/C++ Language And Linkage Macros

The macros listed here are supporting C++ compilation and linking control and language specific utilities.

#define ALIB_DLL   __declspec(dllexport)
 
#define ALIB_EXPORT   export
 
#define ALIB_ASSERT_GLOBAL_NAMESPACE
 
#define ALIB_SIZEOF_WCHAR_T   4
 
#define ALIB_CALLER_FUNC   __FUNCTION__
 
#define ALIB_CALLER   {__FILE__,__LINE__,ALIB_CALLER_FUNC,::std::this_thread::get_id(),&typeid(*this)}
 
#define ALIB_CALLER_PRUNED   ALIB_CALLER
 
#define ALIB_COMMA_CALLER_PRUNED   , ALIB_CALLER
 
#define ALIB_CALLER_PRUNED_COMMA   ALIB_CALLER ,
 
#define ALIB_CALLER_NULLED   ALIB_CALLER
 
#define ALIB_COMMA_CALLER_NULLED   , ALIB_CALLER
 
#define ALIB_CALLER_NULLED_COMMA   ALIB_CALLER ,
 
#define ALIB_DBG_TAKE_CI   const CallerInfo& ci
 
#define bitsof(type)
 
#define ALIB_STACK_ALLOCATED_TYPE(T)
 

C/C++ Compiler Warning Control

ALib sources are designed to be compiled on different compilers using the highest possible compiler warning levels available. In some situations, some warnings need to be temporarily disabled. The following macros do this in a compiler agnostic way.

#define ALIB_WARNINGS_RESTORE    _Pragma("clang diagnostic pop") \
 
#define ALIB_WARNINGS_UNINITIALIZED_OFF
 
#define ALIB_WARNINGS_ALLOW_NULL_POINTER_PASSING    _Pragma("clang diagnostic push") \
 
#define ALIB_WARNINGS_ALLOW_UNREACHABLE_CODE
 
#define ALIB_WARNINGS_MACRO_NOT_USED_OFF
 
#define ALIB_WARNINGS_RESERVED_MACRO_NAME_OFF
 
#define ALIB_WARNINGS_ALLOW_MACRO_REDEFINITION
 
#define ALIB_WARNINGS_ALLOW_UNSAFE_FUNCTION_OR_VARIABLE
 
#define ALIB_WARNINGS_OVERLOAD_VIRTUAL_OFF
 
#define ALIB_WARNINGS_ALLOW_SPARSE_ENUM_SWITCH
 
#define ALIB_WARNINGS_ALLOW_BITWISE_SWITCH
 
#define ALIB_WARNINGS_IGNORE_DOCS
 
#define ALIB_WARNINGS_ALLOW_SHIFT_COUNT_OVERFLOW
 
#define ALIB_WARNINGS_IGNORE_DEPRECATED
 
#define ALIB_WARNINGS_IGNORE_UNUSED_MACRO
 
#define ALIB_WARNINGS_IGNORE_UNUSED_PARAMETER
 
#define ALIB_WARNINGS_IGNORE_UNUSED_VARIABLE
 
#define ALIB_WARNINGS_IGNORE_UNUSED_FUNCTION
 
#define ALIB_WARNINGS_IGNORE_UNUSED_LAMBDA_CAPTURE
 
#define ALIB_WARNINGS_IGNORE_FUNCTION_TEMPLATE
 
#define ALIB_WARNINGS_IGNORE_RESERVED_IDENTIFIER
 
#define ALIB_WARNINGS_IGNORE_NOTHING_RETURNED
 
#define ALIB_FALLTHROUGH   [[clang::fallthrough]];
 
#define ALIB_WARNINGS_IGNORE_INTEGRAL_CONSTANT_OVERFLOW    _Pragma("clang diagnostic push") \
 
#define ALIB_WARNINGS_IGNORE_SIGN_CONVERSION
 
#define ALIB_WARNINGS_IGNORE_INTEGER_OVERFLOW
 

Debug Assertions, Warnings and Errors

These macros are used with debug-builds of ALib, respectively when symbol ALIB_DEBUG is given. They provide shortcuts into functions of the small foundational module ALib Module Assert - Programmer's Manual.

If also module ALox is compiled into the library, then a plug-in that uses ALox for the message output is used. See class ALoxAssertionPlugin for more information.

#define ALIB_ERROR(domain, ...)
 
#define ALIB_WARNING(domain, ...)
 
#define ALIB_MESSAGE(domain, ...)
 
#define ALIB_ASSERT(cond, domain)
 
#define ALIB_ASSERT_ERROR(cond, domain, ...)
 
#define ALIB_ASSERT_WARNING(cond, domain, ...)
 
#define ALIB_ASSERT_MESSAGE(cond, domain, ...)
 
#define ALIB_ASSERT_RESULT_EQUALS( func, value)
 
#define ALIB_ASSERT_RESULT_NOT_EQUALS( func, value)
 
#define ALIB_ASSERT_RESULT_GREATER_THAN(func, value)
 
#define ALIB_ASSERT_RESULT_LESS_THAN( func, value)
 

C++ Template Programming Tools

Macros for handling template types.

#define ALIB_TVALUE(T)
 
#define ALIB_HAS_METHOD(T, Method, ...)
 

Macros for Resource Locking and Recursive Programming

The macros listed here have a direct relationship with classes defined in ALib and with their use.

#define ALIB_OWN( ownable)
 
#define ALIB_OWN_RECURSIVE(ownable)
 
#define ALIB_OWN_SHARED( ownable)
 
#define ALIB_DBG_PREVENT_RECURSIVE_METHOD_CALLS
 
#define ALIB_DBG_PREVENT_RECURSIVE_METHOD_CALLS_MEMBER_DECL   bool dbgRecursionDetectionFlag = false;
 

Code Selection

The macros listed here include or prune code, dependent on different preprocessor symbols. They are mainly given to avoid #if/#else/#endif statements for small code pieces.

#define ALIB_DBG(...)
 
#define ALIB_REL_DBG(releaseCode, ...)
 
#define ALIB_REL(...)
 
#define ALIB_CPP_23(...)
 
#define ALIB_CPP_BEFORE_23(...)
 
#define IF_ALIB_ALOX(...)
 
#define IFNOT_ALIB_ALOX(...)
 
#define IF_ALIB_BOXING(...)
 
#define IFNOT_ALIB_BOXING(...)
 
#define IF_ALIB_BITBUFFER(...)
 
#define IFNOT_ALIB_BITBUFFER(...)
 
#define IF_ALIB_VARIABLES(...)
 
#define IFNOT_ALIB_VARIABLES(...)
 
#define IF_ALIB_CONTAINERS(...)
 
#define IFNOT_ALIB_CONTAINERS(...)
 
#define IF_ALIB_CLI(...)
 
#define IFNOT_ALIB_CLI(...)
 
#define IF_ALIB_CAMP(...)
 
#define IFNOT_ALIB_CAMP(...)
 
#define IF_ALIB_ENUMRECORDS(...)
 
#define IFNOT_ALIB_ENUMRECORDS(...)
 
#define IF_ALIB_EXPRESSIONS(...)
 
#define IFNOT_ALIB_EXPRESSIONS(...)
 
#define IF_ALIB_FILES(...)
 
#define IFNOT_ALIB_FILES(...)
 
#define IF_ALIB_THREADMODEL(...)
 
#define IFNOT_ALIB_THREADMODEL(...)
 
#define IF_ALIB_THREADS(...)
 
#define IFNOT_ALIB_THREADS(...)
 
#define IF_ALIB_STRINGS(...)
 
#define IFNOT_ALIB_STRINGS(...)
 
#define IF_ALIB_MONOMEM(...)
 
#define IFNOT_ALIB_MONOMEM(...)
 
#define IF_ALIB_RESOURCES(...)
 
#define IFNOT_ALIB_RESOURCES(...)
 
#define IF_ALIB_EXCEPTIONS(...)
 
#define IFNOT_ALIB_EXCEPTIONS(...)
 
#define IF_ALIB_SYSTEM(...)
 
#define IFNOT_ALIB_SYSTEM(...)
 
#define IF_ALIB_FORMAT(...)
 
#define IFNOT_ALIB_FORMAT(...)
 
#define IF_ALIB_SINGLETONS(...)
 
#define IFNOT_ALIB_SINGLETONS(...)
 

ALox Macros For Debug Logging

The macros listed here, are provided to place debug Log Statements within source code using module ALox. Besides that, macros controlling and setting preferences for ALox exists.

The exclusive use of these macros should be sufficient to support most of common debug logging statements with ALox. Should some functionality be not available easily with using the macros, of course, the normal C++ API of ALox can be used in parallel to using the macros. For proper pruning of code that is using the C++ API, such code has to be enclosed by

#if ALOX_DBG_LOG
   ...
   ...
#endif

lines, or embedded in macro Log_Prune.

Note
To be clear: When using the macros, the #if / #endif statements are not needed!

All macro names are prefixed "Log_". This implies that they are macros to implement debug logging. In contrast to this, a set of similar macros exists for release logging (see release logging macros). Those are prefixed "Lox_". (The choice of the prefixes Log_ and Lox provide maximum source code compatibility of ALox for C++ log lines in comparison to ALox for C# and ALox for Java.

Most macros make use of the macro LOG_LOX, which references a singleton object of class Lox that is used for all debug logging. This singleton concept covers most uses cases for debug logging. If more flexibility is wanted, then either macro LOG_LOX might be changed for different compilation units or the ALox for C++ API might be used instead of the macros listed here.

Note
The Scope Domain mechanism of ALox, as well as other ALox functionality which relies on Scopes use the information provided by ALib macro ALIB_CALLER. Changing this macro, might cause these mechanism to fail.
#define Log_Prune(...)
 
#define Log_SetSourcePathTrimRule(...)
 
#define Log_ClearSourcePathTrimRules(...)
 
#define Log_AddDebugLogger()
 
#define Log_RemoveDebugLogger()
 
#define Log_GetLogger(identifier, name)
 
#define Log_RemoveLogger(logger)
 
#define Log_SetDomain(...)
 
#define Log_RemoveThreadDomain(...)
 
#define Log_SetDomainSubstitutionRule(...)
 
#define Log_SetVerbosity(...)
 
#define Log_SetStartTime(...)
 
#define Log_MapThreadName(...)
 
#define Log_LogState(...)
 
#define Log_Verbose(...)
 
#define Log_Info(...)
 
#define Log_Warning(...)
 
#define Log_Error(...)
 
#define Log_Assert(...)
 
#define Log_If(...)
 
#define Log_Once(...)
 
#define Log_Entry(...)
 
#define Log_SetPrefix(...)
 
#define Log_Store(...)
 
#define Log_Retrieve(data, ...)
 
#define Log_IsActive(result, ...)
 
#define Log_Exception(...)
 

ALox Macros For Release Logging

The macros listed here, are provided to place release Log Statements within source code using module ALox. Besides that, macros controlling and setting preferences for ALox exists.

The exclusive use of these macros should be sufficient to support most of common release logging statements with ALox. Should some functionality be not available easily using the macros, of course, the normal C++ API of ALox can be used in parallel to using the macros. Code that is using the C++ API might be enclosed by preprocessor directives

#if ALOX_REL_LOG
   ...
   ...
#endif

to remove them when compiling a release version of the software unit with pruned release log macros. Alternatively, such code might be embedded in macro Lox_Prune. (Pruning of release logging can be enabled by defining the compiler-symbol ALOX_REL_LOG to 0 and could be useful in certain situations.)

Before using the macros, each code entity has to set the preprocessor macro LOX_LOX This can be done in a general header-file of the software, (e.g., the same that exposes the release-Lox object to that source), or, in more complex scenarios with more than one release-Lox object, at any other appropriate source location.

All macro names are prefixed with the term Lox_. This implies that they are macros to implement release logging. In contrast to this, a set of similar macros exists for debug logging (see debug logging macros). Those are prefixed Log_.

Note
The choice of the prefixes Log_ and Lox_ was made to provide maximum source code compatibility of ALox for C++ log lines in comparison to other ALox implementations in other programming languages, which provide a class Log as a kind of 'mirror' class of class Lox. Invocations to class Log get pruned in these languages.

Most macros make use of the macro LOX_LOX, which references a singleton object of class Lox that is used for all release logging. This singleton concept covers most uses cases for release logging. If more flexibility is wanted, then either the macro LOX_LOX might be changed for different compilation units or the ALox C++ API might be used instead of the macros listed here.

#define Lox_Prune(...)
 
#define Lox_SetSourcePathTrimRule(...)
 
#define Lox_ClearSourcePathTrimRules(...)
 
#define Lox_GetLogger(identifier, name)
 
#define Lox_RemoveLogger(logger)
 
#define Lox_SetDomain(...)
 
#define Lox_RemoveThreadDomain(...)
 
#define Lox_SetDomainSubstitutionRule(...)
 
#define Lox_SetVerbosity(...)
 
#define Lox_SetStartTime(...)
 
#define Lox_MapThreadName(...)
 
#define Lox_LogState(...)
 
#define Lox_Verbose(...)
 
#define Lox_Info(...)
 
#define Lox_Warning(...)
 
#define Lox_Error(...)
 
#define Lox_Assert(...)
 
#define Lox_If(...)
 
#define Lox_Once(...)
 
#define Lox_Entry(...)
 
#define Lox_Store(...)
 
#define Lox_Retrieve(data, ...)
 
#define Lox_SetPrefix(...)
 
#define Lox_IsActive(result, ...)
 
#define Lox_Exception(...)
 

ALox Low level Macros

The preprocessor macros listed here are the foundation for debug logging and release logging macros introduced below.

Developers that use ALox in standard use cases do not need to know and use the macros listed here.

#define LOG_LOX   (*alib::lox::Log::Get())
 
#define LOX_LOX
 
#define LOG_CI   ALIB_CALLER
 
#define LOX_CI   ALIB_CALLER
 
#define LOG_ACQUIRE   { alib::lox::Lox& _log= LOG_LOX; _log.Acquire( LOG_CI );
 
#define LOG_RELEASE   _log.Release(); }
 
#define LOX_ACQUIRE   { alib::lox::Lox& _lox= LOX_LOX; _lox.Acquire( LOX_CI );
 
#define LOX_RELEASE   _lox.Release(); }
 

ALib Module Boxing

The macros in this section are introduced by module ALib Boxing.

#define ALIB_BOXING_CUSTOMIZE(TSource, TMapped, ...)
 
#define ALIB_BOXING_CUSTOMIZE_TYPE_MAPPING(TSource, TMapped)
 
#define ALIB_BOXING_CUSTOMIZE_NOT_UNBOXABLE(TSource, TMapped)
 
#define ALIB_BOXING_CUSTOMIZE_ARRAY_TYPE(TSource, TElement, ...)
 
#define ALIB_BOXING_CUSTOMIZE_ARRAY_TYPE_NON_UNBOXABLE(TSource, TElement, ...)
 
#define ALIB_BOXING_CUSTOMIZE_DENY_BOXING(TSource)
 
#define ALIB_BOXING_VTABLE_DECLARE(TMapped, Identifier)
 
#define ALIB_BOXING_VTABLE_DECLARE_ARRAYTYPE(TMapped, Identifier)
 
#define ALIB_BOXING_VTABLE_DEFINE(TMapped, Identifier)
 
#define ALIB_BOXING_VTABLE_DEFINE_ARRAYTYPE(TMapped, Identifier)
 
#define ALIB_BOXING_BOOTSTRAP_VTABLE_DBG_REGISTER(Identifier)
 
#define ALIB_BOXING_DEFINE_FEQUALS_FOR_COMPARABLE_TYPE(TComparable)
 
#define ALIB_BOXING_DEFINE_FISLESS_FOR_COMPARABLE_TYPE(TComparable)
 
#define ALIB_BOXING_BOOTSTRAP_REGISTER_FAPPEND_FOR_APPENDABLE_TYPE(TAppendable)
 
#define ALIB_BOXING_BOOTSTRAP_REGISTER_FAPPEND_FOR_APPENDABLE_TYPE_N(TAppendable)
 
#define ALIB_BOXING_BOOTSTRAP_REGISTER_FAPPEND_FOR_APPENDABLE_TYPE_W(TAppendable)
 
#define ALIB_BOXING_BOOTSTRAP_REGISTER_FAPPEND_FOR_APPENDABLE_TYPE_X(TAppendable)
 
#define ALIB_BOXING_VTABLE_DECLARE_NOEXPORT(TMapped, Identifier)
 
#define ALIB_BOXING_VTABLE_DECLARE_ARRAYTYPE_NOEXPORT(TMapped, Identifier)
 

ALib Module Characters

The macros in this section are introduced by module ALib Characters.

#define A_CHAR(STR)
 
#define A_CCHAR(STR)
 
#define A_SCHAR(STR)
 
#define A_NCHAR(STR)
 
#define A_WCHAR(STR)
 
#define A_XCHAR(STR)
 
#define ALIB_CHAR_TYPE_ID_N   1
 
#define ALIB_CHAR_TYPE_ID_W   2
 
#define ALIB_CHAR_TYPE_ID_X   3
 
#define ALIB_CHAR_TYPE_ID_CHARACTER
 
#define ALIB_CHAR_TYPE_ID_COMPLEMENT
 
#define ALIB_CHAR_TYPE_ID_STRANGE
 
#define ALIB_CHARACTER_ARRAY( T, TChar, Access, Construction)
 
#define ALIB_CHARACTER_ARRAY_MUTABLE( T, TChar, Construction)
 
#define ALIB_CHARACTER_ZT_ARRAY( T, TChar, Access, Construction)
 
#define ALIB_CHARACTER_ZT_ARRAY_MUTABLE(T, TChar, Construction)
 
#define ALIB_CHARACTER_ARRAY_IMPL_BUFFER( T, TChar, ...)
 
#define ALIB_CHARACTER_ZT_ARRAY_IMPL_BUFFER( T, TChar, ...)
 
#define ALIB_CHARACTER_ARRAY_IMPL_BUFFER_MUTABLE( T, TChar, ...)
 
#define ALIB_CHARACTER_ZT_ARRAY_IMPL_BUFFER_MUTABLE(T, TChar, ...)
 
#define ALIB_CHARACTER_ARRAY_IMPL_LENGTH( T, TChar, ...)
 
#define ALIB_CHARACTER_ZT_ARRAY_IMPL_LENGTH( T, TChar, ...)
 
#define ALIB_CHARACTER_ARRAY_IMPL_LENGTH_MUTABLE( T, TChar, ...)
 
#define ALIB_CHARACTER_ZT_ARRAY_IMPL_LENGTH_MUTABLE(T, TChar, ...)
 
#define ALIB_CHARACTER_ARRAY_IMPL_CONSTRUCT( T, TChar, ...)
 
#define ALIB_CHARACTER_ZT_ARRAY_IMPL_CONSTRUCT( T, TChar, ...)
 

ALib Module Config

The macros in this section are introduced by ALib Camp ALib Variables.

#define ALIB_VARIABLES_DEFINE_TYPE(Namespace, CPPName, CfgTypeString)
 
#define ALIB_VARIABLES_DEFINE_TYPE_WITH_POOL_CONSTRUCTOR(Namespace, CPPName, CfgTypeString)
 
#define ALIB_VARIABLES_REGISTER_TYPE(CPPName)
 

ALib Module Enums

The macros in this section are introduced by modules ALib EnumOps and ALib EnumRecords. They allow specializing the following type traits for scoped or non-scoped enum types: RecordsTraits, ArithmeticalTraits, BitwiseTraits and IterableTraits

Attention
  • All macros in this section have to be placed in global scope (outside namespaces and types).
  • For technical reasons, neither the macros nor the concepts behind them are applicable to enum types that are defined as private or protected inner types of structs or classes.
#define ALIB_ENUMS_ASSIGN_RECORD(TEnum, TRecord)
 
#define ALIB_ENUMS_MAKE_ARITHMETICAL(TEnum)
 
#define ALIB_ENUMS_MAKE_BITWISE(TEnum)
 
#define ALIB_ENUMS_MAKE_ITERABLE(TEnum, StopElement)
 
#define ALIB_ENUMS_MAKE_ITERABLE_BEGIN_END(TEnum, StartElement, StopElement)
 

ALib Module Expressions

The macros in this section are introduced by module ALib Expressions.

#define CALCULUS_CALLBACK(func)
 
#define CALCULUS_DEFAULT_AUTOCAST   nullptr, nullptr
 
#define CALCULUS_SIGNATURE(BoxPointerArray)
 

ALib Module Strings

The macros in this section are introduced by module ALib Strings.

#define ALIB_STRINGS_APPENDABLE_TYPE(TYPE)
 
#define ALIB_STRINGS_APPENDABLE_TYPE_N(TYPE)
 
#define ALIB_STRINGS_APPENDABLE_TYPE_W(TYPE)
 
#define ALIB_STRINGS_APPENDABLE_TYPE_DEF(TYPE, IMPL)
 
#define ALIB_STRINGS_APPENDABLE_TYPE_DEF_N(TYPE, IMPL)
 
#define ALIB_STRINGS_APPENDABLE_TYPE_DEF_W(TYPE, IMPL)
 
#define ALIB_STRINGS_APPENDABLE_TYPE_INLINE(TYPE, IMPL)
 
#define ALIB_STRINGS_APPENDABLE_TYPE_INLINE_N(TYPE, IMPL)
 
#define ALIB_STRINGS_APPENDABLE_TYPE_INLINE_W(TYPE, IMPL)
 
#define ALIB_STRINGS_SUPPRESS_STD_OSTREAM_OPERATOR(TYPE)
 
#define ALIB_STRING_DBG_CHK(instance)
 
#define ALIB_STRINGS_TO_NARROW( src, dest, bufSize)
 
#define ALIB_STRINGS_FROM_NARROW( src, dest, bufSize)
 
#define ALIB_STRINGS_TO_NARROW_ARG( src, bufSize)
 
#define ALIB_STRINGS_FROM_NARROW_ARG( src, bufSize)
 
#define ALIB_STRINGS_TO_WIDE( src, dest, bufSize)
 
#define ALIB_STRINGS_FROM_WIDE( src, dest, bufSize)
 
#define ALIB_STRINGS_TO_WIDE_ARG( src, bufSize)
 
#define ALIB_STRINGS_FROM_WIDE_ARG( src, bufSize)
 
#define ALIB_STRING_RESETTER(astring)
 

ALib Module Threads

While macros in this section logically belong to module ALib Threads, they are available (but empty) also when this module is not included in the ALib Build. An explanation to this is given with chapter 1.2 Threading-Agnostic Software of this module's Programmer's Manual.

Their definition depends on the setting of ALIB_DEBUG_CRITICAL_SECTIONS, which defaults to 1, in case module ALib Threads is included in the ALib Build.

If the symbol is not set, all the symbols in this section are empty.

#define ALIB_LOCK   ALIB_OWN(*this)
 
#define ALIB_LOCK_WITH(lock)
 
#define ALIB_LOCK_RECURSIVE   ALIB_OWN_RECURSIVE(*this)
 
#define ALIB_LOCK_RECURSIVE_WITH(lock)
 
#define ALIB_LOCK_SHARED   ALIB_OWN_SHARED(*this)
 
#define ALIB_LOCK_SHARED_WITH(lock)
 
#define ALIB_DCS   ALIB_OWN(*this)
 
#define ALIB_DCS_WITH(CS)
 
#define ALIB_DCS_SHARED   ALIB_OWN_SHARED(*this)
 
#define ALIB_DCS_SHARED_WITH(CS)
 
#define ALIB_DCS_ACQUIRE   Acquire(ALIB_CALLER);
 
#define ALIB_DCS_ACQUIRE_WITH(CS)
 
#define ALIB_DCS_ACQUIRE_SHARED   AcquireShared(ALIB_CALLER);
 
#define ALIB_DCS_ACQUIRE_SHARED_WITH(CS)
 
#define ALIB_DCS_RELEASE   Release(ALIB_CALLER);
 
#define ALIB_DCS_RELEASE_WITH(CS)
 
#define ALIB_DCS_RELEASE_SHARED   ReleaseShared(ALIB_CALLER);
 
#define ALIB_DCS_RELEASE_SHARED_WITH(CS)
 

ALib Module Basecamp

The macros in this section are introduced by modle ALib Resources.

#define ALIB_RESOURCED(T, ResPool, ResCategory, ResName)
 
#define ALIB_RESOURCED_IN_MODULE(T, Camp, ResName)
 
#define A_PATH(literal)
 
#define ALIB_PATH_TO_NARROW( src, dest, bufSize)
 
#define ALIB_PATH_TO_NARROW_ARG( src, bufSize)
 
#define ALIB_PATH_TO_STRING( src, dest, bufSize)
 
#define ALIB_PATH_TO_STRING_ARG( src, bufSize)
 
#define ALIB_STRING_TO_PATH( src, dest, bufSize)
 
#define ALIB_STRING_TO_PATH_ARG( src, bufSize)
 

Macro Definition Documentation

◆ A_CCHAR

#define A_CCHAR ( STR)

Macro used to express C++ string literals in a platform-independent way. Dependent on the definition of type complementChar (which is in turn dependent on the platform, the compiler and optional compiler-symbols), this macro defines string literals, which have either a one, two or four byte character width, namely the width corresponding to the width of complementChar.

See also
Sibling macro A_CHAR for more information. Further sibling macros are A_SCHAR, A_NCHAR, A_WCHAR and A_XCHAR.
Details are described in chapter 3.3 Characters And String Literals of the Programmer's Manual of module ALib Characters.
Parameters
STRThe character or string literal to eventually prefix with 'u', 'U' or 'L' .

Definition at line 13 of file prepro_macros.md.

◆ A_CHAR

#define A_CHAR ( STR)

Macro used to express C++ character and string literals in a platform-independent way. Dependent on code selection symbols ALIB_CHARACTERS_WIDE and eventually ALIB_CHARACTERS_NATIVE_WCHAR, this macro possibly prepends character 'L', 'u' or 'U' to the character or string literal given with parameter STR.

Whenever software targets different platforms that change the underlying character width of the string-types, the string literals have to change as well. To be able to compile on different platforms while using different compiler-symbols to manipulate the character width, almost all string literals in ALib sources are enclosed by this macro. The exception concerns such literals which are assigned to narrow string type NString, or those where explicit string types WString or XString are used.

Note
To avoid too much code clutter, this macro, as well as its siblings A_CCHAR, A_SCHAR, A_NCHAR, A_WCHAR and A_XCHAR, have an abbreviated name, as they are quite frequently used. (According to the ALib naming scheme, the macros would be prefixed with "ALIB_CHARACTERS_")
See also
For more information, consult chapter 3.3 Characters And String Literals of the Programmer's Manual of module ALib Characters.
Parameters
STRThe character or string literal to be eventually prefix with 'L', 'u' or 'U'.

Definition at line 11 of file prepro_macros.md.

◆ A_NCHAR

#define A_NCHAR ( STR)

This is an "ident macro" that just produces the given parameter STR. It is provided only for completeness. ALib does not use this macro internally, as string literals that are not surrounded by one of the character literal macros are very well identifiable as narrow literals.

See also
Sibling macro A_CHAR for more information. Further sibling macros are A_CCHAR, A_SCHAR, A_WCHAR and A_XCHAR.
Details are described in chapter 3.3 Characters And String Literals of the Programmer's Manual of module ALib Characters.
Parameters
STRThe character or string literal that is returned as is.

Definition at line 14 of file prepro_macros.md.

◆ A_PATH

#define A_PATH ( literal)
Value:
L##literal

Macro used to define Path-string literals in a platform-independent way. Similar to macro A_CHAR, but dependent on the character type defined by the C++ standard library with type std::filesystem::path::value_type.
This is usually single-byte characters, and only on Windows OS, prefix 'L' is added.

See also
Compilation symbol ALIB_PATH_CHARACTERS_WIDE.
Parameters
literalThe string literal to be eventually prefix with 'L'.

Definition at line 30 of file system.prepro.hpp.

◆ A_SCHAR

#define A_SCHAR ( STR)

Macro used to express C++ string literals in a platform-independent way. Dependent on the definition of type strangeChar (which is in turn dependent on the platform, the compiler and optional compiler-symbols), this macro defines string literals, which have either a two or four byte character width, namely the width corresponding to the width of complementChar.

Note
The same as type strangeChar is always equivalent to type xchar, this macro is always equivalent to macro A_XCHAR.
See also
Sibling macro A_CHAR for more information. Further sibling macros are A_CCHAR, A_NCHAR, A_WCHAR and A_XCHAR.
Details are described in chapter 3.3 Characters And String Literals of the Programmer's Manual of module ALib Characters.
Parameters
STRThe character or string literal to prefix with 'u', 'U' or 'L' .

Definition at line 12 of file prepro_macros.md.

◆ A_WCHAR

#define A_WCHAR ( STR)

Macro used to express C++ string literals in a platform-independent way. Dependent on the definition of type wchar (which is in turn dependent on the platform, the compiler and optional compiler-symbols), this macro defines string literals, which have an either two bytes or four byte character width, namely the width corresponding to the width of wchar.

See also
Sibling macro A_CHAR for more information. Further sibling macros are A_CCHAR, A_SCHAR, A_NCHAR and A_XCHAR.
Details are described in chapter 3.3 Characters And String Literals of the Programmer's Manual of module ALib Characters.
Parameters
STRThe character or string literal to prefix with 'u', 'U' or 'L' .

Definition at line 15 of file prepro_macros.md.

◆ A_XCHAR

#define A_XCHAR ( STR)

Macro used to express C++ string literals in a platform-independent way. Dependent on the definition of type xchar (which is in turn dependent on the platform, the compiler and optional compiler-symbols), this macro defines string literals, which have an either two bytes or four byte character width, namely the width corresponding to the width of xchar.

Note
The same as type strangeChar is always equivalent to type xchar, this macro is always equivalent to macro A_SCHAR.
See also
Sibling macro A_CHAR for more information. Further sibling macros are A_CCHAR, A_SCHAR, A_NCHAR and A_WCHAR.
Details are described in chapter 3.3 Characters And String Literals of the Programmer's Manual of module ALib Characters.
Parameters
STRThe character or string literal to prefix with 'u', 'U' or 'L' .

Definition at line 16 of file prepro_macros.md.

◆ ALIB_ASSERT

#define ALIB_ASSERT ( cond,
domain )
Value:
{ if( !( cond)) ALIB_ERROR( domain, "Assertion Failed" ); }
#define ALIB_ERROR(domain,...)
Definition alib.inl:1045

If given condition is false, error message "Assertion Failed" is written.

Parameters
condThe condition assert.
domainThe domain of the assertion. (Usually the ALib Module.)

Definition at line 1048 of file alib.inl.

◆ ALIB_ASSERT_ERROR

#define ALIB_ASSERT_ERROR ( cond,
domain,
... )
Value:
{ ALIB_DEBUG_ASSERTION_PRINTABLES_DO(__VA_ARGS__) if( !( cond)) ALIB_ERROR( domain, __VA_ARGS__ ) }

If given condition is false, given message objects are written as an error.

Parameters
condThe condition assert.
domainThe domain of the assertion. (Usually the ALib Module.)
...The objects used to format the message string.

Definition at line 1049 of file alib.inl.

◆ ALIB_ASSERT_GLOBAL_NAMESPACE

#define ALIB_ASSERT_GLOBAL_NAMESPACE
Value:
struct ALibTestGlobalNamespace; \
static_assert(std::is_same<ALibTestGlobalNamespace, ::ALibTestGlobalNamespace>::value, \
"This is not the global namespace!");

If this macro is placed outside the global namespace, a static_assert is raised at compile time.

Definition at line 966 of file alib.inl.

◆ ALIB_ASSERT_MESSAGE

#define ALIB_ASSERT_MESSAGE ( cond,
domain,
... )
Value:
{ ALIB_DEBUG_ASSERTION_PRINTABLES_DO(__VA_ARGS__) if( !( cond)) ALIB_MESSAGE( domain, __VA_ARGS__ ) }
#define ALIB_MESSAGE(domain,...)
Definition alib.inl:1047

If given condition is false, given message objects are written as a message.

Parameters
condThe condition assert.
domainThe domain of the assertion. (Usually the ALib Module.)
...The objects used to format the message string.

Definition at line 1051 of file alib.inl.

◆ ALIB_ASSERT_MODULE

#define ALIB_ASSERT_MODULE ( modulename)
Value:
static_assert( ALIB_ ## modulename, \
"This module is not included in the ALib Build. " \
"See " ALIB_DOCUMENTATION_URL "alib_manual.html for more information" ); \
#define ALIB_DOCUMENTATION_URL
DOXYGEN.
Definition alib.inl:246

Asserts if a given module is included in the ALib Build.

Parameters
modulenameThe name of the module to assert as available.

Definition at line 248 of file alib.inl.

◆ ALIB_ASSERT_RESULT_EQUALS

#define ALIB_ASSERT_RESULT_EQUALS ( func,
value )
Value:
{ auto result= func; assert(result == value); ((void) result); }

Asserts that a return value of a function call equals the given expected value. In release compilation, the function is still invoked, but no check is performed.

Parameters
funcThe function to invoke.
valueThe value to test for.

Definition at line 1066 of file alib.inl.

◆ ALIB_ASSERT_RESULT_GREATER_THAN

#define ALIB_ASSERT_RESULT_GREATER_THAN ( func,
value )
Value:
{ auto result= func; assert(result > value); ((void) result); }

Asserts that a return value of a function call is greater than the given value. In release compilation, the function is still invoked, but no check is performed.

Parameters
funcThe function to invoke.
valueThe value to test for.

Definition at line 1068 of file alib.inl.

◆ ALIB_ASSERT_RESULT_LESS_THAN

#define ALIB_ASSERT_RESULT_LESS_THAN ( func,
value )
Value:
{ auto result= func; assert(result < value); ((void) result); }

Asserts that a return value of a function call is less than the given expected value. In release compilation, the function is still invoked, but no check is performed.

Parameters
funcThe function to invoke.
valueThe value to test for.

Definition at line 1069 of file alib.inl.

◆ ALIB_ASSERT_RESULT_NOT_EQUALS

#define ALIB_ASSERT_RESULT_NOT_EQUALS ( func,
value )
Value:
{ auto result= func; assert(result != value); ((void) result); }

Asserts that a return value of a function call is not equal to the given value. In release compilation, the function is still invoked, but no check is performed.

Parameters
funcThe function to invoke.
valueThe value to test for.

Definition at line 1067 of file alib.inl.

◆ ALIB_ASSERT_WARNING

#define ALIB_ASSERT_WARNING ( cond,
domain,
... )
Value:
{ ALIB_DEBUG_ASSERTION_PRINTABLES_DO(__VA_ARGS__) if( !( cond)) ALIB_WARNING( domain, __VA_ARGS__ ) }
#define ALIB_WARNING(domain,...)
Definition alib.inl:1046

If given condition is false, given message objects are written as a warning.

Parameters
condThe condition assert.
domainThe domain of the assertion. (Usually the ALib Module.)
...The objects used to format the message string.

Definition at line 1050 of file alib.inl.

◆ ALIB_BASE_DIR

#define ALIB_BASE_DIR

String containing the source folder of ALib. Used with unit tests.

Definition at line 34 of file prepro.md.

◆ ALIB_BOXING_BOOTSTRAP_REGISTER_FAPPEND_FOR_APPENDABLE_TYPE

#define ALIB_BOXING_BOOTSTRAP_REGISTER_FAPPEND_FOR_APPENDABLE_TYPE ( TAppendable)
Value:
void BootstrapRegister(typename TFDecl::Signature function)
Definition box.inl:1254
static void Appendable(const Box &self, strings::TAString< TChar, TAllocator > &target)

This macro registers templated box-function implementation FAppend::Appendable for the given type TAppendable.

The macro is to be placed in the bootstrap section of an application, for any type that is appendable to class AString.

This macro selects version box-function type FAppend<character>. If a custom type is appendable to two or three underlying character types of class AString, then macros

should be used. Note that for each character type of ALib Strings, a different box-function is registered.

Note
As by default, custom types get boxed as pointers, the type in question usually has to be provided here as pointer type, for example:
   ALIB_BOXING_BOOTSTRAP_REGISTER_FAPPEND_FOR_APPENDABLE_TYPE( my_namespace::MyType* )
Parameters
TAppendableThe appendable type.

Definition at line 155 of file boxing.prepro.hpp.

◆ ALIB_BOXING_BOOTSTRAP_REGISTER_FAPPEND_FOR_APPENDABLE_TYPE_N

#define ALIB_BOXING_BOOTSTRAP_REGISTER_FAPPEND_FOR_APPENDABLE_TYPE_N ( TAppendable)
Value:

Same as macro ALIB_BOXING_BOOTSTRAP_REGISTER_FAPPEND_FOR_APPENDABLE_TYPE but implements interface FAppend<nchar> instead of FAppend<character>.

Parameters
TAppendableThe appendable type.

Definition at line 159 of file boxing.prepro.hpp.

◆ ALIB_BOXING_BOOTSTRAP_REGISTER_FAPPEND_FOR_APPENDABLE_TYPE_W

#define ALIB_BOXING_BOOTSTRAP_REGISTER_FAPPEND_FOR_APPENDABLE_TYPE_W ( TAppendable)
Value:

Same as macro ALIB_BOXING_BOOTSTRAP_REGISTER_FAPPEND_FOR_APPENDABLE_TYPE but implements interface FAppend<wchar> instead of FAppend<character>.

Parameters
TAppendableThe appendable type.

Definition at line 163 of file boxing.prepro.hpp.

◆ ALIB_BOXING_BOOTSTRAP_REGISTER_FAPPEND_FOR_APPENDABLE_TYPE_X

#define ALIB_BOXING_BOOTSTRAP_REGISTER_FAPPEND_FOR_APPENDABLE_TYPE_X ( TAppendable)
Value:

Same as macro ALIB_BOXING_BOOTSTRAP_REGISTER_FAPPEND_FOR_APPENDABLE_TYPE but implements interface FAppend<xchar> instead of FAppend<character>.

Parameters
TAppendableThe appendable type.

Definition at line 167 of file boxing.prepro.hpp.

◆ ALIB_BOXING_BOOTSTRAP_VTABLE_DBG_REGISTER

#define ALIB_BOXING_BOOTSTRAP_VTABLE_DBG_REGISTER ( Identifier)
Value:
alib::boxing::debug::DbgRegisterVTable( &alib::boxing::detail::SNGLTN_ ## Identifier, \
void DbgRegisterVTable(detail::VTable *vtable, detail::VTable::DbgFactoryType productionType)
@ Static
A static VTable is in place.
Definition vtable.inl:268

Registers a statically created vtable singleton declared with either ALIB_BOXING_VTABLE_DECLARE or ALIB_BOXING_VTABLE_DECLARE_ARRAYTYPE.

This macro has to be placed in the bootstrap code of software. In debug-compilations, this macro is empty.

See also
Chapter 12.2 Optimizations With Static VTables of the Programmer's Manual of module ALib Boxing.
Parameters
IdentifierThe identifier name of the vtable singleton as passed to macros ALIB_BOXING_VTABLE_DECLARE or ALIB_BOXING_VTABLE_DECLARE_ARRAYTYPE.

Definition at line 142 of file boxing.prepro.hpp.

◆ ALIB_BOXING_CUSTOMIZE

#define ALIB_BOXING_CUSTOMIZE ( TSource,
TMapped,
... )
Value:
namespace alib::boxing { \
template<> struct BoxTraits<TSource> \
{ \
using Mapping= TMapped; \
static constexpr bool IsArray= false; \
__VA_ARGS__ \
}; } \

Macro used to specialize template struct BoxTraits, which customizes boxing for given boxable type TSource to be mapped to non-array type TMapped.

Type alias BoxTraits::Mapping is implemented by the macro to evaluate to TMapped>. The implementations of methods BoxTraits::Write and BoxTraits::Read are to be provided with the variadic macro arguments.

This macro belongs to set of sibling macros. For a customization of boxing the best suitable macro should be chosen. The set is

See also
For more information, consult chapter 7. Customizing Boxing of the Programmer's Manual of module ALib Boxing.
Parameters
TSourceThe C++ 'source' type to specialize struct BoxTraits for.
TMappedThe target type to map TSource to.
...Definition of static inline methods BoxTraits::Write and BoxTraits::Read.

Definition at line 42 of file boxing.prepro.hpp.

◆ ALIB_BOXING_CUSTOMIZE_ARRAY_TYPE

#define ALIB_BOXING_CUSTOMIZE_ARRAY_TYPE ( TSource,
TElement,
... )
Value:
namespace alib::boxing { \
template<> struct BoxTraits<TSource> \
{ \
using Mapping= TElement; \
static constexpr bool IsArray= true; \
__VA_ARGS__ \
}; }

Specializes template struct BoxTraits, to customize boxing for given boxable type TSource to be mapped to array type TMapped[].

Type definition BoxTraits::Mapping is implemented by the macro to evaluate to TMapped. The implementations of methods BoxTraits::Write and BoxTraits::Read are to be provided with the variadic macro arguments.

See also
Macro ALIB_BOXING_CUSTOMIZE for information about the sibling macros.
Parameters
TSourceThe C++ 'source' type to specialize struct BoxTraits for.
TElementThe element type of the array to map TSource to.
...Definition of static inline methods BoxTraits::Write and BoxTraits::Read.

Definition at line 51 of file boxing.prepro.hpp.

◆ ALIB_BOXING_CUSTOMIZE_ARRAY_TYPE_NON_UNBOXABLE

#define ALIB_BOXING_CUSTOMIZE_ARRAY_TYPE_NON_UNBOXABLE ( TSource,
TElement,
... )
Value:
namespace alib::boxing { \
template<> struct BoxTraits<TSource> \
{ using Mapping= TElement; \
static constexpr bool IsArray= true; \
__VA_ARGS__ \
static constexpr void Read( const Placeholder& box); \
}; }

Specializes template struct BoxTraits, to customize boxing for given boxable type TSource to be mapped to array type TMapped[].

Type definition BoxTraits::Mapping is implemented by the macro to evaluate to TMapped and BoxTraits::IsArray evaluates to true.
Static method BoxTraits::Read is declared to return void, with no implementation given (as it will not be called).
The implementation of method BoxTraits::Write is to be provided with the variadic portion of the macro arguments.

See also
Macro ALIB_BOXING_CUSTOMIZE for information about the sibling macros.
Parameters
TSourceThe C++ 'source' type to specialize struct BoxTraits for.
TElementThe element type of the array to map TSource to.
...Definition of static inline method BoxTraits::Write.

Definition at line 81 of file boxing.prepro.hpp.

◆ ALIB_BOXING_CUSTOMIZE_DENY_BOXING

#define ALIB_BOXING_CUSTOMIZE_DENY_BOXING ( TSource)
Value:
namespace alib::boxing { \
template<> struct BoxTraits<TSource> \
{ using Mapping= NotBoxableTag; \
static constexpr bool IsArray= false; \
static constexpr void Write( Placeholder& box, TSource const & value ); \
static constexpr void Read ( const Placeholder& box); \
}; }

Specializes template struct BoxTraits, to completely forbid boxing and unboxing of type TSource.

For this, type definition BoxTraits::Mapping is implemented by the macro to evaluate to TMapped and just declarations of static methods BoxTraits::Write and BoxTraits::Read are given.
The latter is declared to return void. Note that this in principle is not necessary because using NotBoxableTag already forbids unboxing. Nevertheless, this way concept IsLocked is satisfied for TSource as well.

See also
Macro ALIB_BOXING_CUSTOMIZE for information about the sibling macros.
Parameters
TSourceThe type that should be denied to be used with ALib Boxing.

Definition at line 91 of file boxing.prepro.hpp.

◆ ALIB_BOXING_CUSTOMIZE_NOT_UNBOXABLE

#define ALIB_BOXING_CUSTOMIZE_NOT_UNBOXABLE ( TSource,
TMapped )
Value:
namespace alib::boxing { \
template<> struct BoxTraits<TSource> \
{ using Mapping= TMapped; \
static constexpr bool IsArray= false; \
static constexpr void Write( Placeholder& box, TSource const & value ) { box.Write( static_cast<TMapped>( value ) ); } \
static constexpr void Read( const Placeholder& box); \
}; }

Specializes template struct BoxTraits. This version of a set of sibling macros, is to be used when a simple type mapping is to be performed for types TSource that are statically castable to TMapped.
In contrast to macro ALIB_BOXING_CUSTOMIZE_TYPE_MAPPING, with this macro, unboxing the source type is denied.

The macro provides the implementations of all three entities of the type trait BoxTraits:

  • Type Mapping evaluates to using TMapped.
  • Static method Write performs a static cast of the source value to the destination type and then passes the result to Placeholder::Write.
  • Static method BoxTraits::Read is declared to return void, with no implementation given.
See also
Macro ALIB_BOXING_CUSTOMIZE for information about the sibling macros.
Parameters
TSourceThe C++ 'source' type to specialize struct BoxTraits for.
TMappedThe target type to map TSource to.

Definition at line 71 of file boxing.prepro.hpp.

◆ ALIB_BOXING_CUSTOMIZE_TYPE_MAPPING

#define ALIB_BOXING_CUSTOMIZE_TYPE_MAPPING ( TSource,
TMapped )
Value:
namespace alib::boxing { \
template<> struct BoxTraits<TSource> \
{ using Mapping= TMapped; \
static constexpr bool IsArray= false; \
static constexpr void Write( Placeholder& box, TSource const & value ) { box.Write( static_cast<TMapped>( value ) ); } \
static constexpr TSource Read (const Placeholder& box) { return static_cast<TSource>(box.Read<TMapped>()); } \
}; }

Specializes template struct BoxTraits. This version of a set of sibling macros, is to be used when simple type mappings are to be performed between types that are statically castable, or when boxing as pointer should be enforced.

The macro provides the implementations of all three entities of the type trait BoxTraits:

See also
Macro ALIB_BOXING_CUSTOMIZE for information about the sibling macros.
Parameters
TSourceThe C++ 'source' type to specialize struct BoxTraits for.
TMappedThe target type to map TSource to.

Definition at line 61 of file boxing.prepro.hpp.

◆ ALIB_BOXING_DEFINE_FEQUALS_FOR_COMPARABLE_TYPE

#define ALIB_BOXING_DEFINE_FEQUALS_FOR_COMPARABLE_TYPE ( TComparable)
Value:

This macro registers templated box-function FEquals::ComparableTypes for given mapped type TComparable.

If a type is boxed as pointer type, then TComparable has to be given as pointer type. For comparison, the unboxed pointers will be dereferenced. If both are nulled, true is returned, if one is nulled, false.

As all function registrations have to be performed at run-time, this macro is to be placed in the bootstrap section of an application.

Parameters
TComparableThe comparable type name.

Definition at line 149 of file boxing.prepro.hpp.

◆ ALIB_BOXING_DEFINE_FISLESS_FOR_COMPARABLE_TYPE

#define ALIB_BOXING_DEFINE_FISLESS_FOR_COMPARABLE_TYPE ( TComparable)
Value:

This macro registers templated box-function FIsLess::ComparableTypes for given type TComparable.

If a type is boxed as pointer type, then TComparable has to be given as pointer type. For comparison, the unboxed pointers will be dereferenced. If both are nulled, false is returned, if only lhs is nulled, true and if only rhs is nulled, then false.

As all function registrations have to be performed at run-time, this macro is to be placed in the bootstrap section of an application.

Parameters
TComparableThe comparable type name.

Definition at line 152 of file boxing.prepro.hpp.

◆ ALIB_BOXING_VTABLE_DECLARE

#define ALIB_BOXING_VTABLE_DECLARE ( TMapped,
Identifier )
Value:
ALIB_EXPORT namespace alib::boxing { namespace detail { \
extern ALIB_DLL VTable SNGLTN_ ## Identifier; } \
template<> struct VTableOptimizationTraits< TMapped, false > { \
static constexpr detail::VTable* Get() { return &detail:: SNGLTN_ ## Identifier; } }; } \
#define ALIB_DLL
Definition alib.inl:496
#define ALIB_EXPORT
Definition alib.inl:488

Declares an extern object of type VTable named Identifier in namespace alib::boxing::detail.
Furthermore specializes the type trait VTableOptimizationTraits for mapped type TMapped to have its method Get return the extern VTable-instance.

This macro has to be placed in a header included by each compilation unit that creates or accesses boxes of type TMapped.

See also
Parameters
TMappedThe mapped type to declare a vtable singleton for.
IdentifierThe identifier name of the vtable singleton.

Definition at line 101 of file boxing.prepro.hpp.

◆ ALIB_BOXING_VTABLE_DECLARE_ARRAYTYPE

#define ALIB_BOXING_VTABLE_DECLARE_ARRAYTYPE ( TMapped,
Identifier )
Value:
ALIB_EXPORT namespace alib::boxing { namespace detail { \
extern ALIB_DLL VTable SNGLTN_ ## Identifier; } \
template<> struct VTableOptimizationTraits< TMapped, true > { \
static constexpr detail::VTable* Get() { return &detail:: SNGLTN_ ## Identifier;} }; } \

Same as ALIB_BOXING_VTABLE_DECLARE, but used with mapped array types. Specializes VTableOptimizationTraits for mapped type TMapped.

See also
Macros ALIB_BOXING_VTABLE_DECLARE (for plain types), ALIB_BOXING_VTABLE_DEFINE, ALIB_BOXING_VTABLE_DEFINE and ALIB_BOXING_BOOTSTRAP_VTABLE_DBG_REGISTER.
Parameters
TMappedThe mapped type to declare a vtable singleton for.
IdentifierThe identifier name of the vtable singleton.

Definition at line 107 of file boxing.prepro.hpp.

◆ ALIB_BOXING_VTABLE_DECLARE_ARRAYTYPE_NOEXPORT

#define ALIB_BOXING_VTABLE_DECLARE_ARRAYTYPE_NOEXPORT ( TMapped,
Identifier )
Value:
namespace alib::boxing { namespace detail { \
extern ALIB_DLL VTable SNGLTN_ ## Identifier; } \
template<> struct VTableOptimizationTraits< TMapped, true > { \
static constexpr detail::VTable* Get() { return &detail:: SNGLTN_ ## Identifier;} }; } \

This is an experimental version of ALIB_BOXING_VTABLE_DECLARE_ARRAYTYPE, which has to be used, if:

  • Symbol ALIB_C20_MODULES is set with compiling ALib, and
  • the using code does not itself compile into C++20 Modules (just consuming them). The difference to the original is that symbol ALIB_EXPORT is not used with this version.
Parameters
TMappedThe mapped type to declare a vtable singleton for.
IdentifierThe identifier name of the vtable singleton.

Definition at line 119 of file boxing.prepro.hpp.

◆ ALIB_BOXING_VTABLE_DECLARE_NOEXPORT

#define ALIB_BOXING_VTABLE_DECLARE_NOEXPORT ( TMapped,
Identifier )
Value:
namespace alib::boxing { namespace detail { \
extern ALIB_DLL VTable SNGLTN_ ## Identifier; } \
template<> struct VTableOptimizationTraits< TMapped, false > { \
static constexpr detail::VTable* Get() { return &detail:: SNGLTN_ ## Identifier; } }; } \

This is an experimental version of ALIB_BOXING_VTABLE_DECLARE, which has to be used, if:

  • Symbol ALIB_C20_MODULES is set with compiling ALib, and
  • the using code does not itself compile into C++20 Modules (just consuming them). The difference to the original is that symbol ALIB_EXPORT is not used with this version.
Parameters
TMappedThe mapped type to declare a vtable singleton for.
IdentifierThe identifier name of the vtable singleton.

Definition at line 113 of file boxing.prepro.hpp.

◆ ALIB_BOXING_VTABLE_DEFINE

#define ALIB_BOXING_VTABLE_DEFINE ( TMapped,
Identifier )
Value:
alib::boxing::detail::VTable alib::boxing::detail::SNGLTN_ ## Identifier \
( typeid(TMapped), typeid(void) , \
std::is_pointer<TMapped>::value \
? VTable::MappingType::Pointer \
: std::is_enum<TMapped>::value \
? VTable::MappingType::Enum \
: VTable::MappingType::Value , \
constexpr unsigned int SizeTraits
The custom function hash.
Definition vtable.inl:227

Defines the external object declared with ALIB_BOXING_VTABLE_DECLARE.

This macro has to be placed in a compilation unit.

Parameters
TMappedThe mapped type to define a vtable singleton for.
IdentifierThe identifier name of the vtable singleton.

Definition at line 126 of file boxing.prepro.hpp.

◆ ALIB_BOXING_VTABLE_DEFINE_ARRAYTYPE

#define ALIB_BOXING_VTABLE_DEFINE_ARRAYTYPE ( TMapped,
Identifier )
Value:
alib::boxing::detail::VTable alib::boxing::detail::SNGLTN_ ## Identifier \
(typeid(TMapped[1]) , typeid(TMapped), VTable::MappingType(sizeof(TMapped)), sizeof(Placeholder)); \

Defines the external object declared with ALIB_BOXING_VTABLE_DECLARE_ARRAYTYPE.

This macro has to be placed in a compilation unit.

Parameters
TMappedThe mapped type to define a vtable singleton for.
IdentifierThe identifier name of the vtable singleton.

Definition at line 136 of file boxing.prepro.hpp.

◆ ALIB_CALLER

#define ALIB_CALLER   {__FILE__,__LINE__,ALIB_CALLER_FUNC,::std::this_thread::get_id(),&typeid(*this)}

This macro fills in the built-in compiler-symbols that provide the current source file, line number and function strings.

The macro should be used anywhere where this information is passed (as a nested macro in debug macros)

See also
Chapter A.5 Collecting Caller Information of the General Programmer's Manual.

Definition at line 1001 of file alib.inl.

◆ ALIB_CALLER_FUNC

#define ALIB_CALLER_FUNC   __FUNCTION__

Used by macro ALIB_CALLER to retrieve the compiler-specific preprocessor variable of the current function name. With MSVC evaluates to __FUNCTION__, with other compilers to __func__.

Definition at line 995 of file alib.inl.

◆ ALIB_CALLER_NULLED

#define ALIB_CALLER_NULLED   ALIB_CALLER

In debug-builds this macro is the same as ALIB_CALLER. Otherwise evaluates to {nullptr,0,nullptr,::std::thread::id(), nullptr}.
In comparison to ALIB_CALLER_PRUNED, this macro is to be used with invocations of methods that keep the corresponding parameters in release compilations.

Note
If methods keep the parameter, then a user can decide if caller information should be included in release-builds or not by either using ALIB_CALLER or this macro.

Definition at line 1010 of file alib.inl.

◆ ALIB_CALLER_NULLED_COMMA

#define ALIB_CALLER_NULLED_COMMA   ALIB_CALLER ,

Same as ALIB_CALLER_NULLED, but adds a ','
This is needed if the caller information is followed by (non-debug) arguments in a call. The latter is usually avoided but necessary when default values for the next argument should be given.

Definition at line 1012 of file alib.inl.

◆ ALIB_CALLER_PRUNED

#define ALIB_CALLER_PRUNED   ALIB_CALLER

This macro is the same as ALIB_CALLER but empty if ALIB_DEBUG is not defined.
In comparison to ALIB_CALLER_NULLED, this macro is to be used with invocations of methods that lack the corresponding parameters in release compilations.

Definition at line 1007 of file alib.inl.

◆ ALIB_CALLER_PRUNED_COMMA

#define ALIB_CALLER_PRUNED_COMMA   ALIB_CALLER ,

Same as ALIB_CALLER_PRUNED, but adds a ','
This is needed if the caller information is followed by (non-debug) arguments in a call. The latter is usually avoided but necessary when default values for the next argument should be given.

Definition at line 1009 of file alib.inl.

◆ ALIB_CHAR_TYPE_ID_CHARACTER

#define ALIB_CHAR_TYPE_ID_CHARACTER

Defined as ALIB_CHAR_TYPE_ID_N or ALIB_CHAR_TYPE_ID_W, depending symbol ALIB_CHARACTERS_WIDE.

Definition at line 117 of file chartypes.inl.

◆ ALIB_CHAR_TYPE_ID_COMPLEMENT

#define ALIB_CHAR_TYPE_ID_COMPLEMENT

Defined as ALIB_CHAR_TYPE_ID_N or ALIB_CHAR_TYPE_ID_W, depending symbol ALIB_CHARACTERS_WIDE.

Definition at line 118 of file chartypes.inl.

◆ ALIB_CHAR_TYPE_ID_N

#define ALIB_CHAR_TYPE_ID_N   1

Defined as 1. Used in situations where code is to be selected by the preprocessor. The rationale here is, that the preprocessor can only choose code depending on integral values and not on string contents.

Definition at line 1248 of file alib.inl.

◆ ALIB_CHAR_TYPE_ID_STRANGE

#define ALIB_CHAR_TYPE_ID_STRANGE

Defined as ALIB_CHAR_TYPE_ID_X.

ALIB_CHARACTERS_WIDE

Definition at line 119 of file chartypes.inl.

◆ ALIB_CHAR_TYPE_ID_W

#define ALIB_CHAR_TYPE_ID_W   2

Defined as 2. Used in situations where code is to be selected by the preprocessor. The rationale here is, that the preprocessor can only choose code depending on integral values and not on string contents.

Definition at line 1249 of file alib.inl.

◆ ALIB_CHAR_TYPE_ID_X

#define ALIB_CHAR_TYPE_ID_X   3

Defined as 3. Used in situations where code is to be selected by the preprocessor. The rationale here is, that the preprocessor can only choose code depending on integral values and not on string contents.

Definition at line 1250 of file alib.inl.

◆ ALIB_CHARACTER_ARRAY

#define ALIB_CHARACTER_ARRAY ( T,
TChar,
Access,
Construction )
Value:
ALIB_CHARACTER_ARRAY_internal( , T, TChar, const, Access , Construction )

Specializes the type trait ArrayTraits for type T.

To implement the corresponding static methods in alignment with the specialized access and construction flags, macros ALIB_CHARACTER_ARRAY_IMPL_BUFFER, ALIB_CHARACTER_ARRAY_IMPL_LENGTH and ALIB_CHARACTER_ARRAY_IMPL_CONSTRUCT are proposed to be used.

See also
For more information about character array traits, see chapter 4. Character Arrays of the Programmer's Manual of module ALib Characters.
Parameters
TThe type to provide array type-traits for.
TCharThe character type of character arrays that T represents or might be created of.
AccessOne of the values NONE, Implicit or ExplicitOnly. Value Mutable is not permitted. Instead, macro ALIB_CHARACTER_ARRAY_MUTABLE is to be used for that case.
ConstructionOne of the values NONE, Implicit or ExplicitOnly.

Definition at line 1265 of file alib.inl.

◆ ALIB_CHARACTER_ARRAY_IMPL_BUFFER

#define ALIB_CHARACTER_ARRAY_IMPL_BUFFER ( T,
TChar,
... )
Value:
const TChar* ArrayTraits<T,TChar>::Buffer(T const& src ) { __VA_ARGS__ }

This macro may be used to implement static method ArrayTraits::Buffer of specializations of ArrayTraits that have been defined using macro ALIB_CHARACTER_ARRAY.

If macro ALIB_CHARACTER_ARRAY_MUTABLE was used, corresponding macro ALIB_CHARACTER_ARRAY_IMPL_BUFFER_MUTABLE has to be used instead of this one.

The argument providing a constant reference of type T to the method's implementation, and which has to be accessed in the given implementation code, is named src. The implementation has to return a constant pointer to an array of character type TChar.

Parameters
TThe type to provide the specialized static method for.
TCharThe character type of character arrays that T represents or might be created of.
...The variadic arguments of the macro constitute the implementation code of the method.

Definition at line 1279 of file alib.inl.

◆ ALIB_CHARACTER_ARRAY_IMPL_BUFFER_MUTABLE

#define ALIB_CHARACTER_ARRAY_IMPL_BUFFER_MUTABLE ( T,
TChar,
... )
Value:
const TChar* ArrayTraits<T,TChar>::Buffer(T & src ) { __VA_ARGS__ }

Alternative macro version of ALIB_CHARACTER_ARRAY_IMPL_BUFFER, which declares method argument src as a mutual reference of type T.

This version is to be used if specialization was performed using ALIB_CHARACTER_ARRAY_IMPL_BUFFER_MUTABLE.

Parameters
TThe type to provide the specialized static method for.
TCharThe character type of character arrays that T represents or might be created of.
...The variadic arguments of the macro constitute the implementation code of the method.

Definition at line 1285 of file alib.inl.

◆ ALIB_CHARACTER_ARRAY_IMPL_CONSTRUCT

#define ALIB_CHARACTER_ARRAY_IMPL_CONSTRUCT ( T,
TChar,
... )
Value:
T ArrayTraits <T,TChar>::Construct( const TChar* array, integer length ) { __VA_ARGS__ }

This macro may be used to implement static method ArrayTraits::Construct of specializations of ArrayTraits that have been defined using macro ALIB_CHARACTER_ARRAY or ALIB_CHARACTER_ARRAY_MUTABLE.

The arguments providing the array data to the method's implementation, which is to be used to create the object of type T, are named array and length. The implementation has to return a value of type T.

Parameters
TThe type to provide the specialized static method for.
TCharThe character type of character arrays that T represents or might be created of.
...The variadic arguments of the macro constitute the implementation code of the method.

Definition at line 1291 of file alib.inl.

◆ ALIB_CHARACTER_ARRAY_IMPL_LENGTH

#define ALIB_CHARACTER_ARRAY_IMPL_LENGTH ( T,
TChar,
... )
Value:
integer ArrayTraits<T,TChar>::Length(T const& src ) { __VA_ARGS__ }

This macro may be used to implement static method ArrayTraits::Length of specializations of ArrayTraits that have been defined using macro ALIB_CHARACTER_ARRAY.

The argument providing a constant reference of type T to the method's implementation, and which has to be accessed in the given implementation code, is named src. The implementation has to return the length of the character array as type integer.

Parameters
TThe type to provide the specialized static method for.
TCharThe character type of character arrays that T represents or might be created of.
...The variadic arguments of the macro constitute the implementation code of the method.

Definition at line 1282 of file alib.inl.

◆ ALIB_CHARACTER_ARRAY_IMPL_LENGTH_MUTABLE

#define ALIB_CHARACTER_ARRAY_IMPL_LENGTH_MUTABLE ( T,
TChar,
... )
Value:
integer ArrayTraits<T,TChar>::Length(T & src ) { __VA_ARGS__ }

Alternative macro version of ALIB_CHARACTER_ARRAY_IMPL_LENGTH, which declares method argument src as a mutual reference of type T.

Parameters
TThe type to provide the specialized static method for.
TCharThe character type of character arrays that T represents or might be created of.
...The variadic arguments of the macro constitute the implementation code of the method.

Definition at line 1288 of file alib.inl.

◆ ALIB_CHARACTER_ARRAY_MUTABLE

#define ALIB_CHARACTER_ARRAY_MUTABLE ( T,
TChar,
Construction )
Value:
ALIB_CHARACTER_ARRAY_internal( , T, TChar, , MutableOnly, Construction )

Specializes the type trait ArrayTraits for type T with access modifier Mutable.

To implement the corresponding static methods in alignment with the specialized access and construction flags, macros ALIB_CHARACTER_ARRAY_IMPL_BUFFER_MUTABLE, ALIB_CHARACTER_ARRAY_IMPL_LENGTH_MUTABLE and ALIB_CHARACTER_ARRAY_IMPL_CONSTRUCT are proposed to be used.

See also
For more information about character array traits, see chapter 4. Character Arrays of the Programmer's Manual of module ALib Characters.
Parameters
TThe type to provide array type-traits for.
TCharThe character type of character arrays that T represents or might be created of.
ConstructionOne of the values NONE, Implicit or ExplicitOnly.

Definition at line 1268 of file alib.inl.

◆ ALIB_CHARACTER_ZT_ARRAY

#define ALIB_CHARACTER_ZT_ARRAY ( T,
TChar,
Access,
Construction )
Value:
ALIB_CHARACTER_ARRAY_internal( ZT, T, TChar, const, Access , Construction )

Specializes the type trait ZTArrayTraits for type T.

To implement the corresponding static methods in alignment with the specialized access and construction flags, macros ALIB_CHARACTER_ZT_ARRAY_IMPL_BUFFER, ALIB_CHARACTER_ZT_ARRAY_IMPL_LENGTH and ALIB_CHARACTER_ZT_ARRAY_IMPL_CONSTRUCT are proposed to be used.

See also
For more information about character array traits, see chapter 4. Character Arrays of the Programmer's Manual of module ALib Characters.
Parameters
TThe type to provide array type-traits for.
TCharThe character type of character arrays that T represents or might be created of.
AccessOne of the values NONE, Implicit or ExplicitOnly. Value Mutable is not permitted. Instead, macro ALIB_CHARACTER_ARRAY_MUTABLE is to be used for that case.
ConstructionOne of the values NONE, Implicit or ExplicitOnly.

Definition at line 1271 of file alib.inl.

◆ ALIB_CHARACTER_ZT_ARRAY_IMPL_BUFFER

#define ALIB_CHARACTER_ZT_ARRAY_IMPL_BUFFER ( T,
TChar,
... )
Value:
const TChar* ZTArrayTraits<T,TChar>::Buffer( T const& src ) { __VA_ARGS__ }

Same as ALIB_CHARACTER_ARRAY_IMPL_BUFFER, but for zero-terminated character arrays.
(Implements method ZTArrayTraits::Buffer instead of ArrayTraits::Buffer.)

Parameters
TThe type to provide the specialized static method for.
TCharThe character type of character arrays that T represents or might be created of.
...The variadic arguments of the macro constitute the implementation code of the method.

Definition at line 1294 of file alib.inl.

◆ ALIB_CHARACTER_ZT_ARRAY_IMPL_BUFFER_MUTABLE

#define ALIB_CHARACTER_ZT_ARRAY_IMPL_BUFFER_MUTABLE ( T,
TChar,
... )
Value:
const TChar* ZTArrayTraits<T,TChar>::Buffer( T & src ) { __VA_ARGS__ }

Same as ALIB_CHARACTER_ARRAY_IMPL_BUFFER_MUTABLE, but for zero-terminated character arrays.
(Implements method ZTArrayTraits::Buffer instead of ArrayTraits::Buffer.)

Parameters
TThe type to provide the specialized static method for.
TCharThe character type of character arrays that T represents or might be created of.
...The variadic arguments of the macro constitute the implementation code of the method.

Definition at line 1300 of file alib.inl.

◆ ALIB_CHARACTER_ZT_ARRAY_IMPL_CONSTRUCT

#define ALIB_CHARACTER_ZT_ARRAY_IMPL_CONSTRUCT ( T,
TChar,
... )
Value:
T ZTArrayTraits<T,TChar>::Construct( const TChar* array, integer length ) { __VA_ARGS__ }

Same as ALIB_CHARACTER_ARRAY_IMPL_CONSTRUCT, but for zero-terminated character arrays.
(Implements method ZTArrayTraits::Construct instead of ArrayTraits::Construct.)

Parameters
TThe type to provide the specialized static method for.
TCharThe character type of character arrays that T represents or might be created of.
...The variadic arguments of the macro constitute the implementation code of the method.

Definition at line 1306 of file alib.inl.

◆ ALIB_CHARACTER_ZT_ARRAY_IMPL_LENGTH

#define ALIB_CHARACTER_ZT_ARRAY_IMPL_LENGTH ( T,
TChar,
... )
Value:
integer ZTArrayTraits<T,TChar>::Length( T const& src ) { __VA_ARGS__ }

Same as ALIB_CHARACTER_ARRAY_IMPL_LENGTH, but for zero-terminated character arrays.
(Implements method ZTArrayTraits::Length instead of ArrayTraits::Length.)

Parameters
TThe type to provide the specialized static method for.
TCharThe character type of character arrays that T represents or might be created of.
...The variadic arguments of the macro constitute the implementation code of the method.

Definition at line 1297 of file alib.inl.

◆ ALIB_CHARACTER_ZT_ARRAY_IMPL_LENGTH_MUTABLE

#define ALIB_CHARACTER_ZT_ARRAY_IMPL_LENGTH_MUTABLE ( T,
TChar,
... )
Value:
integer ZTArrayTraits<T,TChar>::Length( T & src ) { __VA_ARGS__ }

Same as ALIB_CHARACTER_ARRAY_IMPL_LENGTH_MUTABLE, but for zero-terminated character arrays.
(Implements method ZTArrayTraits::Length instead of ArrayTraits::Length.)

Parameters
TThe type to provide the specialized static method for.
TCharThe character type of character arrays that T represents or might be created of.
...The variadic arguments of the macro constitute the implementation code of the method.

Definition at line 1303 of file alib.inl.

◆ ALIB_CHARACTER_ZT_ARRAY_MUTABLE

#define ALIB_CHARACTER_ZT_ARRAY_MUTABLE ( T,
TChar,
Construction )
Value:
ALIB_CHARACTER_ARRAY_internal( ZT, T, TChar, , MutableOnly, Construction )

Specializes the type trait ZTArrayTraits for type T with access modifier Mutable.

To implement the corresponding static methods in alignment with the specialized access and construction flags, macros ALIB_CHARACTER_ZT_ARRAY_IMPL_BUFFER_MUTABLE, ALIB_CHARACTER_ZT_ARRAY_IMPL_LENGTH_MUTABLE and ALIB_CHARACTER_ZT_ARRAY_IMPL_CONSTRUCT are proposed to be used.

See also
For more information about character array traits, see chapter 4. Character Arrays of the Programmer's Manual of module ALib Characters.
Parameters
TThe type to provide array type-traits for.
TCharThe character type of character arrays that T represents or might be created of.
ConstructionOne of the values NONE, Implicit or ExplicitOnly.

Definition at line 1274 of file alib.inl.

◆ ALIB_COMMA

#define ALIB_COMMA   ,

Defines a simple comma (','). Used with macros when otherwise the use of a comma symbol leads to ambiguous syntax. For example when passing template types to macros.

Used with macros when otherwise the use of a comma symbol leads to ambiguous syntax. For example when passing template types to macros as shown here:

    MY_MACRO( std::vector<int ALIB_COMMA double> )

Definition at line 946 of file alib.inl.

◆ ALIB_COMMA_CALLER_NULLED

#define ALIB_COMMA_CALLER_NULLED   , ALIB_CALLER

Same as ALIB_CALLER_NULLED, but prepends a ','
This is needed if the caller information is not the only, but the last argument in a call.

Definition at line 1011 of file alib.inl.

◆ ALIB_COMMA_CALLER_PRUNED

#define ALIB_COMMA_CALLER_PRUNED   , ALIB_CALLER

Same as ALIB_CALLER_PRUNED, but prepends a ','
This is needed if the caller information is not the only, but the last argument in a call.

Definition at line 1008 of file alib.inl.

◆ ALIB_COMMA_DBG

#define ALIB_COMMA_DBG   ,

Defines a simple comma (',') with debug-builds. In release compilations the macro is empty. This is useful for example when methods change their signature depending on the compilation type. The latter is unavoidable i.e if caller source code information should be passed for debugging.

Used with macros when otherwise the use of a comma symbol leads to ambiguous syntax. For example when passing template types to macros.

Definition at line 948 of file alib.inl.

◆ ALIB_COMPILATION_FLAGS

#define ALIB_COMPILATION_FLAGS

Macro to provide a compilation flag verifier value to be used with method alib::AssertALibVersionAndFlags which is automatically invoked with function alib::Bootstrap (and overloads). The value of this macro is stored in namespace variable alib::COMPILATION_FLAGS.

See also
Programmer's manual chapter 9. Assuring Compilation Compatibility.

Definition at line 8 of file prepro_macros.md.

◆ ALIB_CONCAT

#define ALIB_CONCAT ( a,
b )
Value:
ALIB_CONCAT_IMPL(a,b)

Concatenates two preprocessor macro parameters into one symbol.

Parameters
aThe first part of the concatenated code.
bThe second part of the concatenated code.

Definition at line 933 of file alib.inl.

◆ ALIB_CPP_23

#define ALIB_CPP_23 ( ...)
Value:
__VA_ARGS__

This simple macro may be used for placing code that is only applicable to the C++ language standard 23 or higher. With the lower standard, the code given is pruned.

Parameters
...The source to select.
See also
Macro ALIB_CPP_BEFORE_23

Definition at line 476 of file alib.inl.

◆ ALIB_CPP_BEFORE_23

#define ALIB_CPP_BEFORE_23 ( ...)

This simple macro may be used for placing code that is only applicable to the C++ language standard 20 or below. With the higher standard, the code given is pruned.

Parameters
...The source to select.
See also
Macro ALIB_CPP_23

This group of simple macros either include or prune code dependent on the inclusion of ALib Modules in an ALib Build.

The symbols are defined in the internal header alib.inl which always is the first ALib header-file included.

Definition at line 477 of file alib.inl.

◆ ALIB_DBG

#define ALIB_DBG ( ...)
Value:
__VA_ARGS__

This simple macro may be used for placing debug statements into source code. Those get 'pruned' in release versions of ALib (respectively of the software that uses ALib and then this macro). It replaces

    #if ALIB_DEBUG
        // do stuff
        ...
        ...
    #endif

and is useful especially for single line statements.

Parameters
...Source code to prune in release-builds.

Definition at line 836 of file alib.inl.

◆ ALIB_DBG_PREVENT_RECURSIVE_METHOD_CALLS

#define ALIB_DBG_PREVENT_RECURSIVE_METHOD_CALLS
Value:
struct RecursionDetection \
{ \
bool& TestMember; \
RecursionDetection( bool& testMember ) : TestMember(testMember) {} \
\
void Acquire( const lang::CallerInfo& ci ) \
{ \
ALIB_ASSERT_ERROR(TestMember==false,"FSOWNER","Forbidden recursive use of method ", ci.Func)\
TestMember= true; \
} \
void Release() { TestMember= false; } \
}; \
RecursionDetection dbgRecursionDetection( dbgRecursionDetectionFlag ); \
ALIB_OWN(dbgRecursionDetection);

This macro may be placed at the beginning of a types' method to detect and assert recursive invocations - which by definition must happen.
The macro internally uses macro ALIB_OWN and hence class Owner that uses C++ stack unwinding to be sure to always clear the flag, even if an exception occurs.

In the case that the macro is placed in more than one method, it can be used to ensure that none of the methods calls any of the others.

A prerequisite of using this macro is to have macro ALIB_DBG_PREVENT_RECURSIVE_METHOD_CALLS_MEMBER_DECL placed in the member declaration area of the type.

This macro is only active in debug-compilations.

Definition at line 1349 of file alib.inl.

◆ ALIB_DBG_PREVENT_RECURSIVE_METHOD_CALLS_MEMBER_DECL

#define ALIB_DBG_PREVENT_RECURSIVE_METHOD_CALLS_MEMBER_DECL   bool dbgRecursionDetectionFlag = false;

Used with macro ALIB_DBG_PREVENT_RECURSIVE_METHOD_CALLS, usually in header compilation unit to declare a boolean class member that is used for detecting recursions.

Definition at line 1346 of file alib.inl.

◆ ALIB_DBG_TAKE_CI

#define ALIB_DBG_TAKE_CI   const CallerInfo& ci

Used with method declarations to define parameter ci of type CallerInfo.

Definition at line 1013 of file alib.inl.

◆ ALIB_DCS

#define ALIB_DCS   ALIB_OWN(*this)

Alias of macro ALIB_OWN, providing *this as the owner. Commonly used with types derived from classes DbgCriticalSections.

Note
If the compiler-symbol ALIB_DEBUG_CRITICAL_SECTIONS is not set, this macro is still defined with debug-builds. In this case, namespace functionassert::SingleThreaded is invoked. This detects multithreaded use of a non-supporting ALib Build.
See also

Definition at line 1375 of file alib.inl.

◆ ALIB_DCS_ACQUIRE

#define ALIB_DCS_ACQUIRE   Acquire(ALIB_CALLER);

Calls DbgCriticalSections::Acquire (on this).

Definition at line 1379 of file alib.inl.

◆ ALIB_DCS_ACQUIRE_SHARED

#define ALIB_DCS_ACQUIRE_SHARED   AcquireShared(ALIB_CALLER);

Calls DbgCriticalSections::AcquireShared (on this).

Definition at line 1383 of file alib.inl.

◆ ALIB_DCS_ACQUIRE_SHARED_WITH

#define ALIB_DCS_ACQUIRE_SHARED_WITH ( CS)
Value:
CS.AcquireShared(ALIB_CALLER);
#define ALIB_CALLER
Definition alib.inl:1001

Calls DbgCriticalSections::AcquireShared on the instance given with CS.

Parameters
CSThe DbgCriticalSections instance to use.

Definition at line 1385 of file alib.inl.

◆ ALIB_DCS_ACQUIRE_WITH

#define ALIB_DCS_ACQUIRE_WITH ( CS)
Value:
CS.Acquire(ALIB_CALLER);

Calls DbgCriticalSections::Acquire on the instance given with CS.

Parameters
CSThe DbgCriticalSections instance to use.

Definition at line 1381 of file alib.inl.

◆ ALIB_DCS_RELEASE

#define ALIB_DCS_RELEASE   Release(ALIB_CALLER);

Calls DbgCriticalSections::Release (on this).

Definition at line 1380 of file alib.inl.

◆ ALIB_DCS_RELEASE_SHARED

#define ALIB_DCS_RELEASE_SHARED   ReleaseShared(ALIB_CALLER);

Calls DbgCriticalSections::ReleaseShared (on this).

Definition at line 1384 of file alib.inl.

◆ ALIB_DCS_RELEASE_SHARED_WITH

#define ALIB_DCS_RELEASE_SHARED_WITH ( CS)
Value:
CS.ReleaseShared(ALIB_CALLER);

Calls DbgCriticalSections::ReleaseShared on the instance given with CS.

Parameters
CSThe DbgCriticalSections instance to use.

Definition at line 1386 of file alib.inl.

◆ ALIB_DCS_RELEASE_WITH

#define ALIB_DCS_RELEASE_WITH ( CS)
Value:
CS.Release(ALIB_CALLER);

Calls DbgCriticalSections::Release on the instance given with CS.

Parameters
CSThe DbgCriticalSections instance to use.

Definition at line 1382 of file alib.inl.

◆ ALIB_DCS_SHARED

#define ALIB_DCS_SHARED   ALIB_OWN_SHARED(*this)

Alternative to macro ALIB_DCS which uses macro ALIB_OWN_SHARED instead of ALIB_OWN and thus creates an anonymous instance of OwnerShared instead of Owner.

Definition at line 1376 of file alib.inl.

◆ ALIB_DCS_SHARED_WITH

#define ALIB_DCS_SHARED_WITH ( CS)
Value:
#define ALIB_OWN_SHARED( ownable)
Definition alib.inl:1315

Alternative to macro ALIB_DCS_WITH which uses macro ALIB_OWN_SHARED instead of ALIB_OWN and thus creates an anonymous instance of OwnerShared instead of Owner.

Parameters
CSThe DbgCriticalSections to acquire and release.

Definition at line 1378 of file alib.inl.

◆ ALIB_DCS_WITH

#define ALIB_DCS_WITH ( CS)
Value:
#define ALIB_OWN( ownable)
Definition alib.inl:1313

Alternative to macro ALIB_DCS which allows specifying the ownable. (Macro ALIB_DCS fixes this to *this).

Parameters
CSThe DbgCriticalSections to acquire and release.

Definition at line 1377 of file alib.inl.

◆ ALIB_DLL

#define ALIB_DLL   __declspec(dllexport)

Used to export/import C++ symbols into a dynamic link library. Defined under Windows/MSC when compiling or using ALib classes inside a DLL. Dependent on ALIB_API_IS_DLL and ALIB_API_NO_DLL.

Definition at line 496 of file alib.inl.

◆ ALIB_EMPTY

#define ALIB_EMPTY

Defines an empty macro. This is useful for example if a macro defined variadic arguments ('...') and a user wants to omit to provide a value. Some compilers (preprocessors) might warn about empty variadic arguments, if nothing was given. This macro avoids this and increased the readability.

Definition at line 943 of file alib.inl.

◆ ALIB_ENUMS_ASSIGN_RECORD

#define ALIB_ENUMS_ASSIGN_RECORD ( TEnum,
TRecord )
Value:
namespace alib::enumrecords { \
template<> struct RecordsTraits<TEnum> { using Type= TRecord; }; }

Macro used to specialize the type trait RecordsTraits<TEnum> to associate C++ enumeration type TEnum with ALib Enum Records of type TRecord.

Parameters
TEnumThe enumeration type to define data records for.
TRecordThe type of the data record to assign.

Definition at line 19 of file enumrecords.prepro.hpp.

◆ ALIB_ENUMS_MAKE_ARITHMETICAL

#define ALIB_ENUMS_MAKE_ARITHMETICAL ( TEnum)
Value:
namespace alib::enumops { \
template<> struct ArithmeticalTraits<TEnum> : std::true_type {}; } \

Specializes the type trait ArithmeticalTraits to inherit std::true_type to enable a set of arithmetic operators on the elements of TEnum.

Usually, this macro is placed in a header-file, probably close to the enum type definition. However, it has to be placed in global (no) namespace.

See also
Chapter 2.1 Standard Arithmetical Operators of the Programmer's Manual of module ALib EnumOps for more information.
Parameters
TEnumType of a scoped or non-scoped enumeration that is to be declared an arithmetical type.

Definition at line 19 of file enumops.prepro.hpp.

◆ ALIB_ENUMS_MAKE_BITWISE

#define ALIB_ENUMS_MAKE_BITWISE ( TEnum)
Value:
namespace alib::enumops { \
template<> \
struct BitwiseTraits<TEnum> : std::true_type {}; }

Specializes the type trait BitwiseTraits to inherit std::true_type.

Usually, this macro is placed in a header-file, probably close to the enum type definition. However, it has to be placed in global (no) namespace.

See also
Chapter 2.2 Bitwise Operators of the Programmer's Manual of module ALib EnumOps for more information.
Parameters
TEnumType of a scoped or non-scoped enumeration that is to be declared a bitwise type.

Definition at line 23 of file enumops.prepro.hpp.

◆ ALIB_ENUMS_MAKE_ITERABLE

#define ALIB_ENUMS_MAKE_ITERABLE ( TEnum,
StopElement )
Value:
ALIB_ENUMS_MAKE_ITERABLE_BEGIN_END( TEnum, TEnum(0), StopElement )
#define ALIB_ENUMS_MAKE_ITERABLE_BEGIN_END(TEnum, StartElement, StopElement)

Shortcut to ALIB_ENUMS_MAKE_ITERABLE_BEGIN_END, providing TEnum(0) as macro parameter StartElement.

Usually, this macro is placed in a header-file, probably close to the enum type definition. However, it has to be placed in global (no) namespace.

See also
Sibling macro ALIB_ENUMS_MAKE_ITERABLE_BEGIN_END and chapter 3. Enum Iteration of the Programmer's Manual of module ALib EnumOps for more information.
Parameters
TEnumType of a scoped or non-scoped enumeration that is to be declared an iterable enum type.
StopElementThe enum element after the last "valid" element in the enumeration.
Will be used as constexpr IterableTraits::End.

Definition at line 36 of file enumops.prepro.hpp.

◆ ALIB_ENUMS_MAKE_ITERABLE_BEGIN_END

#define ALIB_ENUMS_MAKE_ITERABLE_BEGIN_END ( TEnum,
StartElement,
StopElement )
Value:
namespace alib::enumops { \
template<> struct IterableTraits<TEnum> : std::true_type \
{ \
static constexpr TEnum Begin = StartElement; \
static constexpr TEnum End = StopElement; \
};}

Specializes the type trait IterableTraits to implement methods:

  • Begin to return StartElement
  • End to return StopElement

Usually, this macro is placed in a header-file, probably close to the enum type definition. However, it has to be placed in global (no) namespace.

See also
Sibling macro ALIB_ENUMS_MAKE_ITERABLE and chapter 3. Enum Iteration of the Programmer's Manual of module ALib EnumOps for more information.
Parameters
TEnumType of a scoped or non-scoped enumeration that is to be declared an iterable enum type.
StartElementThe first element of the enumeration.
Will be used as constexpr IterableTraits::End.
StopElementThe enum element after the last "valid" element in the enumeration.
Will be used as constexpr IterableTraits::End.

Definition at line 28 of file enumops.prepro.hpp.

◆ ALIB_ERROR

#define ALIB_ERROR ( domain,
... )
Value:
{ ALIB_DEBUG_ASSERTION_PRINTABLES_DO(__VA_ARGS__) alib::assert::Raise( ALIB_CALLER_PRUNED, 0, domain, __VA_ARGS__ ); }
#define ALIB_CALLER_PRUNED
Definition alib.inl:1007
void Raise(const lang::CallerInfo &ci, int type, std::string_view domain, TArgs &&... args)
Definition assert.inl:181

Writes the given message objects as an error.

Parameters
domainThe domain of the assertion. (Usually the ALib Module.)
...The objects used to format the message string.

Definition at line 1045 of file alib.inl.

◆ ALIB_EXPORT

#define ALIB_EXPORT   export

Depends on the compiler-symbol ALIB_C20_MODULES. Equals to keyword export if compiled in module mode, and is empty otherwise.

Definition at line 488 of file alib.inl.

◆ ALIB_FALLTHROUGH

#define ALIB_FALLTHROUGH   [[clang::fallthrough]];

Used with keyword switch to annotate a case block that has no break or (return, etc.). Avoids a warning with some compilers.

Definition at line 708 of file alib.inl.

◆ ALIB_HAS_METHOD

#define ALIB_HAS_METHOD ( T,
Method,
... )
Value:
!std::same_as< lang::UnknownTag, decltype(std::declval<T>(). Method( __VA_ARGS__ ))>

Evaluates to true if the given type T has a method called Method with the given signature. Otherwise, evaluates to false, respectively causes SFINAE.

Parameters
TThe type to test a method for.
MethodThe name of the method.
...Variadic list of args of the method.

Definition at line 988 of file alib.inl.

◆ ALIB_IDENTIFIER

#define ALIB_IDENTIFIER ( prefix)
Value:
ALIB_WARNINGS_IGNORE_RESERVED_IDENTIFIER \
ALIB_CONCAT(prefix, __LINE__) \
#define ALIB_WARNINGS_RESTORE
Definition alib.inl:705

This macro assembles an 'anonymous' identifier using the given prefix and the current line number within the source code file. This macro is used within other macros that need a C/C++ identifier internally.
As a sample, see macro ALIB_OWN.

Parameters
prefixA prefix token to use.

Definition at line 936 of file alib.inl.

◆ ALIB_LOCK

#define ALIB_LOCK   ALIB_OWN(*this)

Alias of macro ALIB_OWN, providing *this as the owner. Commonly used with types derived from classes Lock or RecursiveLock.

Note
If module ALib Threads is not available in the ALib Build, this macro is still defined with debug-builds. In this case, namespace functionassert::SingleThreaded is invoked. This detects multithreaded use of a non-supporting ALib Build.
See also
Alternative macro ALIB_LOCK_WITH

Definition at line 1319 of file alib.inl.

◆ ALIB_LOCK_RECURSIVE

#define ALIB_LOCK_RECURSIVE   ALIB_OWN_RECURSIVE(*this)

Alternative to macro ALIB_LOCK which uses macro ALIB_OWN_RECURSIVE instead of ALIB_OWN and thus creates an anonymous instance of OwnerRecursive instead of Owner.

Definition at line 1320 of file alib.inl.

◆ ALIB_LOCK_RECURSIVE_WITH

#define ALIB_LOCK_RECURSIVE_WITH ( lock)
Value:
#define ALIB_OWN_RECURSIVE(ownable)
Definition alib.inl:1314

Alternative to macro ALIB_LOCK_WITH which uses macro ALIB_OWN_RECURSIVE instead of ALIB_OWN and thus creates an anonymous instance of OwnerRecursive instead of Owner.

Parameters
lockThe mutex to acquire and release.

Definition at line 1323 of file alib.inl.

◆ ALIB_LOCK_SHARED

#define ALIB_LOCK_SHARED   ALIB_OWN_SHARED(*this)

Alternative to macro ALIB_LOCK which uses macro ALIB_OWN_SHARED instead of ALIB_OWN and thus creates an anonymous instance of OwnerShared instead of Owner.

Definition at line 1321 of file alib.inl.

◆ ALIB_LOCK_SHARED_WITH

#define ALIB_LOCK_SHARED_WITH ( lock)
Value:

Alternative to macro ALIB_LOCK_WITH which uses macro ALIB_OWN_SHARED instead of ALIB_OWN and thus creates an anonymous instance of OwnerShared instead of Owner.

Parameters
lockThe mutex to acquire and release.

Definition at line 1324 of file alib.inl.

◆ ALIB_LOCK_WITH

#define ALIB_LOCK_WITH ( lock)
Value:
ALIB_OWN(lock)

Alternative to macro ALIB_LOCK which allows specifying the ownable. (Macro ALIB_LOCK fixes this to *this).

Parameters
lockThe mutex to acquire and release.

Definition at line 1322 of file alib.inl.

◆ ALIB_MESSAGE

#define ALIB_MESSAGE ( domain,
... )
Value:
{ ALIB_DEBUG_ASSERTION_PRINTABLES_DO(__VA_ARGS__) alib::assert::Raise( ALIB_CALLER_PRUNED, 2, domain, __VA_ARGS__ ); }

Writes the given message.

Parameters
domainThe domain of the assertion. (Usually the ALib Module.)
...The objects used to format the message string.

Definition at line 1047 of file alib.inl.

◆ ALIB_NSTRINGIFY

#define ALIB_NSTRINGIFY ( a)

Makes as narrow string from a preprocessor macro parameter.

Parameters
aThe token to stringyfy.

Definition at line 919 of file alib.inl.

◆ ALIB_OWN

#define ALIB_OWN ( ownable)
Value:
alib::lang::Owner <decltype(ownable)> ALIB_IDENTIFIER(owner) (ownable ALIB_COMMA_CALLER_PRUNED);
#define ALIB_COMMA_CALLER_PRUNED
Definition alib.inl:1008
#define ALIB_IDENTIFIER(prefix)
Definition alib.inl:936

This preprocessor macro defines an anonymous instance of type Owner. The template type is deduced from parameter ownable using C++ keyword decltype.

By using this macro there is no need to "invent" an (otherwise unreferenced) identifier for that definition.

Note
This macro exists mainly because C++ does not support anonymous local instances.
See also
Parameters
ownableThe Ownable to acquire and release.

Definition at line 1313 of file alib.inl.

◆ ALIB_OWN_RECURSIVE

#define ALIB_OWN_RECURSIVE ( ownable)
Value:

Same as ALIB_OWN, but creates a local anonymous instance of class OwnerRecursive.

Definition at line 1314 of file alib.inl.

◆ ALIB_OWN_SHARED

#define ALIB_OWN_SHARED ( ownable)
Value:

Same as ALIB_OWN, but creates a local anonymous instance of class OwnerShared.

Definition at line 1315 of file alib.inl.

◆ ALIB_PATH_TO_NARROW

#define ALIB_PATH_TO_NARROW ( src,
dest,
bufSize )
Value:

Similar to ALIB_STRINGS_TO_NARROW. If PathCharType does not equal characters::nchar, a local narrow string is created and the given path is converted. Otherwise, just a reference to the given path is created, which will ultimately be optimized out by the compiler.

Parameters
srcThe name of the source instance.
destThe name of the destination instance (or reference to the source).
bufSizeThe (initial) size of the local string, which is used as the conversion buffer.

Definition at line 51 of file system.prepro.hpp.

◆ ALIB_PATH_TO_NARROW_ARG

#define ALIB_PATH_TO_NARROW_ARG ( src,
bufSize )
Value:

Similar to ALIB_STRINGS_TO_NARROW and ALIB_STRINGS_TO_NARROW_ARG. Used to pass ALib path-strings as an argument when a narrow-string is expected.

Parameters
srcThe name of the source instance.
bufSizeThe (initial) size of the local string, which is used as the conversion buffer.

Definition at line 52 of file system.prepro.hpp.

◆ ALIB_PATH_TO_STRING

#define ALIB_PATH_TO_STRING ( src,
dest,
bufSize )
Value:
decltype(src)& dest(src);

Similar to ALIB_STRINGS_TO_NARROW. If PathCharType does not equal characters::character, a local string is created and the given path is converted. Otherwise, just a reference to the given path is created, which will ultimately be optimized out by the compiler.

Parameters
srcThe name of the source instance.
destThe name of the destination instance (or reference to the source).
bufSizeThe (initial) size of the local string, which is used as the conversion buffer.

Definition at line 36 of file system.prepro.hpp.

◆ ALIB_PATH_TO_STRING_ARG

#define ALIB_PATH_TO_STRING_ARG ( src,
bufSize )
Value:
src;

Similar to ALIB_PATH_TO_STRING and ALIB_STRINGS_TO_NARROW_ARG. Used to pass ALib path-strings as an argument when an ALib string is expected.

Parameters
srcThe name of the source instance.
bufSizeThe (initial) size of the local string, which is used as the conversion buffer.

Definition at line 37 of file system.prepro.hpp.

◆ ALIB_REL

#define ALIB_REL ( ...)

As a counterpart to ALIB_DBG, this macro may be used for placing code that is only available in release compilations. The macro is provided for completeness only and should be used seldom and with care, as it generally implies more intense release code testing. As of Version 1810, ALib does not use this macro internally.

Definition at line 837 of file alib.inl.

◆ ALIB_REL_DBG

#define ALIB_REL_DBG ( releaseCode,
... )
Value:
__VA_ARGS__

Similar to ALIB_DBG, but accepts a release version of the code as well. The release version is expected as first macro parameter. Note, that the release code must not contain a comma (',') while the debug code is allowed to. A comma in release code may be substituted with macro ALIB_COMMA. However, more complicated stuff should be placed in usual #if/#else/#endif statements.

Definition at line 838 of file alib.inl.

◆ ALIB_RESOURCED

#define ALIB_RESOURCED ( T,
ResPool,
ResCategory,
ResName )
Value:
namespace alib::resources { \
template<> struct ResourcedTraits<T> : std::true_type \
{ \
static ResourcePool* Pool() { return ResPool; } \
static constexpr NString Category() { return ResCategory; } \
static constexpr NString Name() { return ResName; } \
};}
strings::TString< nchar > NString
Type alias in namespace alib.
Definition string.inl:2390

Macro used to specialize the type trait ResourcedTraits for given type T.

Parameters
TThe type to specialize the type trait ResourcedTraits for.
ResPoolExpression providing a pointer to the ResourcePool object.
ResCategoryExpression providing the resource category.
ResNameExpression providing the resource name.

Definition at line 29 of file resources.prepro.hpp.

◆ ALIB_RESOURCED_IN_MODULE

#define ALIB_RESOURCED_IN_MODULE ( T,
Camp,
ResName )
Value:
ALIB_RESOURCED( T, Camp.GetResourcePool().Get(), Camp.ResourceCategory, ResName )
#define ALIB_RESOURCED(T, ResPool, ResCategory, ResName)

Variant of macro ALIB_RESOURCED, which specializes the type trait ResourcedTraits for type T to use the resource-backend found in the given Camp, as well as its default ResourceCategory.

Availability
This macro is available only if ALIB_CAMP equals true.
Parameters
TThe type to specialize the type trait ResourcedTraits for.
CampPointer to the Camp that provides the ResourcePool object.
ResNameExpression providing the resource name.

Definition at line 21 of file camp.prepro.hpp.

◆ ALIB_REVISION

#define ALIB_REVISION   0

The ALib revision number. The value of this macro is stored in namespace variable alib::REVISION.

See also
Programmer's manual chapter 9. Assuring Compilation Compatibility.

Definition at line 21 of file alib.inl.

◆ ALIB_SIZEOF_WCHAR_T

#define ALIB_SIZEOF_WCHAR_T   4

Compiler/platform-dependent value. Gives the sizeof values of type wchar_t in bytes. Possible values are 2 and 4.

Definition at line 857 of file alib.inl.

◆ ALIB_STACK_ALLOCATED_TYPE

#define ALIB_STACK_ALLOCATED_TYPE ( T)
Value:
private: void* operator new (size_t); \
void* operator new (size_t, void*); \
void* operator new[](size_t); \
void* operator new[](size_t, void*); \
T(const T& ); \
T( T&& ); \
void operator=(const T& ); \
void operator=( T&& );

To be placed at the beginning of a type which is to be allocated exclusively on the stack. For this, its new-operators as well as copy and move operators are declared private.

Parameters
TThe name of the type that this macro is placed in.

Definition at line 975 of file alib.inl.

◆ ALIB_STATIC_ASSERT

#define ALIB_STATIC_ASSERT ( CondVariable,
Cond,
Message )
Value:
{ constexpr bool CondVariable= Cond; \
static_assert( CondVariable, Message ); } \

A simple macro that wraps language keyword static_assert. Common compilers display the condition expression that failed with the compilation error. The purpose of this macro is to hide this expression away. For this, the expression is assigned to a constexpr boolean value first, and then the assertion uses only this variable as its expression.

The variable name is given with parameter CondVariable and

Parameters
CondVariableThis should be a "speaking name" that tells the user right away what happened.
CondThe condition that is asserted and hid away from the compiler's message text.
MessageThe message that details what is said with CondVariable.

Definition at line 954 of file alib.inl.

◆ ALIB_STATIC_DENY

#define ALIB_STATIC_DENY ( CondVariable,
Cond,
Message )
Value:
{ constexpr bool CondVariable= !(Cond); \
static_assert( CondVariable, Message ); } \

See macro ALIB_STATIC_ASSERT for a general explanation. The only difference from this is that the negation of the given expression is used. Hence the opposite of an assert, a "denial".

Parameters
CondVariableThis should be a "speaking name" that tells the user right away what happened.
CondThe condition that is asserted to be false, and that is hid away from the compiler's message text.
MessageThe message that details what is said with CondVariable.

Definition at line 958 of file alib.inl.

◆ ALIB_STRING_DBG_CHK

#define ALIB_STRING_DBG_CHK ( instance)
Value:
{ (instance)->dbgCheck(); }

Simple macro that just invokes method _dbgCheck(), which is defined for classes String, CString and AString. It is active only when the compiler-symbol ALIB_DEBUG_STRINGS is true. The macro is placed in almost every method.

Definition at line 34 of file strings.prepro.hpp.

◆ ALIB_STRING_RESETTER

#define ALIB_STRING_RESETTER ( astring)
Value:
std::remove_reference_t<decltype(astring)>::value_type, \
std::remove_reference_t<decltype(astring)>::AllocatorType > \
ALIB_IDENTIFIER(astring)(astring)

Creates an 'anonymous' instance of class TStringLengthResetter. Its identifier name is assembled using macro ALIB_IDENTIFIER, hence from the given AString's identifier and the line number in the code.

Parameters
astringThe AString to reset to its original length when the C++ block scope where this macro is placed, is left.

Definition at line 109 of file strings.prepro.hpp.

◆ ALIB_STRING_TO_PATH

#define ALIB_STRING_TO_PATH ( src,
dest,
bufSize )
Value:
decltype(src)& dest(src);

Similar to ALIB_STRINGS_TO_NARROW. If PathCharType does not equal characters::character, a local path-string is created and the given string is converted. Otherwise, just a reference to the given string is created, which will ultimately be optimized out by the compiler.

Parameters
srcThe name of the source instance.
destThe name of the destination instance (or reference to the source).
bufSizeThe (initial) size of the local string, which is used as the conversion buffer.

Definition at line 38 of file system.prepro.hpp.

◆ ALIB_STRING_TO_PATH_ARG

#define ALIB_STRING_TO_PATH_ARG ( src,
bufSize )
Value:
src;

Similar to ALIB_STRINGS_TO_NARROW and ALIB_STRINGS_TO_NARROW_ARG. Used to pass ALib strings as an argument when a path-string is expected.

Parameters
srcThe name of the source instance.
bufSizeThe (initial) size of the local string, which is used as the conversion buffer.

Definition at line 39 of file system.prepro.hpp.

◆ ALIB_STRINGIFY

#define ALIB_STRINGIFY ( a)

Makes as string from a preprocessor macro parameter. The string character type equals the default character type character.

Parameters
aThe token to stringyfy.

Definition at line 920 of file alib.inl.

◆ ALIB_STRINGS_APPENDABLE_TYPE

#define ALIB_STRINGS_APPENDABLE_TYPE ( TYPE)
Value:
namespace alib::strings { \
template<> struct AppendableTraits<TYPE, alib::character, alib::lang::HeapAllocator> {\
ALIB_DLL void operator()(TAString<alib::character, alib::lang::HeapAllocator>&, const TYPE& ); \
};}

Helper macro for specializing functor AppendableTraits for type TYPE. This macro has to be positioned outside any namespace, and the given type has to include its full namespace qualification.

This macro is to be used in combination with macro ALIB_STRINGS_APPENDABLE_TYPE_DEF.
As an alternative to the two macros, ALIB_STRINGS_APPENDABLE_TYPE_INLINE might be used, which will specialize AppendableTraits and define its operator() inline.

See also
Chapter 5.1 Appending Custom Types of the Programmer's Manual of module ALib Strings.
Parameters
TYPEThe type to specialize functor AppendableTraits for.

Definition at line 60 of file strings.prepro.hpp.

◆ ALIB_STRINGS_APPENDABLE_TYPE_DEF

#define ALIB_STRINGS_APPENDABLE_TYPE_DEF ( TYPE,
IMPL )
Value:
::operator()( TAString<alib::character, alib::lang::HeapAllocator>& target, const TYPE& src){IMPL}

Macro used in combination with ALIB_STRINGS_APPENDABLE_TYPE which specializes functor AppendableTraits for type TYPE and standard character type, and with this declares its member operator().
This macro is used for the implementation of this member function.

Parameters
TYPEThe type to specialize functor AppendableTraits for.
IMPLThe implementation code for operator().

Definition at line 78 of file strings.prepro.hpp.

◆ ALIB_STRINGS_APPENDABLE_TYPE_DEF_N

#define ALIB_STRINGS_APPENDABLE_TYPE_DEF_N ( TYPE,
IMPL )
Value:
::operator()( TAString<alib::nchar, alib::lang::HeapAllocator>& target, const TYPE& src) {IMPL}

Same as ALIB_STRINGS_APPENDABLE_TYPE_DEF but for character type alib::nchar.

Parameters
TYPEThe type to specialize functor AppendableTraits for.
IMPLThe implementation code for operator().

Definition at line 82 of file strings.prepro.hpp.

◆ ALIB_STRINGS_APPENDABLE_TYPE_DEF_W

#define ALIB_STRINGS_APPENDABLE_TYPE_DEF_W ( TYPE,
IMPL )
Value:
::operator()( TAString<alib::wchar, alib::lang::HeapAllocator>& target, const TYPE& src) {IMPL}

Same as ALIB_STRINGS_APPENDABLE_TYPE_DEF but for character type alib::wchar.

Parameters
TYPEThe type to specialize functor AppendableTraits for.
IMPLThe implementation code for operator().

Definition at line 86 of file strings.prepro.hpp.

◆ ALIB_STRINGS_APPENDABLE_TYPE_INLINE

#define ALIB_STRINGS_APPENDABLE_TYPE_INLINE ( TYPE,
IMPL )
Value:
namespace alib::strings { \
template<> struct AppendableTraits<TYPE,alib::character, alib::lang::HeapAllocator> {\
void operator()(TAString<alib::character, lang::HeapAllocator>& target, const TYPE& src) {IMPL}\
};}

Helper macro for specializing functor AppendableTraits for a custom type TYPE. This macro has to be positioned outside any namespace, and the given type has to include its full namespace qualification.

With the specialization of struct, AppendableTraits<TYPE>::operator() will be defined and implemented inline.

Macros ALIB_STRINGS_APPENDABLE_TYPE and ALIB_STRINGS_APPENDABLE_TYPE_DEF provide a non-inline alternative to this macro.

See also
Chapter 5.1 Appending Custom Types of the Programmer's Manual of module ALib Strings.
Parameters
TYPEThe type to specialize functor AppendableTraits for.
IMPLThe implementation code for operator().

Definition at line 91 of file strings.prepro.hpp.

◆ ALIB_STRINGS_APPENDABLE_TYPE_INLINE_N

#define ALIB_STRINGS_APPENDABLE_TYPE_INLINE_N ( TYPE,
IMPL )
Value:
namespace alib::strings { \
template<> struct AppendableTraits<TYPE,alib::nchar, alib::lang::HeapAllocator> {\
void operator()(TAString<alib::nchar, alib::lang::HeapAllocator>& target, const TYPE& src){IMPL}\
};}

Same as ALIB_STRINGS_APPENDABLE_TYPE_INLINE but for character type alib::nchar.

Parameters
TYPEThe type to specialize functor AppendableTraits for.
IMPLThe implementation code for operator().

Definition at line 97 of file strings.prepro.hpp.

◆ ALIB_STRINGS_APPENDABLE_TYPE_INLINE_W

#define ALIB_STRINGS_APPENDABLE_TYPE_INLINE_W ( TYPE,
IMPL )
Value:
namespace alib::strings { \
template<> struct AppendableTraits<TYPE,alib::wchar, alib::lang::HeapAllocator> {\
void operator()(TAString<alib::wchar, alib::lang::HeapAllocator>& target, const TYPE& src){IMPL}\
};}

Same as ALIB_STRINGS_APPENDABLE_TYPE_INLINE but for character type alib::wchar.

Parameters
TYPEThe type to specialize functor AppendableTraits for.
IMPLThe implementation code for operator().

Definition at line 103 of file strings.prepro.hpp.

◆ ALIB_STRINGS_APPENDABLE_TYPE_N

#define ALIB_STRINGS_APPENDABLE_TYPE_N ( TYPE)
Value:
namespace alib::strings { \
template<> struct AppendableTraits<TYPE, alib::nchar, alib::lang::HeapAllocator> {\
ALIB_DLL void operator()( TAString<alib::nchar, alib::lang::HeapAllocator>&, const TYPE& ); \
};}

Same as ALIB_STRINGS_APPENDABLE_TYPE but for character type alib::nchar.

Parameters
TYPEThe type to specialize functor AppendableTraits for.

Definition at line 66 of file strings.prepro.hpp.

◆ ALIB_STRINGS_APPENDABLE_TYPE_W

#define ALIB_STRINGS_APPENDABLE_TYPE_W ( TYPE)
Value:
namespace alib::strings { \
template<> struct AppendableTraits<TYPE, alib::wchar, alib::lang::HeapAllocator> {\
ALIB_DLL void operator()( TAString<alib::wchar, alib::lang::HeapAllocator>&, const TYPE&); \
};}

Same as ALIB_STRINGS_APPENDABLE_TYPE but for character type alib::wchar.

Parameters
TYPEThe type to specialize functor AppendableTraits for.

Definition at line 72 of file strings.prepro.hpp.

◆ ALIB_STRINGS_FROM_NARROW

#define ALIB_STRINGS_FROM_NARROW ( src,
dest,
bufSize )
Value:

Creates a new local string variable of standard character type. The name of the variable is defined by parameter dest. If code selection symbol ALIB_CHARACTERS_WIDE is false, then dest becomes just a reference to src. The macro in this case is defined as:

  decltype(src)& dest= src;

Otherwise, dest is of type LocalString<character,bufSize> and src is passed to its constructor.

Parameters
srcThe source string.
destThe name of the destination variable.
bufSizeThe local buffer size used for the conversion.

Definition at line 54 of file strings.prepro.hpp.

◆ ALIB_STRINGS_FROM_NARROW_ARG

#define ALIB_STRINGS_FROM_NARROW_ARG ( src,
bufSize )
Value:

Used when ALib strings of narrow character size should be passed as a string argument of standard size. If code selection symbol ALIB_CHARACTERS_WIDE is false, then the macro simply passes (is defined as) src.
Otherwise, the macro wraps src in an object of type LocalString<character,bufSize>.

Parameters
srcThe source string.
bufSizeThe local buffer size used for the conversion.

Definition at line 55 of file strings.prepro.hpp.

◆ ALIB_STRINGS_FROM_WIDE

#define ALIB_STRINGS_FROM_WIDE ( src,
dest,
bufSize )
Value:
decltype(src)& dest= src;

Creates a new local string variable of standard character type. The name of the variable is defined by parameter dest. If code selection symbol ALIB_CHARACTERS_WIDE is true, then dest becomes just a reference to src. The macro in this case is defined as:

  decltype(src)& dest= src;

Otherwise, dest is of type LocalString<character,bufSize> and src is passed to its constructor.

Parameters
srcThe source string.
destThe name of the destination variable.
bufSizeThe local buffer size used for the conversion.

Definition at line 56 of file strings.prepro.hpp.

◆ ALIB_STRINGS_FROM_WIDE_ARG

#define ALIB_STRINGS_FROM_WIDE_ARG ( src,
bufSize )
Value:
src;

Used when ALib strings of wide character size should be passed as a string argument of standard size. If code selection symbol ALIB_CHARACTERS_WIDE is true, then the macro simply passes (is defined as) src.
Otherwise, the macro wraps src in an object of type LocalString<character,bufSize>.

Parameters
srcThe source string.
bufSizeThe local buffer size used for the conversion.

Definition at line 57 of file strings.prepro.hpp.

◆ ALIB_STRINGS_SUPPRESS_STD_OSTREAM_OPERATOR

#define ALIB_STRINGS_SUPPRESS_STD_OSTREAM_OPERATOR ( TYPE)
Value:
template<> struct SuppressStdOStreamOpTraits<TYPE> : ::std::true_type {}; }

Helper macro for specializing type trait SuppressStdOStreamOpTraits for a custom type TYPE. This macro has to be positioned outside any namespace, and the given type has to include its full namespace qualification.

Parameters
TYPEThe type to specialize functor AppendableTraits for.

Definition at line 120 of file strings.prepro.hpp.

◆ ALIB_STRINGS_TO_NARROW

#define ALIB_STRINGS_TO_NARROW ( src,
dest,
bufSize )
Value:

Creates a new local string variable of narrow character type. The name of the variable is defined by parameter dest. If code selection symbol ALIB_CHARACTERS_WIDE is false, then dest becomes just a reference to src. The macro in this case is defined as:

  decltype(src)& dest= src;

Otherwise, dest is of type LocalString<nchar,bufSize> and src is passed to its constructor.

Parameters
srcThe source string.
destThe name of the destination variable.
bufSizeThe local buffer size used for the conversion.

Definition at line 50 of file strings.prepro.hpp.

◆ ALIB_STRINGS_TO_NARROW_ARG

#define ALIB_STRINGS_TO_NARROW_ARG ( src,
bufSize )
Value:

Used when ALib strings of standard character size should be passed as a string argument of narrow size. If code selection symbol ALIB_CHARACTERS_WIDE is false, then the macro simply passes (is defined as) src.
Otherwise, the macro wraps src in an object of type LocalString<nchar,bufSize> which converts the string to the right character type.

Parameters
srcThe source string.
bufSizeThe local buffer size used for the conversion.

Definition at line 51 of file strings.prepro.hpp.

◆ ALIB_STRINGS_TO_WIDE

#define ALIB_STRINGS_TO_WIDE ( src,
dest,
bufSize )
Value:
decltype(src)& dest= src;

Creates a new local string variable of wide character type. The name of the variable is defined by parameter dest. If code selection symbol ALIB_CHARACTERS_WIDE is true, then dest becomes just a reference to src. The macro in this case is defined as:

  decltype(src)& dest= src;

Otherwise, dest is of type LocalString<nchar,bufSize> and src is passed to its constructor.

Parameters
srcThe source string.
destThe name of the destination variable.
bufSizeThe local buffer size used for the conversion.

Definition at line 52 of file strings.prepro.hpp.

◆ ALIB_STRINGS_TO_WIDE_ARG

#define ALIB_STRINGS_TO_WIDE_ARG ( src,
bufSize )
Value:
src;

Used when ALib strings of standard character size should be passed as a string argument of wide size. If code selection symbol ALIB_CHARACTERS_WIDE is true, then the macro simply passes (is defined as) src.
Otherwise, the macro wraps src in an object of type LocalString<nchar,bufSize>.

Parameters
srcThe source string.
bufSizeThe local buffer size used for the conversion.

Definition at line 53 of file strings.prepro.hpp.

◆ ALIB_TVALUE

#define ALIB_TVALUE ( T)
Value:
std::remove_cv_t<std::remove_pointer_t<std::remove_reference_t<T>>>

Shortcut to nested type modifiers std::remove_cv_t, std::remove_pointer_t and std::remove_reference_t.

Parameters
TThe type that is to be decayed to its plain value-type.

Definition at line 986 of file alib.inl.

◆ ALIB_VARIABLES_DEFINE_TYPE

#define ALIB_VARIABLES_DEFINE_TYPE ( Namespace,
CPPName,
CfgTypeString )
Value:
struct VMeta_ ## CPPName : public VMeta \
{ \
ALIB_DLL String typeName () const override { return CfgTypeString; } \
ALIB_DBG(ALIB_DLL const std::type_info& dbgTypeID() override { return typeid(Namespace CPPName); } ) \
ALIB_DLL void construct(void* obj, PoolAllocator&) override { new (obj) Namespace CPPName(); } \
ALIB_DLL void destruct (void* obj, PoolAllocator&) override { reinterpret_cast<Namespace CPPName*>(obj)->~CPPName(); } \
ALIB_DLL size_t size () override { static_assert(alignof(Namespace CPPName) <= alib::PoolAllocator::MAX_ALIGNMENT); return (std::max)( sizeof(Namespace CPPName), sizeof(void*) ); } \
ALIB_DLL void imPort (VDATA*, Configuration&, const StringEscaper&, const String&) override;\
ALIB_DLL void exPort (VDATA*, Configuration&, const StringEscaper&, AString&) override;\
};}

Defines a struct named alib::variables::detail::VMeta_<<CPPName>>, which is derived from struct VMeta and which declares all abstract virtual methods and implements most of them already. The methods are:

Method Status
typeName defined
dbgTypeID defined (in debug-compilations only)
construct defined
destruct defined
size defined
imPort declared only
exPort declared only

This is the first step on the way to create an ALib variable of a custom storage type.

See also
Parameters
NamespaceThe namespace of the type to enable as an ALib variable.
CPPNameThe name of the type to enable as an ALib variable.
CfgTypeStringThe type string used to declare variables of this type.

Definition at line 104 of file variables.prepro.hpp.

◆ ALIB_VARIABLES_DEFINE_TYPE_WITH_POOL_CONSTRUCTOR

#define ALIB_VARIABLES_DEFINE_TYPE_WITH_POOL_CONSTRUCTOR ( Namespace,
CPPName,
CfgTypeString )
Value:
struct VMeta_ ## CPPName : public VMeta \
{ \
ALIB_DLL String typeName () const override { return CfgTypeString; } \
ALIB_DBG(ALIB_DLL const std::type_info& dbgTypeID() override { return typeid(Namespace CPPName); } ) \
ALIB_DLL void construct(void* obj, PoolAllocator& pool) override { new (obj) Namespace CPPName(pool); } \
ALIB_DLL void destruct (void* obj, PoolAllocator&) override { reinterpret_cast<Namespace CPPName*>(obj)->~CPPName(); } \
ALIB_DLL size_t size () override { static_assert(alignof(Namespace CPPName) <= alib::PoolAllocator::MAX_ALIGNMENT); return (std::max)( sizeof(Namespace CPPName), sizeof(void*) ); } \
ALIB_DLL void imPort (VDATA*, Configuration&, const StringEscaper&, const String&) override;\
ALIB_DLL void exPort (VDATA*, Configuration&, const StringEscaper&, AString&) override;\
};}

Same as ALIB_VARIABLES_DEFINE_TYPE with the only difference that virtual override VMeta::construct passes the pool allocator of the configuration instance to the constructor of the custom type.

Parameters
NamespaceThe namespace of the type to enable as an ALib variable.
CPPNameThe name of the type to enable as an ALib variable.
CfgTypeStringThe type string used to declare variables of this type.

Definition at line 117 of file variables.prepro.hpp.

◆ ALIB_VARIABLES_REGISTER_TYPE

#define ALIB_VARIABLES_REGISTER_TYPE ( CPPName)
Value:
GetConfig()->RegisterType<alib::variables::detail::VMeta_ ## CPPName>();

Registers a custom implementation of abstract class VMeta, which has been previously defined with macro ALIB_VARIABLES_DEFINE_TYPE with the configuration object received by a call to GetConfig(). This macro is to be placed in Camp::Bootstrap in the section of phase PrepareConfig. The macro invokes method Configuration::RegisterType, which has to be called 'manually' if for some reason the placement of registration can't be done as proposed.

Parameters
CPPNameThe name of the type to enable as an ALib variable (excluding the namespace).

Definition at line 131 of file variables.prepro.hpp.

◆ ALIB_VERSION

#define ALIB_VERSION   2510

The ALib version number. The value of this macro is stored in namespace variable alib::VERSION.

See also
Programmer's manual chapter 9. Assuring Compilation Compatibility.

Definition at line 20 of file alib.inl.

◆ ALIB_WARNING

#define ALIB_WARNING ( domain,
... )
Value:
{ ALIB_DEBUG_ASSERTION_PRINTABLES_DO(__VA_ARGS__) alib::assert::Raise( ALIB_CALLER_PRUNED, 1, domain, __VA_ARGS__ ); }

Writes the given message objects as an warning.

Parameters
domainThe domain of the assertion. (Usually the ALib Module.)
...The objects used to format the message string.

Definition at line 1046 of file alib.inl.

◆ ALIB_WARNINGS_ALLOW_BITWISE_SWITCH

#define ALIB_WARNINGS_ALLOW_BITWISE_SWITCH
Value:
_Pragma("clang diagnostic push") \
_Pragma("clang diagnostic ignored \"-Wswitch\"") \
_Pragma("clang diagnostic ignored \"-Wcovered-switch-default\"") \

Preprocessor macro to disable compiler warnings when a "bitwise type scoped enumeration" (see BitwiseTraits) or similar types with 'sparse' case coverage are used in a switch statement.

Definition at line 642 of file alib.inl.

◆ ALIB_WARNINGS_ALLOW_MACRO_REDEFINITION

#define ALIB_WARNINGS_ALLOW_MACRO_REDEFINITION
Value:
_Pragma("clang diagnostic push") \
_Pragma("clang diagnostic ignored \"-Wmacro-redefined\"") \

Preprocessor macro to disable compiler warnings on redefining macros without prior un-defining.

Definition at line 620 of file alib.inl.

◆ ALIB_WARNINGS_ALLOW_NULL_POINTER_PASSING

#define ALIB_WARNINGS_ALLOW_NULL_POINTER_PASSING    _Pragma("clang diagnostic push") \

Preprocessor macro to disable GCC warning "nonnull". Used for example with template meta programming below C++ 14 standard.

Definition at line 609 of file alib.inl.

◆ ALIB_WARNINGS_ALLOW_SHIFT_COUNT_OVERFLOW

#define ALIB_WARNINGS_ALLOW_SHIFT_COUNT_OVERFLOW
Value:
_Pragma("clang diagnostic push") \
_Pragma("clang diagnostic ignored \"-Wshift-count-overflow\"") \

Preprocessor macro to disable compiler warnings concerning overflows during bit-shift operations.

Definition at line 647 of file alib.inl.

◆ ALIB_WARNINGS_ALLOW_SPARSE_ENUM_SWITCH

#define ALIB_WARNINGS_ALLOW_SPARSE_ENUM_SWITCH
Value:
_Pragma("clang diagnostic push") \
_Pragma("clang diagnostic ignored \"-Wswitch\"") \
_Pragma("clang diagnostic ignored \"-Wswitch-enum\"") \

Preprocessor macro to disable compiler warnings when an enumeration element is switched while not all enumeration elements get caught.

Definition at line 637 of file alib.inl.

◆ ALIB_WARNINGS_ALLOW_UNREACHABLE_CODE

#define ALIB_WARNINGS_ALLOW_UNREACHABLE_CODE
Value:
_Pragma("clang diagnostic push") \
_Pragma("clang diagnostic ignored \"-Wunreachable-code\"") \

Preprocessor macro to disable compiler warnings about detected unreachable code. (i.e with clang this ignores "-Wunreachable-code" )

Definition at line 612 of file alib.inl.

◆ ALIB_WARNINGS_ALLOW_UNSAFE_FUNCTION_OR_VARIABLE

#define ALIB_WARNINGS_ALLOW_UNSAFE_FUNCTION_OR_VARIABLE
Value:
_Pragma("clang diagnostic push") \
_Pragma("clang diagnostic ignored \"-Wunused-macros\"") \

Preprocessor macro to disable compiler warnings for use of 'unsafe' (deprecated) library functions. Currently used with MSVC 4996 only.

Definition at line 624 of file alib.inl.

◆ ALIB_WARNINGS_IGNORE_DEPRECATED

#define ALIB_WARNINGS_IGNORE_DEPRECATED
Value:
_Pragma("clang diagnostic push") \
_Pragma("clang diagnostic ignored \"-Wdeprecated-declarations\"") \

Preprocessor macro to disable compiler warnings concerning the use of deprecated functions and types.

Definition at line 651 of file alib.inl.

◆ ALIB_WARNINGS_IGNORE_DOCS

#define ALIB_WARNINGS_IGNORE_DOCS
Value:
_Pragma("clang diagnostic push") \
_Pragma("clang diagnostic ignored \"-Wdocumentation\"") \

Preprocessor macro to disable compiler warnings according to source documentation (as of today known to be thrown by clang only).

Definition at line 688 of file alib.inl.

◆ ALIB_WARNINGS_IGNORE_FUNCTION_TEMPLATE

#define ALIB_WARNINGS_IGNORE_FUNCTION_TEMPLATE
Value:
_Pragma("clang diagnostic push") \
_Pragma("clang diagnostic ignored \"-Wunused-template\"") \

Preprocessor macro to disable compiler warnings concerning unused function templates.

Definition at line 677 of file alib.inl.

◆ ALIB_WARNINGS_IGNORE_INTEGER_OVERFLOW

#define ALIB_WARNINGS_IGNORE_INTEGER_OVERFLOW
Value:
_Pragma("clang diagnostic push") \
_Pragma("clang diagnostic ignored \"-Winteger-overflow\"") \

Preprocessor macro to disable compiler warnings about code that may cause an overflow of an integral value, e.g., with bit-shift operations.

Definition at line 696 of file alib.inl.

◆ ALIB_WARNINGS_IGNORE_INTEGRAL_CONSTANT_OVERFLOW

#define ALIB_WARNINGS_IGNORE_INTEGRAL_CONSTANT_OVERFLOW    _Pragma("clang diagnostic push") \

Preprocessor macro to disable compiler warnings about code that may cause an overflow of an integral constant.

Definition at line 685 of file alib.inl.

◆ ALIB_WARNINGS_IGNORE_NOTHING_RETURNED

#define ALIB_WARNINGS_IGNORE_NOTHING_RETURNED
Value:
_Pragma("clang diagnostic push") \
_Pragma("clang diagnostic ignored \"-Wreturn-type\"") \

Preprocessor macro to disable compiler warnings concerning non-void functions that may not return a value. Needed when compiler cannot properly detect the inherent safeness (correctness) of a function that always is returning a type.

Definition at line 681 of file alib.inl.

◆ ALIB_WARNINGS_IGNORE_RESERVED_IDENTIFIER

#define ALIB_WARNINGS_IGNORE_RESERVED_IDENTIFIER
Value:
_Pragma("clang diagnostic push") \
_Pragma("clang diagnostic ignored \"-Wreserved-identifier\"") \

Preprocessor macro to disable compiler warnings concerning conflicting identifier names. Usually identifiers with double underscore ('_') are forbidden, but with some preprocessor macros, those are not easily avoidable.

Definition at line 692 of file alib.inl.

◆ ALIB_WARNINGS_IGNORE_SIGN_CONVERSION

#define ALIB_WARNINGS_IGNORE_SIGN_CONVERSION
Value:
_Pragma("clang diagnostic push") \
_Pragma("clang diagnostic ignored \"-Wsign-conversion\"") \

Preprocessor macro to disable compiler warnings about code that changes signedness of integral values.

Definition at line 700 of file alib.inl.

◆ ALIB_WARNINGS_IGNORE_UNUSED_FUNCTION

#define ALIB_WARNINGS_IGNORE_UNUSED_FUNCTION
Value:
_Pragma("clang diagnostic push") \
_Pragma("clang diagnostic ignored \"-Wunused-function\"") \
_Pragma("clang diagnostic ignored \"-Wunused-member-function\"") \
_Pragma("clang diagnostic ignored \"-Wunused-template\"") \

Preprocessor macro to disable compiler warnings concerning unused (member-) functions. (This macro is only used with unit testing and documentation sample code.)

Definition at line 667 of file alib.inl.

◆ ALIB_WARNINGS_IGNORE_UNUSED_LAMBDA_CAPTURE

#define ALIB_WARNINGS_IGNORE_UNUSED_LAMBDA_CAPTURE
Value:
_Pragma("clang diagnostic push") \
_Pragma("clang diagnostic ignored \"-Wunused-lambda-capture\"") \

Preprocessor macro to disable compiler warnings concerning unused (member-) functions. (Needed, because it can happen that gcc needs a this captured, while clang complains it was unnecessary.)

Definition at line 673 of file alib.inl.

◆ ALIB_WARNINGS_IGNORE_UNUSED_MACRO

#define ALIB_WARNINGS_IGNORE_UNUSED_MACRO
Value:
_Pragma("clang diagnostic push") \
_Pragma("clang diagnostic ignored \"-Wunused-macros\"") \

Preprocessor macro to disable compiler warnings concerning unused macro definitions.

Definition at line 655 of file alib.inl.

◆ ALIB_WARNINGS_IGNORE_UNUSED_PARAMETER

#define ALIB_WARNINGS_IGNORE_UNUSED_PARAMETER
Value:
_Pragma("clang diagnostic push") \
_Pragma("clang diagnostic ignored \"-Wunused-parameter\"") \

Preprocessor macro to disable compiler warnings concerning unused parameters. (This macro is only used with unit testing and documentation sample code.)

Definition at line 659 of file alib.inl.

◆ ALIB_WARNINGS_IGNORE_UNUSED_VARIABLE

#define ALIB_WARNINGS_IGNORE_UNUSED_VARIABLE
Value:
_Pragma("clang diagnostic push") \
_Pragma("clang diagnostic ignored \"-Wunused-variable\"") \

Preprocessor macro to disable compiler warnings concerning unused parameters. (This macro is only used with unit testing and documentation sample code.)

Definition at line 663 of file alib.inl.

◆ ALIB_WARNINGS_MACRO_NOT_USED_OFF

#define ALIB_WARNINGS_MACRO_NOT_USED_OFF
Value:
_Pragma("clang diagnostic push") \
_Pragma("clang diagnostic ignored \"-Wunused-macros\"") \

Preprocessor macro to disable compiler warnings about unused preprocessor macros.

Definition at line 629 of file alib.inl.

◆ ALIB_WARNINGS_OVERLOAD_VIRTUAL_OFF

#define ALIB_WARNINGS_OVERLOAD_VIRTUAL_OFF
Value:
_Pragma("clang diagnostic push") \
_Pragma("clang diagnostic ignored \"-Woverloaded-virtual\"") \

Preprocessor macro to disable compiler warnings about virtual methods that become hidden by overloaded methods with a different signature.

Definition at line 616 of file alib.inl.

◆ ALIB_WARNINGS_RESERVED_MACRO_NAME_OFF

#define ALIB_WARNINGS_RESERVED_MACRO_NAME_OFF
Value:
_Pragma("clang diagnostic push") \
_Pragma("clang diagnostic ignored \"-Wreserved-macro-identifier\"") \

Preprocessor macro to disable compiler warnings about reserved macro names. (i.e with clang this ignores "-Wreserved-macro-identifier" )

Definition at line 633 of file alib.inl.

◆ ALIB_WARNINGS_RESTORE

#define ALIB_WARNINGS_RESTORE    _Pragma("clang diagnostic pop") \

Resets compiler warning settings to the state before one of the other macros of this section had been placed. Every such placement should have a corresponding placement of this macro.

Definition at line 705 of file alib.inl.

◆ ALIB_WARNINGS_UNINITIALIZED_OFF

#define ALIB_WARNINGS_UNINITIALIZED_OFF
Value:
_Pragma("clang diagnostic push") \
_Pragma("clang diagnostic ignored \"-Wuninitialized\"") \
_Pragma("clang diagnostic ignored \"-Wconditional-uninitialized\"") \

Preprocessor macro to disable compiler warnings about uninitialized values.

Definition at line 604 of file alib.inl.

◆ bitsof

#define bitsof ( type)
Value:
int(sizeof(type) * 8)

Like C++ keyword sizeof but returns the number of bits of the type of the given value. The return type is int instead of size_t, which satisfies ALib code conventions.

Note
To improve code readability, namely to a) indicate that this is an inlined, constant expression and b) to indicate that this is just using keyword sizeof, as an exception from the naming rules, this function is spelled in lower case.
See also
Function alib::lang::bitsofval(const T&)

Definition at line 1418 of file alib.inl.

◆ CALCULUS_CALLBACK

#define CALCULUS_CALLBACK ( func)
Value:
func, ALIB_NSTRINGIFY(func)
#define ALIB_NSTRINGIFY(a)
Definition alib.inl:919

Writes given callback function name func along with a comma (',') and a "stringified" version of the C++ function name.

In release compilations, the macro resolves just to func.

This macro is to be used to define records of types Calculus::FunctionEntry, Calculus::OperatorTableEntry and to provide parameters to function Calculus::AddOperator.

Parameters
funcThe name of the callback function.

Definition at line 20 of file expressions.prepro.hpp.

◆ CALCULUS_DEFAULT_AUTOCAST

#define CALCULUS_DEFAULT_AUTOCAST   nullptr, nullptr

This macro is to be used to define records of type Calculus::AutoCastEntry.

With debug-builds, it provides nullptr for table entries AutoCastEntry::Callback and AutoCastEntry::DbgCallbackName. In release compilations the latter is omitted.

Definition at line 21 of file expressions.prepro.hpp.

◆ CALCULUS_SIGNATURE

#define CALCULUS_SIGNATURE ( BoxPointerArray)
Value:
BoxPointerArray, std::extent<decltype(BoxPointerArray)>::value

This macro is to be used to define records of type Calculus::FunctionEntry.

The macro resolves to two values separated by a comma (','). The first is a plain copy of given BoxPointerArray, which has to be a C++ array of pointers to type Box. The second value written will be the array's extent.

Parameters
BoxPointerArraynullptr for identifiers, otherwise the list of argument sample boxes provided as a Box**.

Definition at line 27 of file expressions.prepro.hpp.

◆ IF_ALIB_ALOX

#define IF_ALIB_ALOX ( ...)
Value:
__VA_ARGS__

Prunes given code ... if ALox is not included in the ALib Build.

See also
Symbol ALIB_ALOX and sibling macro IFNOT_ALIB_ALOX.
Parameters
...The source to select.

Definition at line 257 of file alib.inl.

◆ IF_ALIB_BITBUFFER

#define IF_ALIB_BITBUFFER ( ...)
Value:
__VA_ARGS__

Prunes given code ... if ALib BitBuffer is not included in the ALib Build.

See also
Symbol ALIB_BITBUFFER and sibling macro IFNOT_ALIB_BITBUFFER.
Parameters
...The source to select.

Definition at line 265 of file alib.inl.

◆ IF_ALIB_BOXING

#define IF_ALIB_BOXING ( ...)
Value:
__VA_ARGS__

Prunes given code ... if ALib Boxing is not included in the ALib Build.

See also
Symbol ALIB_BOXING and sibling macro IFNOT_ALIB_BOXING.
Parameters
...The source to select.

Definition at line 273 of file alib.inl.

◆ IF_ALIB_CAMP

#define IF_ALIB_CAMP ( ...)
Value:
__VA_ARGS__

Prunes given code ... if ALib Resources is not included in the ALib Build.

See also
Symbol ALIB_CAMP and sibling macro IFNOT_ALIB_CAMP.
Parameters
...The source to select.

Definition at line 385 of file alib.inl.

◆ IF_ALIB_CLI

#define IF_ALIB_CLI ( ...)
Value:
__VA_ARGS__

Prunes given code ... if ALib CLI is not included in the ALib Build.

See also
Symbol ALIB_CLI and sibling macro IFNOT_ALIB_CLI.
Parameters
...The source to select.

Definition at line 313 of file alib.inl.

◆ IF_ALIB_CONTAINERS

#define IF_ALIB_CONTAINERS ( ...)
Value:
__VA_ARGS__

Prunes given code ... if ALib Containers is not included in the ALib Build.

See also
Symbol ALIB_CONTAINERS and sibling macro IFNOT_ALIB_CONTAINERS.
Parameters
...The source to select.

Definition at line 329 of file alib.inl.

◆ IF_ALIB_ENUMRECORDS

#define IF_ALIB_ENUMRECORDS ( ...)
Value:
__VA_ARGS__

Prunes given code ... if ALib EnumRecords is not included in the ALib Build.

See also
Symbol ALIB_ENUMRECORDS and sibling macro IFNOT_ALIB_ENUMRECORDS.
Parameters
...The source to select.

Definition at line 337 of file alib.inl.

◆ IF_ALIB_EXCEPTIONS

#define IF_ALIB_EXCEPTIONS ( ...)
Value:
__VA_ARGS__

Prunes given code ... if ALib Exceptions is not included in the ALib Build.

See also
Symbol ALIB_EXCEPTIONS and sibling macro IFNOT_ALIB_EXCEPTIONS.
Parameters
...The source to select.

Definition at line 289 of file alib.inl.

◆ IF_ALIB_EXPRESSIONS

#define IF_ALIB_EXPRESSIONS ( ...)
Value:
__VA_ARGS__

Prunes given code ... if ALib Expressions is not included in the ALib Build.

See also
Symbol ALIB_EXPRESSIONS and sibling macro IFNOT_ALIB_EXPRESSIONS.
Parameters
...The source to select.

Definition at line 345 of file alib.inl.

◆ IF_ALIB_FILES

#define IF_ALIB_FILES ( ...)
Value:
__VA_ARGS__

Prunes given code ... if ALib Files is not included in the ALib Build.

See also
Symbol ALIB_FILES and sibling macro IFNOT_ALIB_FILES.
Parameters
...The source to select.

Definition at line 353 of file alib.inl.

◆ IF_ALIB_FORMAT

#define IF_ALIB_FORMAT ( ...)
Value:
__VA_ARGS__

Prunes given code ... if ALib Format is not included in the ALib Build.

See also
Symbol ALIB_FORMAT and sibling macro IFNOT_ALIB_FORMAT.
Parameters
...The source to select.

Definition at line 281 of file alib.inl.

◆ IF_ALIB_MONOMEM

#define IF_ALIB_MONOMEM ( ...)
Value:
__VA_ARGS__

Prunes given code ... if ALib Monomem is not included in the ALib Build.

See also
Symbol ALIB_MONOMEM and sibling macro IFNOT_ALIB_MONOMEM.
Parameters
...The source to select.

Definition at line 361 of file alib.inl.

◆ IF_ALIB_RESOURCES

#define IF_ALIB_RESOURCES ( ...)
Value:
__VA_ARGS__

Prunes given code ... if ALib Resources is not included in the ALib Build.

See also
Symbol ALIB_RESOURCES and sibling macro IFNOT_ALIB_RESOURCES.
Parameters
...The source to select.

Definition at line 305 of file alib.inl.

◆ IF_ALIB_SINGLETONS

#define IF_ALIB_SINGLETONS ( ...)
Value:
__VA_ARGS__

Prunes given code ... if ALib Singletons is not included in the ALib Build.

See also
Symbol ALIB_SINGLETONS and sibling macro IFNOT_ALIB_SINGLETONS.
Parameters
...The source to select.

Definition at line 369 of file alib.inl.

◆ IF_ALIB_STRINGS

#define IF_ALIB_STRINGS ( ...)
Value:
__VA_ARGS__

Prunes given code ... if ALib Strings is not included in the ALib Build.

See also
Symbol ALIB_STRINGS and sibling macro IFNOT_ALIB_STRINGS.
Parameters
...The source to select.

Definition at line 377 of file alib.inl.

◆ IF_ALIB_SYSTEM

#define IF_ALIB_SYSTEM ( ...)
Value:
__VA_ARGS__

Prunes given code ... if ALib System is not included in the ALib Build.

See also
Symbol ALIB_SYSTEM and sibling macro IFNOT_ALIB_SYSTEM.
Parameters
...The source to select.

Definition at line 297 of file alib.inl.

◆ IF_ALIB_THREADMODEL

#define IF_ALIB_THREADMODEL ( ...)
Value:
__VA_ARGS__

Prunes given code ... if ALib ThreadModel is not included in the ALib Build.

See also
Symbol ALIB_THREADMODEL and sibling macro IFNOT_ALIB_THREADMODEL.
Parameters
...The source to select.

Definition at line 393 of file alib.inl.

◆ IF_ALIB_THREADS

#define IF_ALIB_THREADS ( ...)
Value:
__VA_ARGS__

Prunes given code ... if ALib Threads is not included in the ALib Build.

See also
Symbol ALIB_SINGLE_THREADED and sibling macro IFNOT_ALIB_THREADS.
Parameters
...The source to select.

Definition at line 401 of file alib.inl.

◆ IF_ALIB_VARIABLES

#define IF_ALIB_VARIABLES ( ...)
Value:
__VA_ARGS__

Prunes given code ... if ALib Variables is not included in the ALib Build.

See also
Symbol ALIB_VARIABLES and sibling macro IFNOT_ALIB_VARIABLES.
Parameters
...The source to select.

Definition at line 321 of file alib.inl.

◆ IFNOT_ALIB_ALOX

#define IFNOT_ALIB_ALOX ( ...)

Prunes given code ... if ALox is not included in the ALib Build.

See also
Symbol ALIB_ALOX and sibling macro IF_ALIB_ALOX.
Parameters
...The source to select.

Definition at line 258 of file alib.inl.

◆ IFNOT_ALIB_BITBUFFER

#define IFNOT_ALIB_BITBUFFER ( ...)

Prunes given code ... if ALib BitBuffer is not included in the ALib Build.

See also
Symbol ALIB_BITBUFFER and sibling macro IF_ALIB_BITBUFFER.
Parameters
...The source to select.

Definition at line 266 of file alib.inl.

◆ IFNOT_ALIB_BOXING

#define IFNOT_ALIB_BOXING ( ...)

Prunes given code ... if ALib Boxing is not included in the ALib Build.

See also
Symbol ALIB_BOXING and sibling macro IF_ALIB_BOXING.
Parameters
...The source to select.

Definition at line 274 of file alib.inl.

◆ IFNOT_ALIB_CAMP

#define IFNOT_ALIB_CAMP ( ...)

Prunes given code ... if ALib Resources is not included in the ALib Build.

See also
Symbol ALIB_CAMP and sibling macro IF_ALIB_CAMP.
Parameters
...The source to select.

Definition at line 386 of file alib.inl.

◆ IFNOT_ALIB_CLI

#define IFNOT_ALIB_CLI ( ...)

Prunes given code ... if ALib CLI is not included in the ALib Build.

See also
Symbol ALIB_CLI and sibling macro IF_ALIB_CLI.
Parameters
...The source to select.

Definition at line 314 of file alib.inl.

◆ IFNOT_ALIB_CONTAINERS

#define IFNOT_ALIB_CONTAINERS ( ...)

Prunes given code ... if ALib Containers is not included in the ALib Build.

See also
Symbol ALIB_CONTAINERS and sibling macro IF_ALIB_CONTAINERS.
Parameters
...The source to select.

Definition at line 330 of file alib.inl.

◆ IFNOT_ALIB_ENUMRECORDS

#define IFNOT_ALIB_ENUMRECORDS ( ...)

Prunes given code ... if ALib EnumRecords is not included in the ALib Build.

See also
Symbol ALIB_ENUMRECORDS and sibling macro IF_ALIB_ENUMRECORDS.
Parameters
...The source to select.

Definition at line 338 of file alib.inl.

◆ IFNOT_ALIB_EXCEPTIONS

#define IFNOT_ALIB_EXCEPTIONS ( ...)

Prunes given code ... if ALib Exceptions is not included in the ALib Build.

See also
Symbol ALIB_EXCEPTIONS and sibling macro IF_ALIB_EXCEPTIONS.
Parameters
...The source to select.

Definition at line 290 of file alib.inl.

◆ IFNOT_ALIB_EXPRESSIONS

#define IFNOT_ALIB_EXPRESSIONS ( ...)

Prunes given code ... if ALib Expressions is not included in the ALib Build.

See also
Symbol ALIB_EXPRESSIONS and sibling macro IF_ALIB_EXPRESSIONS.
Parameters
...The source to select.

Definition at line 346 of file alib.inl.

◆ IFNOT_ALIB_FILES

#define IFNOT_ALIB_FILES ( ...)

Prunes given code ... if ALib Files is not included in the ALib Build.

See also
Symbol ALIB_FILES and sibling macro IF_ALIB_FILES.
Parameters
...The source to select.

Definition at line 354 of file alib.inl.

◆ IFNOT_ALIB_FORMAT

#define IFNOT_ALIB_FORMAT ( ...)

Prunes given code ... if ALib Format is not included in the ALib Build.

See also
Symbol ALIB_FORMAT and sibling macro IF_ALIB_FORMAT.
Parameters
...The source to select.

Definition at line 282 of file alib.inl.

◆ IFNOT_ALIB_MONOMEM

#define IFNOT_ALIB_MONOMEM ( ...)

Prunes given code ... if ALib Monomem is not included in the ALib Build.

See also
Symbol ALIB_MONOMEM and sibling macro IF_ALIB_MONOMEM.
Parameters
...The source to select.

Definition at line 362 of file alib.inl.

◆ IFNOT_ALIB_RESOURCES

#define IFNOT_ALIB_RESOURCES ( ...)

Prunes given code ... if ALib Resources is not included in the ALib Build.

See also
Symbol ALIB_RESOURCES and sibling macro IF_ALIB_RESOURCES.
Parameters
...The source to select.

Definition at line 306 of file alib.inl.

◆ IFNOT_ALIB_SINGLETONS

#define IFNOT_ALIB_SINGLETONS ( ...)

Prunes given code ... if ALib Singletons is not included in the ALib Build.

See also
Symbol ALIB_SINGLETONS and sibling macro IF_ALIB_SINGLETONS.
Parameters
...The source to select.

Definition at line 370 of file alib.inl.

◆ IFNOT_ALIB_STRINGS

#define IFNOT_ALIB_STRINGS ( ...)

Prunes given code ... if ALib Strings is not included in the ALib Build.

See also
Symbol ALIB_STRINGS and sibling macro IF_ALIB_STRINGS.
Parameters
...The source to select.

Definition at line 378 of file alib.inl.

◆ IFNOT_ALIB_SYSTEM

#define IFNOT_ALIB_SYSTEM ( ...)

Prunes given code ... if ALib System is not included in the ALib Build.

See also
Symbol ALIB_SYSTEM and sibling macro IF_ALIB_SYSTEM.
Parameters
...The source to select.

Definition at line 298 of file alib.inl.

◆ IFNOT_ALIB_THREADMODEL

#define IFNOT_ALIB_THREADMODEL ( ...)

Prunes given code ... if ALib ThreadModel is not included in the ALib Build.

See also
Symbol ALIB_THREADMODEL and sibling macro IF_ALIB_THREADMODEL.
Parameters
...The source to select.

Definition at line 394 of file alib.inl.

◆ IFNOT_ALIB_THREADS

#define IFNOT_ALIB_THREADS ( ...)

Prunes given code ... if ALib Threads is not included in the ALib Build.

See also
Symbol ALIB_SINGLE_THREADED and sibling macro IF_ALIB_THREADS.
Parameters
...The source to select.

Definition at line 402 of file alib.inl.

◆ IFNOT_ALIB_VARIABLES

#define IFNOT_ALIB_VARIABLES ( ...)

Prunes given code ... if ALib Variables is not included in the ALib Build.

See also
Symbol ALIB_VARIABLES and sibling macro IF_ALIB_VARIABLES.
Parameters
...The source to select.

Definition at line 322 of file alib.inl.

◆ LOG_ACQUIRE

#define LOG_ACQUIRE   { alib::lox::Lox& _log= LOG_LOX; _log.Acquire( LOG_CI );

Macro that is placed at the beginning of almost all debug logging macros. Provides scope information (provided that ALOX_DBG_LOG_CI is set) to the lox and places the debug lox instance access code using LOG_LOX.

Definition at line 69 of file alox.prepro.hpp.

◆ Log_AddDebugLogger

#define Log_AddDebugLogger ( )
Value:
static ALIB_DLL void AddDebugLogger(Lox *lox)
Definition alox.cpp:207
#define LOG_RELEASE
#define LOG_ACQUIRE
#define Log_Prune(...)

Invokes Log::AddDebugLogger to create, add and configure a default debug logger suitable for the platform and toolset.

Parameters
...The parameters to pass.

Definition at line 83 of file alox.prepro.hpp.

◆ Log_Assert

#define Log_Assert ( ...)
Value:
{ Log_Prune( LOG_ACQUIRE _log.Assert ( __VA_ARGS__ ); LOG_RELEASE ) }

Invokes Lox::Assert on the debug singleton of class Lox defined in macro LOG_LOX.

Parameters
...The parameters to pass.

Definition at line 99 of file alox.prepro.hpp.

◆ LOG_CI

#define LOG_CI   ALIB_CALLER

Dependent on ALOX_DBG_LOG_CI, this macro provides comma delimited source information (sourcefile, line number, function name) or corresponding null values.

Definition at line 50 of file alox.prepro.hpp.

◆ Log_ClearSourcePathTrimRules

#define Log_ClearSourcePathTrimRules ( ...)
Value:
{ Log_Prune( LOG_ACQUIRE _log.ClearSourcePathTrimRules( __VA_ARGS__ ); LOG_RELEASE ) }

Invokes Lox::ClearSourcePathTrimRules on the debug singleton of class Lox defined in macro LOG_LOX.

Parameters
...The parameters to pass.

Definition at line 82 of file alox.prepro.hpp.

◆ Log_Entry

#define Log_Entry ( ...)
Value:
{ Log_Prune( LOG_ACQUIRE _log.Entry ( __VA_ARGS__ ); LOG_RELEASE ) }

Invokes Lox::Entry on the debug singleton of class Lox defined in macro LOG_LOX.

Parameters
...The parameters to pass.

Definition at line 102 of file alox.prepro.hpp.

◆ Log_Error

#define Log_Error ( ...)
Value:
{ Log_Prune( LOG_ACQUIRE _log.Error ( __VA_ARGS__ ); LOG_RELEASE ) }

Invokes Lox::Error on the debug singleton of class Lox defined in macro LOG_LOX.

Parameters
...The parameters to pass.

Definition at line 98 of file alox.prepro.hpp.

◆ Log_Exception

#define Log_Exception ( ...)
Value:
static ALIB_DLL void Exception(Lox &lox, const exceptions::Exception &e, Verbosity verbosity=Verbosity::Error, const NString &domainPrefix="/ERR", const String &logPrefix=A_CHAR(" "))
Definition logtools.cpp:40
#define LOG_LOX

Invokes LogTools::Exception providing the debug singleton of class Lox defined in macro LOG_LOX.

Parameters
...The parameters to pass.

Definition at line 107 of file alox.prepro.hpp.

◆ Log_GetLogger

#define Log_GetLogger ( identifier,
name )
Value:
LOG_ACQUIRE identifier= _log.GetLogger( name ); LOG_RELEASE )

Invokes Lox::GetLogger on the debug singleton of class Lox defined in macro LOG_LOX.

Parameters
identifierThe identifier name of the variable that receives the pointer to the logger.
nameThe name of the logger to retrieve.

Definition at line 85 of file alox.prepro.hpp.

◆ Log_If

#define Log_If ( ...)
Value:
{ Log_Prune( LOG_ACQUIRE _log.If ( __VA_ARGS__ ); LOG_RELEASE ) }

Invokes Lox::If on the debug singleton of class Lox defined in macro LOG_LOX.

Parameters
...The parameters to pass.

Definition at line 100 of file alox.prepro.hpp.

◆ Log_Info

#define Log_Info ( ...)
Value:
{ Log_Prune( LOG_ACQUIRE _log.Info ( __VA_ARGS__ ); LOG_RELEASE ) }

Invokes Lox::Info on the debug singleton of class Lox defined in macro LOG_LOX.

Parameters
...The parameters to pass.

Definition at line 96 of file alox.prepro.hpp.

◆ Log_IsActive

#define Log_IsActive ( result,
... )
Value:
Log_Prune( LOG_ACQUIRE result= _log.IsActive( __VA_ARGS__ ); LOG_RELEASE )

Invokes Lox::IsActive on the object of type Lox defined in macro LOG_LOX. The result value is assigned to given variable result

Parameters
resultThe name of a variable of type int that the return value of IsActive() is assigned to.
...The parameters to pass.

Definition at line 106 of file alox.prepro.hpp.

◆ Log_LogState

#define Log_LogState ( ...)
Value:
{ Log_Prune( LOG_ACQUIRE _log.State ( __VA_ARGS__ ); LOG_RELEASE ) }

Invokes Lox::State on the debug singleton of class Lox defined in macro LOG_LOX.

Parameters
...The parameters to pass.

Definition at line 94 of file alox.prepro.hpp.

◆ LOG_LOX

#define LOG_LOX   (*alib::lox::Log::Get())

The Lox instance used by all debug logging macros. This can be overwritten (prior or after including alox.hpp) to allow different instances of class Lox for debug logging within different source entities. However, other ways to structure log output and to separate log information into different streams exists in ALox and overwriting this macro is not recommended for standard use cases.

Note: The definition must provide a reference (not a pointer) to the Lox object.

Definition at line 45 of file alox.prepro.hpp.

◆ Log_MapThreadName

#define Log_MapThreadName ( ...)
Value:
{ Log_Prune( LOG_ACQUIRE _log.MapThreadName( __VA_ARGS__ ); LOG_RELEASE ) }

Invokes Lox::MapThreadName on the debug singleton of class Lox defined in macro LOG_LOX.

Parameters
...The parameters to pass.

Definition at line 93 of file alox.prepro.hpp.

◆ Log_Once

#define Log_Once ( ...)
Value:
{ Log_Prune( LOG_ACQUIRE _log.Once ( __VA_ARGS__ ); LOG_RELEASE ) }

Invokes Lox::Once on the debug singleton of class Lox defined in macro LOG_LOX.

Parameters
...The parameters to pass.

Definition at line 101 of file alox.prepro.hpp.

◆ Log_Prune

#define Log_Prune ( ...)
Value:
__VA_ARGS__

This very simple macro is used for pruning debug Log Statements. While it is used as a building block of all other macros for debug logging, for code entities using ALox, it provides an easy way to prune code lines that get inserted purely to support logging, e.g., to create ALox loggers or to prepare more complex log output. (The alternative way is to enclose such code within #ifdef ALOX_DBG_LOG / #endif preprocessor lines.

Depends on ALOX_DBG_LOG. If this is set, the macro just copies the code provided, else it does not copy it, hence removes the code.

Definition at line 76 of file alox.prepro.hpp.

◆ LOG_RELEASE

#define LOG_RELEASE   _log.Release(); }

Macro that is placed at the end of almost all debug logging macros. Releases the lox which was acquired when passing scope information (in macro LOG_ACQUIRE.).

Definition at line 70 of file alox.prepro.hpp.

◆ Log_RemoveDebugLogger

#define Log_RemoveDebugLogger ( )
Value:
static ALIB_DLL void RemoveDebugLogger(Lox *lox)
Definition alox.cpp:275

Invokes Log::RemoveDebugLogger to remove and delete a debug logger created by Log::AddDebugLogger.

Parameters
...The parameters to pass.

Definition at line 84 of file alox.prepro.hpp.

◆ Log_RemoveLogger

#define Log_RemoveLogger ( logger)
Value:
{ Log_Prune( LOG_ACQUIRE _log.RemoveLogger ( logger ); LOG_RELEASE ) }

Invokes Lox::RemoveLogger on the debug singleton of class Lox defined in macro LOG_LOX.

Parameters
loggerEither the name of or a pointer to the logger to remove.

Definition at line 87 of file alox.prepro.hpp.

◆ Log_RemoveThreadDomain

#define Log_RemoveThreadDomain ( ...)
Value:
{ Log_Prune( LOG_ACQUIRE _log.RemoveThreadDomain( __VA_ARGS__ ); LOG_RELEASE ) }

Invokes Lox::RemoveThreadDomain on the debug singleton of class Lox defined in macro LOG_LOX.

Parameters
...The parameters to pass.

Definition at line 89 of file alox.prepro.hpp.

◆ Log_Retrieve

#define Log_Retrieve ( data,
... )
Value:
Log_Prune( Box data; LOG_ACQUIRE data= _log.Retrieve( __VA_ARGS__ ); LOG_RELEASE )

Invokes Lox::Retrieve on the debug singleton of class Lox defined in macro LOG_LOX.

Parameters
dataThe identifier name of the Box object to take the retrieved data.
...The parameters to pass.

Definition at line 105 of file alox.prepro.hpp.

◆ Log_SetDomain

#define Log_SetDomain ( ...)
Value:
{ Log_Prune( LOG_ACQUIRE _log.SetDomain ( __VA_ARGS__ ); LOG_RELEASE ) }

Invokes Lox::SetDomain on the debug singleton of class Lox defined in macro LOG_LOX.

Parameters
...The parameters to pass.

Definition at line 88 of file alox.prepro.hpp.

◆ Log_SetDomainSubstitutionRule

#define Log_SetDomainSubstitutionRule ( ...)
Value:
{ Log_Prune( LOG_ACQUIRE _log.SetDomainSubstitutionRule( __VA_ARGS__); LOG_RELEASE ) }

Invokes Lox::SetDomainSubstitutionRule on the debug singleton of class Lox defined in macro LOG_LOX.

Parameters
...The parameters to pass.

Definition at line 90 of file alox.prepro.hpp.

◆ Log_SetPrefix

#define Log_SetPrefix ( ...)
Value:
{ Log_Prune( LOG_ACQUIRE _log.SetPrefix ( __VA_ARGS__ ); LOG_RELEASE ) }

Invokes Lox::SetPrefix on the debug singleton of class Lox defined in macro LOG_LOX.

Parameters
...The parameters to pass.

Definition at line 103 of file alox.prepro.hpp.

◆ Log_SetSourcePathTrimRule

#define Log_SetSourcePathTrimRule ( ...)
Value:
{ Log_Prune( LOG_ACQUIRE _log.SetSourcePathTrimRule( __VA_ARGS__ ); LOG_RELEASE ) }

Invokes Lox::SetSourcePathTrimRule on the debug singleton of class Lox defined in macro LOG_LOX.

Parameters
...The parameters to pass.

Definition at line 81 of file alox.prepro.hpp.

◆ Log_SetStartTime

#define Log_SetStartTime ( ...)
Value:
{ Log_Prune( LOG_ACQUIRE _log.SetStartTime ( __VA_ARGS__ ); LOG_RELEASE ) }

Invokes Lox::SetStartTime on the debug singleton of class Lox defined in macro LOG_LOX.

Parameters
...The parameters to pass.

Definition at line 92 of file alox.prepro.hpp.

◆ Log_SetVerbosity

#define Log_SetVerbosity ( ...)
Value:
{ Log_Prune( LOG_ACQUIRE _log.SetVerbosity ( __VA_ARGS__ ); LOG_RELEASE ) }

Invokes one of the overloaded methods Lox::SetVerbosity on the debug singleton of class Lox defined in macro LOG_LOX.

Parameters
...The parameters to pass.

Definition at line 91 of file alox.prepro.hpp.

◆ Log_Store

#define Log_Store ( ...)
Value:
{ Log_Prune( LOG_ACQUIRE _log.Store ( __VA_ARGS__ ); LOG_RELEASE ) }

Invokes Lox::Store on the debug singleton of class Lox defined in macro LOG_LOX.

Parameters
...The parameters to pass.

Definition at line 104 of file alox.prepro.hpp.

◆ Log_Verbose

#define Log_Verbose ( ...)
Value:
{ Log_Prune( LOG_ACQUIRE _log.Verbose ( __VA_ARGS__ ); LOG_RELEASE ) }

Invokes Lox::Verbose on the debug singleton of class Lox defined in macro LOG_LOX.

Parameters
...The parameters to pass.

Definition at line 95 of file alox.prepro.hpp.

◆ Log_Warning

#define Log_Warning ( ...)
Value:
{ Log_Prune( LOG_ACQUIRE _log.Warning ( __VA_ARGS__ ); LOG_RELEASE ) }

Invokes Lox::Warning on the debug singleton of class Lox defined in macro LOG_LOX.

Parameters
...The parameters to pass.

Definition at line 97 of file alox.prepro.hpp.

◆ LOX_ACQUIRE

#define LOX_ACQUIRE   { alib::lox::Lox& _lox= LOX_LOX; _lox.Acquire( LOX_CI );

Macro that is placed at the beginning of almost all release logging macros. Provides scope information (provided that ALOX_REL_LOG_CI is set) to the lox and places the release lox instance access code using LOX_LOX.

Definition at line 71 of file alox.prepro.hpp.

◆ Lox_Assert

#define Lox_Assert ( ...)
Value:
{ Lox_Prune( LOX_ACQUIRE _lox.Assert ( __VA_ARGS__); LOX_RELEASE ) }
#define LOX_RELEASE
#define Lox_Prune(...)
#define LOX_ACQUIRE

Invokes Lox::Assert on the object of type Lox defined in macro LOX_LOX.

Parameters
...The parameters to pass.

Definition at line 132 of file alox.prepro.hpp.

◆ LOX_CI

#define LOX_CI   ALIB_CALLER

Dependent on ALOX_REL_LOG_CI, this macro provides comma delimited source information (sourcefile, line number, function name) or corresponding null values.

Definition at line 60 of file alox.prepro.hpp.

◆ Lox_ClearSourcePathTrimRules

#define Lox_ClearSourcePathTrimRules ( ...)
Value:
{ Lox_Prune( LOX_ACQUIRE _lox.ClearSourcePathTrimRules( __VA_ARGS__ ); LOX_RELEASE ) }

Invokes Lox::ClearSourcePathTrimRules on the object of type Lox defined in macro LOX_LOX.

Parameters
...The parameters to pass.

Definition at line 118 of file alox.prepro.hpp.

◆ Lox_Entry

#define Lox_Entry ( ...)
Value:
{ Lox_Prune( LOX_ACQUIRE _lox.Entry ( __VA_ARGS__ ); LOX_RELEASE ) }

Invokes Lox::Entry on the object of type Lox defined in macro LOX_LOX.

Parameters
...The parameters to pass.

Definition at line 135 of file alox.prepro.hpp.

◆ Lox_Error

#define Lox_Error ( ...)
Value:
{ Lox_Prune( LOX_ACQUIRE _lox.Error ( __VA_ARGS__ ); LOX_RELEASE ) }

Invokes Lox::Error on the object of type Lox defined in macro LOX_LOX.

Parameters
...The parameters to pass.

Definition at line 131 of file alox.prepro.hpp.

◆ Lox_Exception

#define Lox_Exception ( ...)
Value:
#define LOX_LOX

Invokes LogTools::Exception providing the object of type Lox defined in macro LOX_LOX.

Parameters
...The parameters to pass.

Definition at line 140 of file alox.prepro.hpp.

◆ Lox_GetLogger

#define Lox_GetLogger ( identifier,
name )
Value:
Lox_Prune( alib::lox::detail::Logger* identifier; LOX_ACQUIRE identifier= _lox.GetLogger ( name ); LOX_RELEASE )

Invokes Lox::GetLogger on the object of type Lox defined in macro LOX_LOX.

Parameters
identifierThe identifier name of the variable that receives the pointer to the logger.
nameThe name of the logger to retrieve.

Definition at line 119 of file alox.prepro.hpp.

◆ Lox_If

#define Lox_If ( ...)
Value:
{ Lox_Prune( LOX_ACQUIRE _lox.If ( __VA_ARGS__); LOX_RELEASE ) }

Invokes Lox::If on the object of type Lox defined in macro LOX_LOX.

Parameters
...The parameters to pass.

Definition at line 133 of file alox.prepro.hpp.

◆ Lox_Info

#define Lox_Info ( ...)
Value:
{ Lox_Prune( LOX_ACQUIRE _lox.Info ( __VA_ARGS__ ); LOX_RELEASE ) }

Invokes Lox::Info on the object of type Lox defined in macro LOX_LOX.

Parameters
...The parameters to pass.

Definition at line 129 of file alox.prepro.hpp.

◆ Lox_IsActive

#define Lox_IsActive ( result,
... )
Value:
{ Lox_Prune( LOX_ACQUIRE result= _lox.IsActive( __VA_ARGS__ ); LOX_RELEASE ) }

Invokes Lox::IsActive on the object of type Lox defined in macro LOX_LOX. The result value is assigned to given variable result

Parameters
resultThe name of a variable of type int that the return value of IsActive() is assigned to.
...The parameters to pass.

Definition at line 139 of file alox.prepro.hpp.

◆ Lox_LogState

#define Lox_LogState ( ...)
Value:
{ Lox_Prune( LOX_ACQUIRE _lox.State ( __VA_ARGS__ ); LOX_RELEASE ) }

Invokes Lox::State on the object of type Lox defined in macro LOX_LOX.

Parameters
...The parameters to pass.

Definition at line 127 of file alox.prepro.hpp.

◆ LOX_LOX

#define LOX_LOX

The Lox instance used by all release logging macros. This has to be set (prior or after including alox.hpp) to provide access to a, dedicated instance of class Lox created for release logging within software.
It is of course allowed to use different instances within different source entities. However, other ways to structure log output and separate log streams exists in ALox and should be evaluated before introducing different instances of class Lox.

Note: The definition must provide a reference (not a pointer) to the Lox object.

Definition at line 18 of file prepro_macros.md.

◆ Lox_MapThreadName

#define Lox_MapThreadName ( ...)
Value:
{ Lox_Prune( LOX_ACQUIRE _lox.MapThreadName( __VA_ARGS__ ); LOX_RELEASE ) }

Invokes Lox::MapThreadName on the object of type Lox defined in macro LOX_LOX.

Parameters
...The parameters to pass.

Definition at line 126 of file alox.prepro.hpp.

◆ Lox_Once

#define Lox_Once ( ...)
Value:
{ Lox_Prune( LOX_ACQUIRE _lox.Once ( __VA_ARGS__ ); LOX_RELEASE ) }

Invokes Lox::Once on the object of type Lox defined in macro LOX_LOX.

Parameters
...The parameters to pass.

Definition at line 134 of file alox.prepro.hpp.

◆ Lox_Prune

#define Lox_Prune ( ...)
Value:
__VA_ARGS__

This very simple macro is used for pruning release Log Statements at the moment release logging gets disabled (what in standard release scenarios is not done).

While it is used as a building block of all other macros for release logging, for code entities using ALox, it provides an easy way to prune code lines that get inserted purely to support logging, e.g., to create ALox loggers or to prepare more complex log output. (The alternative way is to enclose such code within #ifdef ALOX_REL_LOG / #endif preprocessor lines.

Depends on ALOX_REL_LOG. If this is set, the macro just copies the code provided, else it does not copy it, hence removes the code.

Parameters
...The code to prune.

Definition at line 112 of file alox.prepro.hpp.

◆ LOX_RELEASE

#define LOX_RELEASE   _lox.Release(); }

Macro that is placed at the end of almost all release logging macros.. Releases the lox which was acquired when passing scope information (in macro LOG_ACQUIRE.).

Definition at line 72 of file alox.prepro.hpp.

◆ Lox_RemoveLogger

#define Lox_RemoveLogger ( logger)
Value:
{ Lox_Prune( LOX_ACQUIRE _lox.RemoveLogger ( logger ); LOX_RELEASE ) }

Invokes Lox::RemoveLogger on the object of type Lox defined in macro LOX_LOX.

Parameters
loggerEither the name of or a pointer to the logger to remove.

Definition at line 120 of file alox.prepro.hpp.

◆ Lox_RemoveThreadDomain

#define Lox_RemoveThreadDomain ( ...)
Value:
{ Lox_Prune( LOX_ACQUIRE _lox.RemoveThreadDomain( __VA_ARGS__ ); LOX_RELEASE ) }

Invokes Lox::RemoveThreadDomain on the object of type Lox defined in macro LOX_LOX.

Parameters
...The parameters to pass.

Definition at line 122 of file alox.prepro.hpp.

◆ Lox_Retrieve

#define Lox_Retrieve ( data,
... )
Value:
{ Lox_Prune( LOX_ACQUIRE LogData* data= _lox.Retrieve( __VA_ARGS__ ); LOX_RELEASE ) }

Invokes Lox::Retrieve on the object of type Lox defined in macro LOX_LOX.

Parameters
dataThe identifier name of the Box object to take the retrieved data.
...The parameters to pass.

Definition at line 137 of file alox.prepro.hpp.

◆ Lox_SetDomain

#define Lox_SetDomain ( ...)
Value:
{ Lox_Prune( LOX_ACQUIRE _lox.SetDomain (__VA_ARGS__); LOX_RELEASE ) }

Invokes Lox::SetDomain on the object of type Lox defined in macro LOX_LOX.

Attention
If ALOX_REL_LOG_CI is not set, which is the default for release logging, and when used with language-related Scopes, this method will log an internal warning and will not be effective in respect to Scope::Path, Scope::Filename, and Scope::Method. See ALib Module ALox - Programmer's Manual for detailed information.

If Scope Domains based on source-related scopes should be supported in release logging, the ALib Build as well as the software entity have to be compiled with the compiler-symbol ALOX_REL_LOG_CI. Note that one effect of setting this symbol is, that information on source code paths and file names, as well as method names make their way into the release executable. This may not be wanted.

Parameters
...The parameters to pass.

Definition at line 121 of file alox.prepro.hpp.

◆ Lox_SetDomainSubstitutionRule

#define Lox_SetDomainSubstitutionRule ( ...)
Value:
{ Lox_Prune( LOX_ACQUIRE _lox.SetDomainSubstitutionRule( __VA_ARGS__ );LOX_RELEASE ) }

Invokes Lox::SetDomainSubstitutionRule on the object of type Lox defined in macro LOX_LOX.

Parameters
...The parameters to pass.

Definition at line 123 of file alox.prepro.hpp.

◆ Lox_SetPrefix

#define Lox_SetPrefix ( ...)
Value:
{ Lox_Prune( LOX_ACQUIRE _lox.SetPrefix ( __VA_ARGS__ ); LOX_RELEASE ) }

Invokes Lox::SetPrefix on the object of type Lox defined in macro LOX_LOX.

Parameters
...The parameters to pass.

Definition at line 138 of file alox.prepro.hpp.

◆ Lox_SetSourcePathTrimRule

#define Lox_SetSourcePathTrimRule ( ...)
Value:
{ Lox_Prune( LOX_ACQUIRE _lox.SetSourcePathTrimRule( __VA_ARGS__ ); LOX_RELEASE ) }

Invokes Lox::SetSourcePathTrimRule on the object of type Lox defined in macro LOX_LOX.

Parameters
...The parameters to pass.

Definition at line 117 of file alox.prepro.hpp.

◆ Lox_SetStartTime

#define Lox_SetStartTime ( ...)
Value:
{ Lox_Prune( LOX_ACQUIRE _lox.SetStartTime ( __VA_ARGS__ ); LOX_RELEASE ) }

Invokes Lox::SetStartTime on the object of type Lox defined in macro LOX_LOX.

Parameters
...The parameters to pass.

Definition at line 125 of file alox.prepro.hpp.

◆ Lox_SetVerbosity

#define Lox_SetVerbosity ( ...)
Value:
{ Lox_Prune( LOX_ACQUIRE _lox.SetVerbosity ( __VA_ARGS__ ); LOX_RELEASE ) }

Invokes one of the overloaded methods Lox::SetVerbosity on the object of type Lox defined in macro LOX_LOX.

Parameters
...The parameters to pass.

Definition at line 124 of file alox.prepro.hpp.

◆ Lox_Store

#define Lox_Store ( ...)
Value:
{ Lox_Prune( LOX_ACQUIRE _lox.Store ( __VA_ARGS__ ); LOX_RELEASE ) }

Invokes Lox::Store on the object of type Lox defined in macro LOX_LOX.

Attention
If ALOX_REL_LOG_CI is not set, which is the default for release logging statements, Log Data cannot be used in conjunction with language-related Scopes.
If Log Data should be supported in release logging, the ALib Build as well as the software entity have to be compiled with the compiler-symbol ALOX_REL_LOG_CI. Note that one effect of setting this symbol is, that information on source code paths and file names, as well as method names make their way into the release executable. This may not be wanted.
In general, methods Lox::Store and Lox::Retrieve should exclusively be used for debug logging. See user manual for more information.
Parameters
...The parameters to pass.

Definition at line 136 of file alox.prepro.hpp.

◆ Lox_Verbose

#define Lox_Verbose ( ...)
Value:
{ Lox_Prune( LOX_ACQUIRE _lox.Verbose ( __VA_ARGS__ ); LOX_RELEASE ) }

Invokes Lox::Verbose on the object of type Lox defined in macro LOX_LOX.

Parameters
...The parameters to pass.

Definition at line 128 of file alox.prepro.hpp.

◆ Lox_Warning

#define Lox_Warning ( ...)
Value:
{ Lox_Prune( LOX_ACQUIRE _lox.Warning ( __VA_ARGS__ ); LOX_RELEASE ) }

Invokes Lox::Warning on the object of type Lox defined in macro LOX_LOX.

Parameters
...The parameters to pass.

Definition at line 130 of file alox.prepro.hpp.