template<typename T>
class enzo::ga::AttributeHandleRO< T >
Read only accessor for enzo::ga::Attribute.
- Template Parameters
-
T | C++ value type matching the Attribute’s logical type (e.g., bt::intT, bt::floatT, bt::Vector3, bt::boolT). |
An Attribute Handle is a typed view into an attribute’s storage. It binds at construction to a concrete type and exposes operations like reserving capacity, appending values, and reading/writing by index. Because the handle uses templating, most misuse is caught at compile time, and runtime guards raise errors if an attribute/handle type combination isn’t accounted for. In the future implicit casting can be added for convenience. Handles don’t own data, they just reference the attribute’s storage.
There is also a read-only handle variant that provides the same typed accessors without mutation. This is useful when an operator needs to inspect data but must not modify it, when the engine exposes attributes to user code with limited permissions, or when implementing const member functions that require attribute access.
Together, attributes define the schema and storage, while handles provide the typed access that nodes and tools use to operate on data directly.