ALib C++ Library
Library Version: 2510 R0
Documentation generated by doxygen
Loading...
Searching...
No Matches
alib::boxing::detail::FunctionTable Struct Reference

Description:

This struct is used internally with ALib Boxing to provide run-time type information and virtual method invocations to boxed values. A singleton instance of a derived type of this class is attached to each Box. Such derived type is generated using templated derived struct VTable.

Definition at line 19 of file vtable.inl.

Collaboration diagram for alib::boxing::detail::FunctionTable:
[legend]

Public Static Method Index:

static ALIB_DLL void Shutdown ()
 Needs to be called only in debug versions to shut down internal hashtables cleanly.
 

Public Field Index:

uinteger DbgCntInvocationsFAppend =0
 Debug-compilation counter for the number of invocations.
 
uinteger DbgCntInvocationsFClone =0
 Debug-compilation counter for the number of invocations.
 
uinteger DbgCntInvocationsFEquals =0
 Debug-compilation counter for the number of invocations.
 
uinteger DbgCntInvocationsFHashcode =0
 Debug-compilation counter for the number of invocations.
 
uinteger DbgCntInvocationsFIsLess =0
 Debug-compilation counter for the number of invocations.
 
uinteger DbgCntInvocationsFIsNotNull =0
 Debug-compilation counter for the number of invocations.
 
uinteger DbgCntInvocationsFIsTrue =0
 Debug-compilation counter for the number of invocations.
 
FAppend< character, lang::HeapAllocator >::Signature fAppend = nullptr
 Entry for built-in function FAppend.
 
FClone::Signature fClone = nullptr
 Entry for built-in function FClone.
 
FEquals::Signature fEquals = nullptr
 Entry for built-in function FEquals.
 
FHashcode::Signature fHashcode = nullptr
 Entry for built-in function FHashcode.
 
FIsLess::Signature fIsLess = nullptr
 Entry for built-in function FIsLess.
 
FIsNotNull::Signature fIsNotNull = nullptr
 Entry for built-in function FIsNotNull.
 
FIsTrue::Signature fIsTrue = nullptr
 Entry for built-in function FIsTrue.
 

Public Method Index:

template<typename TFDecl>
TFDecl::Signature Get (bool isInvocation) const
 
template<typename TFDecl>
void Set (typename TFDecl::Signature implementation)
 

Protected Method Index:

ALIB_DLL void * getCustom (const std::type_info &rtti, bool isInvocation) const
 
ALIB_DLL void setCustom (const std::type_info &rtti, void *implementation)
 

Field Details:

◆ DbgCntInvocationsFAppend

uinteger alib::boxing::detail::FunctionTable::DbgCntInvocationsFAppend =0
mutable

Debug-compilation counter for the number of invocations.

Definition at line 46 of file vtable.inl.

◆ DbgCntInvocationsFClone

uinteger alib::boxing::detail::FunctionTable::DbgCntInvocationsFClone =0
mutable

Debug-compilation counter for the number of invocations.

Definition at line 43 of file vtable.inl.

◆ DbgCntInvocationsFEquals

uinteger alib::boxing::detail::FunctionTable::DbgCntInvocationsFEquals =0
mutable

Debug-compilation counter for the number of invocations.

Definition at line 39 of file vtable.inl.

◆ DbgCntInvocationsFHashcode

uinteger alib::boxing::detail::FunctionTable::DbgCntInvocationsFHashcode =0
mutable

Debug-compilation counter for the number of invocations.

Definition at line 37 of file vtable.inl.

◆ DbgCntInvocationsFIsLess

uinteger alib::boxing::detail::FunctionTable::DbgCntInvocationsFIsLess =0
mutable

Debug-compilation counter for the number of invocations.

Definition at line 40 of file vtable.inl.

◆ DbgCntInvocationsFIsNotNull

uinteger alib::boxing::detail::FunctionTable::DbgCntInvocationsFIsNotNull =0
mutable

Debug-compilation counter for the number of invocations.

Definition at line 38 of file vtable.inl.

◆ DbgCntInvocationsFIsTrue

uinteger alib::boxing::detail::FunctionTable::DbgCntInvocationsFIsTrue =0
mutable

Debug-compilation counter for the number of invocations.

Definition at line 41 of file vtable.inl.

◆ fAppend

FAppend<character,lang::HeapAllocator>::Signature alib::boxing::detail::FunctionTable::fAppend = nullptr

Entry for built-in function FAppend.

Definition at line 34 of file vtable.inl.

◆ fClone

FClone::Signature alib::boxing::detail::FunctionTable::fClone = nullptr

Entry for built-in function FClone.

Definition at line 30 of file vtable.inl.

◆ fEquals

FEquals::Signature alib::boxing::detail::FunctionTable::fEquals = nullptr

Entry for built-in function FEquals.

Definition at line 26 of file vtable.inl.

◆ fHashcode

FHashcode::Signature alib::boxing::detail::FunctionTable::fHashcode = nullptr

Entry for built-in function FHashcode.

Definition at line 24 of file vtable.inl.

◆ fIsLess

FIsLess::Signature alib::boxing::detail::FunctionTable::fIsLess = nullptr

Entry for built-in function FIsLess.

Definition at line 27 of file vtable.inl.

◆ fIsNotNull

FIsNotNull::Signature alib::boxing::detail::FunctionTable::fIsNotNull = nullptr

Entry for built-in function FIsNotNull.

Definition at line 25 of file vtable.inl.

◆ fIsTrue

FIsTrue::Signature alib::boxing::detail::FunctionTable::fIsTrue = nullptr

Entry for built-in function FIsTrue.

Definition at line 28 of file vtable.inl.

Method Details:

◆ Get()

template<typename TFDecl>
TFDecl::Signature alib::boxing::detail::FunctionTable::Get ( bool isInvocation) const

Receives the function of type TFDecl.

Template Parameters
TFDeclThe function type to get.
Parameters
isInvocationIf true, the invocation counter is increased. This parameter is defined only in debug-compilations.
Returns
The function found, or nullptr in case it was not defined.

◆ getCustom()

void * alib::boxing::detail::FunctionTable::getCustom ( const std::type_info & rtti,
bool isInvocation ) const
protected

Non-inline implementation of Get used in the case of non-built-in functions.

Parameters
rttiThe typeid of the function to get.
isInvocationIf true, the invocation counter is increased. This parameter is defined only in debug-compilations.
Returns
The pointer to the box-function.

Definition at line 111 of file vtable.cpp.

◆ Set()

template<typename TFDecl>
void alib::boxing::detail::FunctionTable::Set ( typename TFDecl::Signature implementation)

Registers an implementation of the function of type TFDecl.

Template Parameters
TFDeclThe function type to register.
Parameters
implementationThe implementation of the function.

◆ setCustom()

void alib::boxing::detail::FunctionTable::setCustom ( const std::type_info & rtti,
void * implementation )
protected

Non-inline implementation of Set Get used in the case of non-built-in functions.

Parameters
rttiThe typeid of the function to register.
implementationThe implementation of the function.

Definition at line 127 of file vtable.cpp.

◆ Shutdown()

void alib::boxing::detail::FunctionTable::Shutdown ( )
static

Needs to be called only in debug versions to shut down internal hashtables cleanly.

Definition at line 99 of file vtable.cpp.


The documentation for this struct was generated from the following files: