DEKI/ENGINE docs
Deki 0.19.0
Modular C++ 2D engine for embedded displays and desktop
Loading...
Searching...
No Matches
DekiReflectionAbi Struct Reference

Layout fingerprint of the structs that cross DLL boundaries. More...

#include <deki/interop/ReflectionAbi.h>

Public Attributes

uint32_t version
uint32_t sizeofPropertyInfo
uint32_t sizeofComponentMeta
uint32_t sizeofFieldRef
uint32_t sizeofDekiObject
uint32_t sizeofDekiComponent
uint32_t transformConfig

Detailed Description

Layout fingerprint of the structs that cross DLL boundaries.

A package DLL builds its property tables as static arrays and hands the editor a pointer and a count. The editor walks them with its own compiled sizeof, so both sides must agree on the layout exactly. If they do not, element 0 reads fine and every later element is read from the middle of a struct; a const char* read that way is non-null garbage that passes null checks and crashes far away.

The append-only rule of the metadata structs protects a single struct read through a pointer, not an array, whose stride changes. Hence this handshake: every package DLL exports its compiled values (ReflectionAbi.cpp, linked into each package by BuildFileGenerator) and the loader refuses a package that disagrees, naming it and saying to rebuild.

It catches size changes, not same-size reorderings: for those, bump kDekiReflectionAbiVersion by hand.

Member Data Documentation

◆ version

uint32_t DekiReflectionAbi::version

◆ sizeofPropertyInfo

uint32_t DekiReflectionAbi::sizeofPropertyInfo

◆ sizeofComponentMeta

uint32_t DekiReflectionAbi::sizeofComponentMeta

◆ sizeofFieldRef

uint32_t DekiReflectionAbi::sizeofFieldRef

◆ sizeofDekiObject

uint32_t DekiReflectionAbi::sizeofDekiObject

◆ sizeofDekiComponent

uint32_t DekiReflectionAbi::sizeofDekiComponent

◆ transformConfig

uint32_t DekiReflectionAbi::transformConfig

The documentation for this struct was generated from the following file: