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

A picked field of a component on an object. More...

#include <deki/reflection/PropertyRef.h>

Public Member Functions

void Rehash ()
bool IsSet () const

Public Attributes

std::string object
std::string component
std::string field
uint32_t componentTypeId = 0
uint32_t fieldHash = 0

Detailed Description

A picked field of a component on an object.

The editor sets one with three dropdowns (object, then component, then field), so only valid references can be made. The component is stored by the qualified class name scenes use, the field by its name. Both are hashed once at load (Rehash); resolving is then a small linear scan with no string work.

The object is a name, because object ids are per scene and a graph asset is shared by every scene that uses it. "" means the object this component is on.

Resolve once (Awake, state entry) into a PropertyBinding and reuse it, not every frame.

Member Function Documentation

◆ Rehash()

void Deki::PropertyRef::Rehash ( )

◆ IsSet()

bool Deki::PropertyRef::IsSet ( ) const
inline

Member Data Documentation

◆ object

std::string Deki::PropertyRef::object

◆ component

std::string Deki::PropertyRef::component

◆ field

std::string Deki::PropertyRef::field

◆ componentTypeId

uint32_t Deki::PropertyRef::componentTypeId = 0

◆ fieldHash

uint32_t Deki::PropertyRef::fieldHash = 0

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