|
Deki 0.19.0
Modular C++ 2D engine for embedded displays and desktop
|
Functions | |
| void | Register (uint32_t interfaceId, ComponentType componentType, InterfaceAdapter adapter) |
| Registers adapter as the way to get interface interfaceId from a component of type componentType. | |
| void * | Query (uint32_t interfaceId, Component *comp) |
| The interface interfaceId of comp, or nullptr when it has none. | |
| InterfaceAdapter | 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 | Version () |
| Goes up with every Register. | |
| void Deki::ComponentInterfaceAdapters::Register | ( | uint32_t | interfaceId, |
| ComponentType | componentType, | ||
| InterfaceAdapter | adapter ) |
Registers adapter as the way to get interface interfaceId from a component of type componentType.
| void * Deki::ComponentInterfaceAdapters::Query | ( | uint32_t | interfaceId, |
| Component * | comp ) |
The interface interfaceId of comp, or nullptr when it has none.
| InterfaceAdapter Deki::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.
A caller can cache it per component type instead of looking it up per component per frame; look again whenever Version() changes.
| uint32_t Deki::ComponentInterfaceAdapters::Version | ( | ) |
Goes up with every Register.
A cache of adapters (the renderer keeps one per component type) compares it to notice adapters registered later, such as by a package that loaded after the cache was filled.