ALib C++ Library
Library Version: 2402 R1
Documentation generated by doxygen
Loading...
Searching...
No Matches
alib::boxing Namespace Reference

Description:


This is the reference documentation of sub-namespace boxing of the ALib C++ Library , which holds types of library module ALib Boxing .

Extensive documentation for this module is provided with ALib Module Boxing - Programmer's Manual.

Nested Namespaces:

namespace  compatibility
 
namespace  detail
 

Type Index:

class  Box
 
class  Boxes
 
struct  DbgBoxing
 
struct  Enum
 
struct  FAppend
 
struct  FClone
 
struct  FEquals
 
struct  FHashcode
 
struct  FIsLess
 
struct  FIsNotNull
 
struct  FIsTrue
 
union  Placeholder
 
struct  T_Boxer
 
struct  T_SizeInPlaceholder
 
struct  T_SuppressCharArrayBoxing
 
struct  TMappedTo
 
struct  TMappedToArrayOf
 
struct  TT_IsCustomized
 
struct  TT_IsLocked
 
struct  TT_IsNotBoxable
 
struct  TT_IsUnboxable
 

Function Index:

void Bootstrap ()
 
template<typename TFDecl , typename TMapping >
void BootstrapRegister (typename TFDecl::Signature function)
 
template<typename TFDecl >
void BootstrapRegisterDefault (typename TFDecl::Signature function)
 

Function Details:

◆ Bootstrap()

ALIB_API void Bootstrap ( )

This method needs to be called with bootstrapping a software. It mainly registers default and type-specific implementations of the built-in box-functions. In addition, in debug-compilations, static vtables are registered.

The standard bootstrap code of ALib , hence the (overloaded) functions alib::Bootstrap will call this function.

Multiple invocations of this method are ignored.

See also
For information about using this method, consult chapter 4.2 Bootstrapping Non-Camp Modules of the ALib Programmer's Manual.

Definition at line 732 of file boxing.cpp.

Here is the call graph for this function:

◆ BootstrapRegister()

template<typename TFDecl , typename TMapping >
void BootstrapRegister ( typename TFDecl::Signature function)
inline

Registers box-function function of type TFDecl for boxes of mapped type TMapping .

Attention
Function registration and function invocation are not protected against racing conditions of multi-threaded access. For this reason, it is advised to invoke this function exclusively while bootstrapping a software, when no threads are started, yet. Registrations can be made prior to bootstrapping ALib , respectively during or after phase BootstrapPhases::PrepareResources .
If for any reason registration is performed after bootstrapping ALib and module ALib Monomem is included in the ALib Distribution , and this function is invoked after ALib was bootstrapped, then prior to an invocation of this method, mutex GlobalAllocatorLock has to be acquired. This can be done with:
    ALIB_LOCK_WITH( alib::monomem::GlobalAllocatorLock )
Note that even when this lock is set, still multi-threaded access to registration and/or box-function invocations is not allowed.
Template Parameters
TFDeclThe type of function to register.
TMappingThe mapped type that boxes store, which are to be equipped with a specialized function implementation.
Must be either one of TMappedTo or TMappedToArrayOf .
Parameters
functionPointer to the function implementation.

Definition at line 120 of file boxing.hpp.

Here is the call graph for this function:

◆ BootstrapRegisterDefault()

template<typename TFDecl >
void BootstrapRegisterDefault ( typename TFDecl::Signature function)
inline

Registers a default implementation of a box-function, which is invoked if no type-specific implementation is registered for a mapped type.

Attention
Function registration and function invocation are not protected against racing conditions of multi-threaded access. For this reason, it is advised to invoke this function exclusively while bootstrapping a software, when no threads are started, yet. Registrations can be made prior to bootstrapping ALib , respectively during or after phase BootstrapPhases::PrepareResources .
If for any reason registration is performed after bootstrapping ALib and module ALib Monomem is included in the ALib Distribution , and this function is invoked after ALib was bootstrapped, then prior to an invocation of this method, mutex GlobalAllocatorLock has to be acquired. This can be done with:
    ALIB_LOCK_WITH( alib::monomem::GlobalAllocatorLock )
Note that even when this lock is set, still multi-threaded access to registration and/or box-function invocations is not allowed.
Template Parameters
TFDeclThe type of function to register.
Parameters
functionPointer to the function's default implementation.

Definition at line 156 of file boxing.hpp.

Here is the call graph for this function: