OMNI_GRAPH_EXEC_SET_NODE_DATA#
-
OMNI_GRAPH_EXEC_SET_NODE_DATA(context_, type_, ...)#
Calls either omni::graph::exec::unstable::IExecutionContext::setNodeData() or omni::graph::exec::unstable::IExecutionStateInfo::setNodeData() (dependent on the type of the first argument).
The purpose of this macro is to generate an appropriate omni::core::TypeId at compile time from the data item’s type. The user can manually do this, but this macro is much less error prone.
OMNI_GRAPH_EXEC_SET_NODE_DATA( stateInfo, // pointer to either IExecutionContext or IExecutionStateInfo GraphContextCacheOverride, // type of the data to store tokens::kInstanceContext, // key to store the data at in the node's key/value datastore std::move(contextOverridePtr) // pointer to the data to store );
The macro itself is a variadic macro and can map to multiple overloads of
setNodeData()
methods in the interface given as the first argumentReturns a pointer to the given data.
With newer compilers (GCC >= 8), this macro can be replaced with templated methods (without breaking the ABI).