ALib C++ Library
Library Version: 2412 R0
Documentation generated by doxygen
Loading...
Searching...
No Matches
vtable.inl
Go to the documentation of this file.
1//==================================================================================================
2/// \file
3/// This header file is part of module \alib_boxing of the \aliblong.
4///
5/// \emoji :copyright: 2013-2024 A-Worx GmbH, Germany.
6/// Published under \ref mainpage_license "Boost Software License".
7//==================================================================================================
8#ifndef HPP_ALIB_BOXING_DETAIL_VTABLE
9#define HPP_ALIB_BOXING_DETAIL_VTABLE 1
10#pragma once
11#if !defined(HPP_ALIB_BOXING_BOXING)
12# error "ALib sources with ending '.inl' must not be included from outside."
13#endif
14
15namespace alib { namespace boxing {
16
17/// This namespace implements internals of namespace #alib::boxing.
18namespace detail {
19
20//==================================================================================================
21/// This struct is used internally with \alib_boxing_nl to provide run-time type information
22/// and virtual method invocations to boxed values.
23/// A singleton instance of a derived type of this class is attached to each \alib{boxing;Box}.
24/// Such derived type is generated using templated derived struct \alib{boxing::detail;VTable}.
25//==================================================================================================
27{
28 // #############################################################################################
29 // Fields
30 // #############################################################################################
31 FHashcode ::Signature fHashcode = nullptr; ///< Entry for built-in function \alib{boxing;FHashcode}.
32 FIsNotNull ::Signature fIsNotNull= nullptr; ///< Entry for built-in function \alib{boxing;FIsNotNull}.
33 FEquals ::Signature fEquals = nullptr; ///< Entry for built-in function \alib{boxing;FEquals}.
34 FIsLess ::Signature fIsLess = nullptr; ///< Entry for built-in function \alib{boxing;FIsLess}.
35 FIsTrue ::Signature fIsTrue = nullptr; ///< Entry for built-in function \alib{boxing;FIsTrue}.
36#if ALIB_MONOMEM
37 FClone ::Signature fClone = nullptr; ///< Entry for built-in function \alib{boxing;FClone}.
38#endif
39#if ALIB_STRINGS
40 FAppend<character,lang::HeapAllocator>::Signature fAppend = nullptr; ///< Entry for built-in function \alib{boxing;FAppend;FAppend<character>}.
41#endif
42#if ALIB_DEBUG
43 mutable uinteger DbgCntInvocationsFHashcode =0; ///< Debug-compilation counter for the number of invocations.
44 mutable uinteger DbgCntInvocationsFIsNotNull=0; ///< Debug-compilation counter for the number of invocations.
45 mutable uinteger DbgCntInvocationsFEquals =0; ///< Debug-compilation counter for the number of invocations.
46 mutable uinteger DbgCntInvocationsFIsLess =0; ///< Debug-compilation counter for the number of invocations.
47 mutable uinteger DbgCntInvocationsFIsTrue =0; ///< Debug-compilation counter for the number of invocations.
48 #if ALIB_MONOMEM
49 mutable uinteger DbgCntInvocationsFClone =0; ///< Debug-compilation counter for the number of invocations.
50 #endif
51 #if ALIB_STRINGS
52 mutable uinteger DbgCntInvocationsFAppend =0; ///< Debug-compilation counter for the number of invocations.
53 #endif
54#endif
55
56 // #############################################################################################
57 // Get
58 // #############################################################################################
59#if DOXYGEN
60 /// Receives the function of type \p{TFDecl}.
61 ///
62 /// @tparam TFDecl The function type to get.
63 /// @param isInvocation If \c true, the invocation counter is increased.
64 /// This parameter is defined only in debug-compilations.
65 /// @return The function found, or \c nullptr in case it was not defined.
66 template<typename TFDecl>
67 typename TFDecl::Signature
68 Get( bool isInvocation ) const;
69#else
70 template<typename TFDecl> ATMP_T_IF(FHashcode ::Signature, ATMP_EQ(TFDecl, FHashcode )) Get(ALIB_DBG( bool isInvocation )) const { ALIB_DBG( if(isInvocation) ++DbgCntInvocationsFHashcode ; ) return fHashcode ; }
71 template<typename TFDecl> ATMP_T_IF(FIsNotNull ::Signature, ATMP_EQ(TFDecl, FIsNotNull )) Get(ALIB_DBG( bool isInvocation )) const { ALIB_DBG( if(isInvocation) ++DbgCntInvocationsFIsNotNull; ) return fIsNotNull; }
72 template<typename TFDecl> ATMP_T_IF(FEquals ::Signature, ATMP_EQ(TFDecl, FEquals )) Get(ALIB_DBG( bool isInvocation )) const { ALIB_DBG( if(isInvocation) ++DbgCntInvocationsFEquals ; ) return fEquals ; }
73 template<typename TFDecl> ATMP_T_IF(FIsLess ::Signature, ATMP_EQ(TFDecl, FIsLess )) Get(ALIB_DBG( bool isInvocation )) const { ALIB_DBG( if(isInvocation) ++DbgCntInvocationsFIsLess ; ) return fIsLess ; }
74 template<typename TFDecl> ATMP_T_IF(FIsTrue ::Signature, ATMP_EQ(TFDecl, FIsTrue )) Get(ALIB_DBG( bool isInvocation )) const { ALIB_DBG( if(isInvocation) ++DbgCntInvocationsFIsTrue ; ) return fIsTrue ; }
76 template<typename TFDecl> ATMP_T_IF(FClone ::Signature, ATMP_EQ(TFDecl, FClone )) Get(ALIB_DBG( bool isInvocation )) const { ALIB_DBG( if(isInvocation) ++DbgCntInvocationsFClone ; ) return fClone ; } )
79
80 template<typename TFDecl> ATMP_T_IF(typename TFDecl::Signature, !ATMP_EQ(TFDecl, FHashcode )
81 && !ATMP_EQ(TFDecl, FIsNotNull)
82 && !ATMP_EQ(TFDecl, FEquals )
83 && !ATMP_EQ(TFDecl, FIsLess )
84 && !ATMP_EQ(TFDecl, FIsTrue )
85 IF_ALIB_MONOMEM( && !ATMP_EQ(TFDecl, FClone ) )
87 )
88 Get(ALIB_DBG( bool isInvocation )) const
89 {
90 return reinterpret_cast<typename TFDecl::Signature>( getCustom( typeid(TFDecl) ALIB_DBG(, isInvocation ) ) );
91 }
92#endif
93
94
95
96 // #############################################################################################
97 // Set
98 // #############################################################################################
99#if DOXYGEN
100 /// Registers an implementation of the function of type \p{TFDecl}.
101 ///
102 /// @tparam TFDecl The function type to register.
103 /// @param implementation The implementation of the function.
104 template<typename TFDecl>
105 void Set( typename TFDecl::Signature implementation );
106#else
107 template<typename TFDecl> ATMP_VOID_IF(ATMP_EQ(TFDecl, FHashcode )) Set( FHashcode ::Signature impl) { fHashcode = impl; }
108 template<typename TFDecl> ATMP_VOID_IF(ATMP_EQ(TFDecl, FIsNotNull )) Set( FIsNotNull ::Signature impl) { fIsNotNull= impl; }
109 template<typename TFDecl> ATMP_VOID_IF(ATMP_EQ(TFDecl, FEquals )) Set( FEquals ::Signature impl) { fEquals = impl; }
110 template<typename TFDecl> ATMP_VOID_IF(ATMP_EQ(TFDecl, FIsLess )) Set( FIsLess ::Signature impl) { fIsLess = impl; }
111 template<typename TFDecl> ATMP_VOID_IF(ATMP_EQ(TFDecl, FIsTrue )) Set( FIsTrue ::Signature impl) { fIsTrue = impl; }
113 template<typename TFDecl> ATMP_VOID_IF(ATMP_EQ(TFDecl, FClone )) Set( FClone ::Signature impl) { fClone = impl; } )
116
117
118 template<typename TFDecl> ATMP_VOID_IF( !ATMP_EQ(TFDecl, FHashcode )
119 && !ATMP_EQ(TFDecl, FIsNotNull)
120 && !ATMP_EQ(TFDecl, FEquals )
121 && !ATMP_EQ(TFDecl, FIsLess )
122 && !ATMP_EQ(TFDecl, FIsTrue )
123 IF_ALIB_MONOMEM( && !ATMP_EQ(TFDecl, FClone ) )
125 )
126 Set( typename TFDecl::Signature impl )
127 {
128 return setCustom( typeid(TFDecl), reinterpret_cast<void*>( impl ) );
129 }
130#endif
131
132 // #############################################################################################
133 // Cleanup (needed for debug-builds in shutdown)
134 // #############################################################################################
135#if (ALIB_MONOMEM && ALIB_DEBUG) || DOXYGEN
136 /// Needs to be called only in debug versions to shut down internal hashtables cleanly.
137 ALIB_API static void Shutdown();
138#else
139 inline static void Shutdown() {}
140#endif
141
142
143 // #############################################################################################
144 // internals
145 // #############################################################################################
146 protected:
147 #if DOXYGEN
148 /// Non-inline implementation of #Get used in the case of non-built-in functions.
149 /// @param rtti The \c typeid of the function to get.
150 /// @param isInvocation If \c true, the invocation counter is increased.
151 /// This parameter is defined only in debug-compilations.
152 /// @return The pointer to the box-function.
153 ALIB_API void* getCustom( const std::type_info& rtti, bool isInvocation ) const;
154 #else
155
156 ALIB_API void* getCustom( const std::type_info& rtti
157 ALIB_DBG( , bool isInvocation )) const;
158 #endif
159
160 /// Non-inline implementation of #Set #Get used in the case of non-built-in functions.
161 /// @param rtti The \c typeid of the function to register.
162 /// @param implementation The implementation of the function.
163 ALIB_API void setCustom( const std::type_info& rtti, void* implementation );
164
165}; // FunctionTable
166
167//==================================================================================================
168/// The default box-functions set.
169//==================================================================================================
170extern ALIB_API FunctionTable DEFAULT_FUNCTIONS;
171
172
173//==================================================================================================
174/// This struct is used internally with \alib_boxing_nl to provide run-time type information
175/// and virtual method invocations to boxed values.
176/// A singleton instance of this struct is attached to each \alib{boxing;Box}.
177//==================================================================================================
178struct VTable
179{
180 /// Denotes if the mapped type is value type, a pointer type, an enum or an array.
181 /// The latter is not specified by an enum element, but rather is \c true for all enum
182 /// elements that have a value greater than \c 0. The value in this case provides the size
183 /// of the array's element type.
185 {
186 Value = 0, ///< Value boxing.
187 Pointer = -1, ///< Pointer boxing.
188 Enum = -2, ///< Enum type boxing
189 };
190
191 /// Information about the encapsulated type. In case of arrays, this field is
192 /// equal to \c typeid(void).
193 const std::type_info& Type;
194
195 /// In case of array types, information about the element type. Otherwise this field is
196 /// equal to \c typeid(void).
197 const std::type_info& ElementType;
198
199 /// Denotes if the mapped type is a value type, a pointer type, an enum or an array.
200 /// In the case of array types, the enum element value provides the size of the array's element
201 /// type (a value greater than \c 0).
203
204 /// The number of relevant bytes used in the placeholder.
205 ///
206 /// \see
207 /// The documentation of TMP struct \alib{boxing;T_SizeInPlaceholder} provides details on
208 /// and rationals for the existence of this property.
209 const unsigned int PlaceholderUsage;
210
211 /// Box-functions attached with \alib{boxing;BootstrapRegister}.
213
214 #if ALIB_DEBUG
215 /// These flags are available in debug-compilations only. Denotes whether this vtable
216 /// is statically or dynamically created. In case of \b Unregistered, a customized
217 /// vtable was not properly registered on bootstrap.
218 enum class DbgFactoryType
219 {
220 Unregistered, ///< Not registered, yet.
221 Static , ///< A static VTable is in place.
222 Dynamic , ///< The VTable is created dynamically from templated type \b VTableTT.
223 };
224
225 /// Debug information.
227
228 /// Counter for the number of unbox operations and function invocations made on boxes
229 /// that used this \e vtable. Precisely, the counter is increased with invocations
230 /// of
231 /// \alib{boxing;Box::Unbox},
232 /// \alib{boxing;Box::UnboxArray},
233 /// \alib{boxing;Box::UnboxElement},
234 /// \alib{boxing;Box::TypeID} and
235 /// \alib{boxing;Box::GetFunction}.
236 ///
237 /// Available only with debug-builds.
239 #endif
240
241 //==============================================================================================
242 /// Constructor.
243 ///
244 /// @param type Type information of the derived \b VTable type.
245 /// @param elementType Type information of the elements of the boxed array.
246 /// @param mapping The type of boxing: value, pointer, enum or arrays.
247 /// @param placeholderUsage The size of elements of the boxed array.
248 //==============================================================================================
249 VTable( const std::type_info& type,
250 const std::type_info& elementType,
251 MappingType mapping,
252 unsigned int placeholderUsage )
253 : Type ( type )
254 , ElementType ( elementType )
255 , Mapping ( mapping )
256 , PlaceholderUsage( placeholderUsage )
257 {}
258
259
260 //==============================================================================================
261 /// Virtual destructor.<br>
262 /// Note: This is not really needed and empty. Because derived class \b %VTable derives from
263 /// virtual type \alib{singletons;Singleton}, having this destructor allows cleaning memory
264 /// on termination "more precisely" and reduce warnings raised by analytics tools like
265 /// \b valgrind.
266 //==============================================================================================
267 virtual ~VTable()
268 {}
269
270 //==============================================================================================
271 /// Returns \c true if this vtable represents boxed array types. In this case, method
272 /// \ref alib::boxing::Box::UnboxLength "Box::UnboxLength"
273 /// will return the length of the array and
274 /// \ref alib::boxing::Box::UnboxElement "Box::UnboxElement" may be used to
275 /// access elements of the array.
276 ///
277 /// @return \c true if this vtable is representing an array type, \c false otherwise.
278 //==============================================================================================
279 bool IsArray() const
280 {
281 return Mapping > 0;
282 }
283
284 //==============================================================================================
285 /// Returns \c true if this vtable represents mapped pointer type.
286 ///
287 /// @return \c true if this vtable is representing a pointer type, \c false otherwise.
288 //==============================================================================================
289 bool IsPointer() const
290 {
292 }
293
294 //==============================================================================================
295 /// Returns \c true if this vtable represents a scoped or non-scoped enum type.
296 ///
297 /// @return \c true if this vtable is representing an enum type, \c false otherwise.
298 //==============================================================================================
299 bool IsEnum() const
300 {
301 return Mapping == MappingType::Enum;
302 }
303}; // struct VTable
304
305
306// #################################################################################################
307// VTable
308// #################################################################################################
309#if ALIB_DEBUG_BOXING
310
311 //==============================================================================================
312 /// Registers a virtual table for debug purposes.
313 /// This function is invoked internally, when a dynamic \e vtable is created and
314 /// when a static \e vtable is registered.
315 ///
316 /// Statically created \e vtables have to be registered during bootstrap in debug-compilations.
317 /// For this, macro \ref ALIB_BOXING_BOOTSTRAP_VTABLE_DBG_REGISTER is available, which is empty
318 /// in release compilations.
319 ///
320 /// \see
321 /// Macros ALIB_BOXING_VTABLE_DECLARE and \ref alib_mod_boxing "Programmer's Manual" chapter
322 /// \ref alib_boxing_more_opt_staticvt.
323 ///
324 /// @param vtable The vtable to register.
325 /// @param productionType Denotes whether the \p{vtable} is a static constexpr object or
326 /// dynamically created from template type \b VTableTT.
327 //==============================================================================================
330
331#endif // ALIB_DEBUG_BOXING
332
333//==================================================================================================
334/// This is a templated derivate of class \b VTable. It is necessary to create singletons for
335/// arbitrary mapped types.
336///
337/// \see
338/// Chapter \ref alib_boxing_more_opt_staticvt_bg
339/// of the \alib_boxing "Programmer's Manual" of module \alib_boxing_nl.
340///
341/// ## Friends ##
342/// class \alib{singletons;Singleton;Singleton< VTableTT<TPlainOrArray; TMapped> >}
343///
344/// @tparam TPlainOrArray Either type \alib{boxing;detail::TPlain} or \alib{boxing;detail::TArrayOf}.
345/// @tparam TMapped The mapped type.
346//==================================================================================================
347template<typename TPlainOrArray, typename TMapped>
348class VTableTT : public VTable
349 , public Singleton< VTableTT<TPlainOrArray, TMapped> >
350{
351 #if !DOXYGEN
353 #endif
354
355 private:
356 /// Constructor. Passes parameters as expected by parent class \b VTable.
357 ///
358 /// This constructor is private, and class \b %Singleton is a friend, which makes each
359 /// template instance of this class being a 'strict' singleton (only that singleton instance
360 /// exists).
361 constexpr VTableTT()
362 : VTable( ATMP_EQ(TPlainOrArray, TPlain ) ? typeid(TMapped)
363 : typeid(TMapped[1]),
364
365 ATMP_EQ(TPlainOrArray, TPlain ) ? typeid(void)
366 : typeid(TMapped),
367
368 ATMP_EQ(TPlainOrArray, TArrayOf) ? VTable::MappingType(sizeof(TMapped))
369 : ATMP_IS_PTR(TMapped)
371 : ATMP_IS_ENUM(TMapped)
374
375
376 ATMP_EQ(TPlainOrArray, TPlain ) ? T_SizeInPlaceholder<TMapped>::value
377 : sizeof(Placeholder)
378 )
379 {
380 #if ALIB_DEBUG_BOXING
382 #endif
383 }
384};
385
386
387#if ALIB_DEBUG_BOXING || DOXYGEN
388
389/// Checks if \alib_boxing_nl was correctly initialized.
390/// This is done with the creation of \ref alib_boxing_more_opt_staticvt "dynamic vtables",
391/// to detect global or static box objects which are initialized with data that is mapped to
392/// a type that no static \e vtable is defined for.
393///
394/// Available and used only in debug-compilations.
395///
396/// \see
397/// Manual chapter \ref alib_boxing_more_static_instances.
399
400/// Checks for doubly-defined \e vtables, as well as for unregistered
401/// \ref alib_boxing_more_opt_staticvt "static vtables".
402///
403/// Available and used only in debug-compilations.
404/// @param vtable The \e vtable to check.
405/// @param increaseUsageCounter Denotes if this is a use of the vtable or just a check.
406ALIB_API void DbgCheckRegistration( detail::VTable* vtable, bool increaseUsageCounter );
407#else
408inline void DbgCheckIsInitialized() {}
409inline void DbgCheckRegistration (detail::VTable*, bool ) {}
410#endif
411
412
413
414
415//==================================================================================================
416/// Method #Get of the default version of this struct creates a \alib{boxing::detail;VTable}
417/// dynamically.
418/// For this, a corresponding templated \alib{singletons;Singleton} type
419/// \alib{boxing::detail;VTableTT}, according to given template parameter \p{TMapping} is returned.
420///
421/// For optimization purposes (code size as well as execution performance), this struct might
422/// be specialized for selected a mapped types, to return static singleton object.
423///
424/// Specializations for all C++ fundamental types are given. Furthermore, various different
425/// \alibmods provide such specializations for types they introduced and that are boxed.
426///
427/// \see
428/// Chapter \ref alib_boxing_more_opt_staticvt_howto of the Programmer's Manual
429/// of \alib_boxing_nl.
430///
431/// @tparam TMapping The mapped type to receive a \e vtable for. Has to be of either type
432/// \alib{boxing;TMappedTo<T>} or \alib{boxing;TMappedToArrayOf<T>}.
433//==================================================================================================
434template<typename TMapping>
436{
437 /// Returns a strict singleton \e vtable responsible for boxing mapped type \p{TMapping}.
438 /// @return The requested \e vtable singleton.
439 static constexpr VTable* Get()
440 {
442
444
445 DbgCheckRegistration( result, false );
446
447 return result;
448 }
449
450};
451
452
453}}} // namespace [alib::boxing::detail]
454
455
456//##################################################################################################
457//####################################### Macros ###########################################
458//##################################################################################################
459
460#define ALIB_BOXING_VTABLE_DECLARE( TMapped, Identifier ) \
461namespace alib::boxing::detail { \
462extern ALIB_API VTable SNGLTN_ ## Identifier; \
463template<> struct T_VTableFactory< TMappedTo<TMapped> > \
464{ static constexpr VTable* Get() { return &SNGLTN_ ## Identifier; } }; } \
465
466#define ALIB_BOXING_VTABLE_DECLARE_ARRAYTYPE( TMapped, Identifier ) \
467namespace alib::boxing::detail { \
468extern ALIB_API VTable SNGLTN_ ## Identifier; \
469template<> struct T_VTableFactory< TMappedToArrayOf<TMapped> > \
470{ static constexpr VTable* Get() { return &SNGLTN_ ## Identifier; } }; } \
471
472
473#define ALIB_BOXING_VTABLE_DEFINE( TMapped, Identifier ) \
474alib::boxing::detail::VTable alib::boxing::detail::SNGLTN_ ## Identifier \
475( typeid(TMapped), typeid(void) , \
476 std::is_pointer<TMapped>::value \
477 ? VTable::MappingType::Pointer \
478 : std::is_enum<TMapped>::value \
479 ? VTable::MappingType::Enum \
480 : VTable::MappingType::Value , \
481 alib::boxing::T_SizeInPlaceholder<TMapped>::value); \
482
483#define ALIB_BOXING_VTABLE_DEFINE_ARRAYTYPE( TMapped, Identifier ) \
484alib::boxing::detail::VTable alib::boxing::detail::SNGLTN_ ## Identifier \
485(typeid(TMapped[1]) , typeid(TMapped), VTable::MappingType(sizeof(TMapped)), sizeof(Placeholder)); \
486
487
488#if ALIB_DEBUG_BOXING
489# define ALIB_BOXING_BOOTSTRAP_VTABLE_DBG_REGISTER( Identifier ) \
490DbgRegisterVTable( &alib::boxing::detail::SNGLTN_ ## Identifier, \
491 alib::boxing::detail::VTable::DbgFactoryType::Static );
492#else
493# define ALIB_BOXING_BOOTSTRAP_VTABLE_DBG_REGISTER( Identifier )
494#endif
495
496#endif // HPP_ALIB_BOXING_DETAIL_VTABLE
497
static TDerivedClass & GetSingleton()
Definition singleton.hpp:59
#define ATMP_IS_ENUM(T)
Definition tmp.hpp:21
#define ATMP_VOID_IF(Cond)
Definition tmp.hpp:47
#define ALIB_API
Definition alib.hpp:639
#define ATMP_EQ( T, TEqual)
Definition tmp.hpp:27
#define ATMP_IS_PTR(T)
Definition tmp.hpp:22
#define IF_ALIB_STRINGS(...)
Definition alib.hpp:328
#define ALIB_DBG(...)
Definition alib.hpp:390
#define IF_ALIB_MONOMEM(...)
Definition alib.hpp:312
#define ATMP_T_IF(T, Cond)
Definition tmp.hpp:49
ALIB_API void DbgCheckRegistration(detail::VTable *vtable, bool increaseUsageCounter)
Definition boxing.cpp:1112
ALIB_API void DbgCheckIsInitialized()
Definition boxing.cpp:1103
void DbgRegisterVTable(detail::VTable *vtable, detail::VTable::DbgFactoryType productionType)
Definition dbgboxing.cpp:79
FunctionTable DEFAULT_FUNCTIONS
The default box-functions set.
Definition vtable.cpp:112
Definition alib.cpp:69
boxing::FIsLess FIsLess
Type alias in namespace alib.
boxing::FAppend< TChar, TAllocator > FAppend
Type alias in namespace alib.
lang::uinteger uinteger
Type alias in namespace alib.
Definition integers.hpp:276
boxing::FClone FClone
Type alias in namespace alib.
boxing::FIsNotNull FIsNotNull
Type alias in namespace alib.
boxing::FEquals FEquals
Type alias in namespace alib.
boxing::FIsTrue FIsTrue
Type alias in namespace alib.
boxing::FHashcode FHashcode
Type alias in namespace alib.
lang::integer integer
Type alias in namespace alib.
Definition integers.hpp:273
void(*)(const Box &self, strings::TAString< TChar, TAllocator > &target) Signature
uinteger DbgCntInvocationsFHashcode
Debug-compilation counter for the number of invocations.
Definition vtable.inl:43
uinteger DbgCntInvocationsFIsNotNull
Debug-compilation counter for the number of invocations.
Definition vtable.inl:44
FAppend< character, lang::HeapAllocator >::Signature fAppend
Entry for built-in function FAppend<character>.
Definition vtable.inl:40
FIsLess::Signature fIsLess
Entry for built-in function FIsLess.
Definition vtable.inl:34
TFDecl::Signature Get(bool isInvocation) const
ALIB_API void * getCustom(const std::type_info &rtti, bool isInvocation) const
Definition vtable.cpp:127
uinteger DbgCntInvocationsFIsLess
Debug-compilation counter for the number of invocations.
Definition vtable.inl:46
uinteger DbgCntInvocationsFClone
Debug-compilation counter for the number of invocations.
Definition vtable.inl:49
void Set(typename TFDecl::Signature implementation)
uinteger DbgCntInvocationsFAppend
Debug-compilation counter for the number of invocations.
Definition vtable.inl:52
uinteger DbgCntInvocationsFIsTrue
Debug-compilation counter for the number of invocations.
Definition vtable.inl:47
ALIB_API void setCustom(const std::type_info &rtti, void *implementation)
Definition vtable.cpp:143
uinteger DbgCntInvocationsFEquals
Debug-compilation counter for the number of invocations.
Definition vtable.inl:45
FClone::Signature fClone
Entry for built-in function FClone.
Definition vtable.inl:37
FHashcode::Signature fHashcode
Entry for built-in function FHashcode.
Definition vtable.inl:31
FIsTrue::Signature fIsTrue
Entry for built-in function FIsTrue.
Definition vtable.inl:35
static ALIB_API void Shutdown()
Needs to be called only in debug versions to shut down internal hashtables cleanly.
Definition vtable.cpp:115
FEquals::Signature fEquals
Entry for built-in function FEquals.
Definition vtable.inl:33
FIsNotNull::Signature fIsNotNull
Entry for built-in function FIsNotNull.
Definition vtable.inl:32
static constexpr VTable * Get()
Definition vtable.inl:439
VTable(const std::type_info &type, const std::type_info &elementType, MappingType mapping, unsigned int placeholderUsage)
Definition vtable.inl:249
FunctionTable Functions
Box-functions attached with BootstrapRegister.
Definition vtable.inl:212
DbgFactoryType DbgProduction
Debug information.
Definition vtable.inl:226
const std::type_info & Type
Definition vtable.inl:193
@ Static
A static VTable is in place.
@ Dynamic
The VTable is created dynamically from templated type VTableTT.
const unsigned int PlaceholderUsage
Definition vtable.inl:209
const MappingType Mapping
Definition vtable.inl:202
@ Enum
Enum type boxing.
Definition vtable.inl:188
@ Pointer
Pointer boxing.
Definition vtable.inl:187
const std::type_info & ElementType
Definition vtable.inl:197