Unravel Engine C++ Reference
Loading...
Searching...
No Matches
unravel::meta_any_proxy Struct Reference

Safe deferred property access proxy for arbitrary object properties. More...

#include <inspector.h>

Classes

struct  meta_any_proxy_impl
 Implementation containing the deferred access functions. More...
 

Public Attributes

std::shared_ptr< meta_any_proxy_implimpl = std::make_shared<meta_any_proxy_impl>()
 

Detailed Description

Safe deferred property access proxy for arbitrary object properties.

Instead of storing direct references or pointers to properties (which can become invalid when objects are destroyed, moved, or reorganized), this proxy stores the "path" or "recipe" to reach a property. Each access re-evaluates the path from scratch, providing:

  • Lifetime safety: No dangling pointers when objects are destroyed/moved
  • Graceful failure: Invalid paths return false rather than crashing
  • Composability: Proxies can be chained to access deeply nested properties
  • Undo/redo safety: Actions store stable paths, not volatile references

Example: Instead of storing &entity.transform.position.x, we store a chain of functions that can navigate: entity → transform → position → x each time.

Definition at line 197 of file inspector.h.

Member Data Documentation

◆ impl

std::shared_ptr<meta_any_proxy_impl> unravel::meta_any_proxy::impl = std::make_shared<meta_any_proxy_impl>()

Shared implementation allows copying proxies without duplicating the path logic Multiple proxies can safely reference the same property access method

Definition at line 221 of file inspector.h.


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