|
HDK
|
#include <UN_GenericData.h>
Public Member Functions | |
| UN_GenericDataBufferRef ()=default | |
| UN_GenericDataBufferRef (ContainerT &container, UN_GenericBufferID buf_id) | |
| bool | isValid () const |
| operator bool () const | |
| UN_GenericBufferID | bufferID () const |
| ContainerT & | container () const |
| UN_GenericBufferType | bufferType (UN_GenericBufferID id) const |
| Returns the data buffer type. More... | |
| const UT_StringHolder & | bufferName (UN_GenericBufferID id) const |
| Returns the name of the data buffer. More... | |
| template<typename T > | |
| void | setData (DataIDT id, T &&value) |
| Sets the data value for a given data ID. More... | |
| template<typename T > | |
| const T & | dataRef (DataIDT id) const |
| Returns a const ref to the data value for a given data ID. More... | |
| template<typename T > | |
| T | dataVal (DataIDT id) const |
| Returns a copy of the data value for a given data ID. More... | |
| template<typename T > | |
| T | stealData (DataIDT id) |
| Moves the data value out of the buffer for a given data ID. More... | |
| template<typename T , typename OP > | |
| void | updateData (DataIDT id, const OP &op) |
| Updates the data value in-place via a callable. More... | |
A lightweight reference to a generic data buffer within a container. Wraps a container pointer and a UN_GenericBufferID, forwarding data access calls (set, get, steal, update) to the container.
Template parameters: ContainerT - The data container type (e.g., UN_NodeData). DataIDT - The strongly-typed ID for data items (e.g., UN_NodeID).
Definition at line 68 of file UN_GenericData.h.
|
default |
|
inline |
Definition at line 72 of file UN_GenericData.h.
|
inline |
Definition at line 80 of file UN_GenericData.h.
|
inline |
Returns the name of the data buffer.
Definition at line 94 of file UN_GenericData.h.
|
inline |
Returns the data buffer type.
Definition at line 88 of file UN_GenericData.h.
|
inline |
Definition at line 81 of file UN_GenericData.h.
|
inline |
Returns a const ref to the data value for a given data ID.
Definition at line 108 of file UN_GenericData.h.
|
inline |
Returns a copy of the data value for a given data ID.
Definition at line 115 of file UN_GenericData.h.
|
inline |
Definition at line 77 of file UN_GenericData.h.
|
inlineexplicit |
Definition at line 78 of file UN_GenericData.h.
|
inline |
Sets the data value for a given data ID.
Definition at line 101 of file UN_GenericData.h.
|
inline |
Moves the data value out of the buffer for a given data ID.
Definition at line 122 of file UN_GenericData.h.
|
inline |
Updates the data value in-place via a callable.
Definition at line 129 of file UN_GenericData.h.