The custom function hash.
DOXYGEN 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 this struct is attached to each Box.
Definition at line 227 of file vtable.inl.
Public Type Index: | |
| enum class | DbgFactoryType { Unregistered , Static , Dynamic } |
| enum | MappingType : integer { Value = 0 , Pointer = -1 , Enum = -2 } |
Public Field Index: | |
| uinteger | DbgCntUsage =0 |
| DbgFactoryType | DbgProduction =DbgFactoryType::Unregistered |
| Debug information. | |
| const std::type_info & | ElementType |
| FunctionTable | Functions |
| Box-functions attached with BootstrapRegister. | |
| const MappingType | Mapping |
| const unsigned int | PlaceholderUsage |
| const std::type_info & | Type |
Public Method Index: | |
| VTable (const std::type_info &type, const std::type_info &elementType, MappingType mapping, unsigned int placeholderUsage) | |
| virtual | ~VTable () |
| bool | IsArray () const |
| bool | IsEnum () const |
| bool | IsPointer () const |
|
strong |
These flags are available in debug-compilations only. Denotes whether this vtable is statically or dynamically created. In the case of Unregistered, a customized vtable was not properly registered on bootstrap.
| Enumerator | |
|---|---|
| Unregistered | Not registered, yet. |
| Static | A static VTable is in place. |
| Dynamic | The VTable is created dynamically from the templated type VTableUnoptimized. |
Definition at line 266 of file vtable.inl.
Denotes if the mapped type is a value type, a pointer type, an enum or an array. The latter is not specified by an enum element, but rather is true for all enum elements that have a value greater than 0. The value in this case provides the size of the array's element type.
| Enumerator | |
|---|---|
| Value | Value boxing. |
| Pointer | Pointer boxing. |
| Enum | Enum type boxing. |
Definition at line 233 of file vtable.inl.
| uinteger alib::boxing::detail::VTable::DbgCntUsage =0 |
Counter for the number of unbox operations and function invocations made on boxes that used this vtable. Precisely, the counter is increased with invocations of Box::Unbox, Box::UnboxArray, Box::UnboxElement, Box::TypeID and Box::GetFunction.
Available only with debug-builds.
Definition at line 286 of file vtable.inl.
| DbgFactoryType alib::boxing::detail::VTable::DbgProduction =DbgFactoryType::Unregistered |
Debug information.
Definition at line 275 of file vtable.inl.
| const std::type_info& alib::boxing::detail::VTable::ElementType |
In case of array types, information about the element type. Otherwise this field is equal to typeid(void).
Definition at line 246 of file vtable.inl.
| FunctionTable alib::boxing::detail::VTable::Functions |
Box-functions attached with BootstrapRegister.
Definition at line 260 of file vtable.inl.
| const MappingType alib::boxing::detail::VTable::Mapping |
Denotes if the mapped type is a value type, a pointer type, an enum or an array. In the case of array types, the enum element value provides the size of the array's element type (a value greater than 0).
Definition at line 251 of file vtable.inl.
| const unsigned int alib::boxing::detail::VTable::PlaceholderUsage |
The number of relevant bytes used in the placeholder.
Definition at line 257 of file vtable.inl.
| const std::type_info& alib::boxing::detail::VTable::Type |
Information about the encapsulated type. In the case of arrays, this field is equal to typeid(void).
Definition at line 242 of file vtable.inl.
|
inline |
Constructor.
| type | Type information of the derived VTable type. |
| elementType | Type information of the elements of the boxed array. |
| mapping | The type of boxing: value, pointer, enum or arrays. |
| placeholderUsage | The size of elements of the boxed array. |
Definition at line 295 of file vtable.inl.
|
inlinevirtual |
Virtual destructor.
Note: This is not really needed and empty. Because derived class VTable derives from virtual type Singleton, having this destructor allows cleaning memory on termination "more precisely" and reduce warnings raised by analytics tools like valgrind.
Definition at line 310 of file vtable.inl.
|
inline |
Returns true if this vtable represents boxed array types. In this case, method Box::UnboxLength will return the length of the array and Box::UnboxElement may be used to access elements of the array.
true if this vtable is representing an array type, false otherwise. Definition at line 319 of file vtable.inl.
|
inline |
Returns true if this vtable represents a scoped or non-scoped enum type.
true if this vtable is representing an enum type, false otherwise. Definition at line 329 of file vtable.inl.
|
inline |
Returns true if this vtable represents mapped pointer type.
true if this vtable is representing a pointer type, false otherwise. Definition at line 324 of file vtable.inl.