reflection_path.h¶
| File Path | engine/include/conjure/editor/reflection_path.h |
| API ↗ | Headless mode and the command model, The editor |
Property paths: "transform.position.x", "materials[1]", "script.fields.speed". The first segment names the component type (resolved by the command through the component registry), the rest walks the component's reflection description down to one value. Values move through JSON only: the component is serialised with ecs::component_to_json, patched at the JSON pointer the path resolves to, and written back with ecs::component_from_json.
Structs¶
| File | Description |
|---|---|
field_ref |
A resolved property inside a component: the JSON pointer of the value in the component's JSON form plus the reflection description of the field when the component is reflected. |
path_segment |
Classes¶
| File | Description |
|---|---|
reflection_path |
Functions¶
Public¶
read_at¶
read_at¶[[nodiscard]] CONJURE_API core::result<core::json::document> read_at(
const core::json::value &componentJson,
const field_ref &reference);The value at the reference inside a component's JSON form. PATH_NOT_FOUND when the pointer does not resolve in the document (an unreflected component lacking the member).
write_at¶
write_at¶[[nodiscard]] CONJURE_API core::result<void> write_at(
core::json::document &componentJson,
const field_ref &reference,
const core::json::value &value);Replaces the value at the reference inside a component's JSON form (the whole document for a whole-component reference). INVALID_ARGS when the pointer cannot be set.