|
Deki 0.19.0
Modular C++ 2D engine for embedded displays and desktop
|
An object reference the user assigns in the editor. More...
#include <deki/reflection/ObjectRef.h>
Inherits Deki::ObjectRefBase.
Public Member Functions | |
| T * | Get () const |
| Object * | GetObject () const |
| operator uint32_t () const | |
| ObjectRef & | operator= (uint32_t newId) |
| bool | operator== (const ObjectRef &other) const |
| bool | operator!= (const ObjectRef &other) const |
| T * | operator-> () const |
| operator bool () const | |
| Public Member Functions inherited from Deki::ObjectRefBase | |
| bool | IsValid () const |
| bool | IsResolved () const |
| void | Set (Object *obj) |
| Points the reference at obj at runtime. nullptr clears it. | |
| void | Set (Object *obj, uint32_t typeId) |
| Points the reference at the component of type typeId on obj. | |
Additional Inherited Members | |
| Public Attributes inherited from Deki::ObjectRefBase | |
| uint32_t | id = 0 |
| uint32_t | componentTypeId = 0 |
| Object * | resolved = nullptr |
An object reference the user assigns in the editor.
The property generator recognizes ObjectRef<T>, and the inspector draws an object picker filtered to objects with component T. The engine resolves the reference before Start(), so Get() returns the component directly.
When componentTypeId is set, Get() returns the component with that type id. When it is 0, Get() returns the first component of type T.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlineexplicit |