|
Deki 1.3.0
Modular C++ 2D engine for embedded displays and desktop
|
Registry for extracting interfaces from components without RTTI or vtable changes. More...
Namespaces | |
| namespace | ComponentInterfaceAdapters |
Typedefs | |
| using | InterfaceAdapter = void* (*)(DekiComponent*) |
Functions | |
| void | ComponentInterfaceAdapters::Register (uint32_t interfaceId, ComponentType componentType, InterfaceAdapter adapter) |
| void * | ComponentInterfaceAdapters::Query (uint32_t interfaceId, DekiComponent *comp) |
| InterfaceAdapter | ComponentInterfaceAdapters::Find (uint32_t interfaceId, ComponentType componentType, ComponentType baseType) |
| The adapter Query would call for a component of this type (exact type first, then its base type), or nullptr. | |
| uint32_t | ComponentInterfaceAdapters::Version () |
| Bumped by every Register. | |
Registry for extracting interfaces from components without RTTI or vtable changes.
Packages register adapter functions that convert a DekiComponent* to an interface pointer based on the component's StaticType. The renderer queries this to find IClipProvider, ISortableProvider, etc. without knowing the concrete component class.
Usage:
| using InterfaceAdapter = void* (*)(DekiComponent*) |