ALib C++ Library
Library Version: 2412 R0
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
 This namespace implements internals of namespace alib::boxing.
 

Type Index:

class  Box
 
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
 
class  TBoxes
 
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)
 
void Shutdown ()
 

Function Details:

◆ Bootstrap()

ALIB_API void Bootstrap ( )

This method needs to be called with bootstrapping a process. 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 forbidden.

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 708 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 multithreaded 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 before 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 before an invocation of this method, mutex GLOBAL_ALLOCATOR_LOCK has to be acquired. This can be done with:
//...
//... your code goes here
//...
}
Note that even when this lock is set, still multithreaded 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<T> or TMappedToArrayOf<T>.
Parameters
functionPointer to the function implementation.

Definition at line 112 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 multithreaded 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 before 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, before an invocation of this method, mutex GLOBAL_ALLOCATOR_LOCK has to be acquired. This can be done with:
//...
//... your code goes here
//...
}
Note that even when this lock is set, still multithreaded 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 148 of file boxing.hpp.

Here is the call graph for this function:

◆ Shutdown()

ALIB_API void Shutdown ( )

Frees resources and shuts down module ALib Boxing. Multiple invocations of this method are forbidden. The standard bootstrap code of ALib, hence the (overloaded) functions alib::Shutdown will call this function.

See also
Sibling function boxing::Bootstrap.

Definition at line 701 of file boxing.cpp.

Here is the call graph for this function: