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