omni::graph::exec::unstable::IExecutionStateInfo_abi

Defined in omni/graph/exec/unstable/IExecutionStateInfo.h

class IExecutionStateInfo_abi : public omni::core::Inherits<omni::graph::exec::unstable::IBase, OMNI_TYPE_ID("omni.graph.exec.unstable.IExecutionStateInfo")>

State associated with a given execution task.

Execution state is separated from the execution graph to allow concurrent and/or nested execution. See omni::graph::exec::unstable::IExecutionContext for details.

Thread Safety

Since multiple threads can concurrently traverse a graph, implementors of methods within this class should expect that multiple threads will be accessing this object in parallel.

Subclassed by omni::core::Generated< omni::graph::exec::unstable::IExecutionStateInfo_abi >

Public Functions

inline void *castWithoutAcquire(omni::core::TypeId id) noexcept

Casts this object to the type described the the given id.

Returns nullptr if the cast was not successful.

Unlike omni::core::IObject::cast(), this casting method does not call omni::core::IObject::acquire().

Thread Safety

This method is thread safe.

inline uint32_t getUseCount() noexcept

Returns the number of different instances (this included) referencing the current object.

Thread Safety

This method is thread safe.

inline void *cast(omni::core::TypeId id) noexcept

Returns a pointer to the interface defined by the given type id if this object implements the type id’s interface.

Objects can support multiple interfaces, even interfaces that are in different inheritance chains.

The returned object will have omni::core::IObject::acquire() called on it before it is returned, meaning it is up to the caller to call omni::core::IObject::release() on the returned pointer.

The returned pointer can be safely reinterpret_cast<> to the type id’s C++ class. For example, “omni.windowing.IWindow” can be cast to omni::windowing::IWindow.

Do not directly use this method, rather use a wrapper function like omni::core::cast() or omni::core::ObjectPtr::as().

Thread Safety

This method is thread safe.

inline void acquire() noexcept

Increments the object’s reference count.

Objects may have multiple reference counts (e.g. one per interface implemented). As such, it is important that you call omni::core::IObject::release() on the same pointer from which you called omni::core::IObject::acquire().

Do not directly use this method, rather use omni::core::ObjectPtr, which will manage calling omni::core::IObject::acquire() and omni::core::IObject::release() for you.

Thread Safety

This method is thread safe.

inline void release() noexcept

Decrements the objects reference count.

Most implementations will destroy the object if the reference count reaches 0 (though this is not a requirement).

Objects may have multiple reference counts (e.g. one per interface implemented). As such, it is important that you call omni::core::IObject::release() on the same pointer from which you called omni::core::IObject::acquire().

Do not directly use this method, rather use omni::core::ObjectPtr, which will manage calling omni::core::IObject::acquire() and omni::core::IObject::release() for you.

Thread Safety

This method is thread safe.

Protected Functions

virtual bool needsCompute_abi(Stamp execVersion) noexcept = 0

Query used by some executors to determine if computation of a node is necessary.

virtual void requestCompute_abi() noexcept = 0

Set to request computation.

virtual void setComputed_abi() noexcept = 0

Reset request to compute after computation was performed.

virtual SyncStamp getExecutionStamp_abi() noexcept = 0

Get current/last exec version set for this node during execution.

virtual bool setExecutionStamp_abi(Stamp execVersion) noexcept = 0

Set current exec version for this node. Returns true if version wasn’t in sync.

virtual omni::core::Result getNodeData_abi(NodeDataKey key, omni::core::TypeId *outTypeId, void **outPtr, uint64_t *outItemSize, uint64_t *outItemCount) noexcept = 0

Returns a value from the key/value datastore.

The key is used as a look-up in the node’s key/value datastore.

outPtr will be updated with a pointer to the actual data. outPtr must not be nullptr.

outItemSize store the size of each item in the returned array. outItemSize must not be nullptr

outItemCount contains the number of items returned (i.e. the number of items outPtr points to). For an array, this will be greater than 1. outItemCount must not be nullptr.

If the key is not found, omni::core::kResultNotFound is returned.

The returned data may point to nullptr is omni::graph::exec::unstable::IExecutionContext::setNodeData() was previously called with a nullptr data pointer.

See Error Handling to understand the error handling/reporting responsibilities of implementors of this method.

Thread Safety

Accessing the key/value datastore is not thread safe.

virtual void setNodeData_abi(NodeDataKey key, omni::core::TypeId typeId, void *data, uint64_t itemSize, uint64_t itemCount, NodeDataDeleterFn *deleter) noexcept = 0

Sets a value in the key/value datastore.

The key is used as a look-up in the node’s key/value datastore.

The type of each data item is set with typeId.

The type of each data item is set with typeId.

If data already exists at the given key, it will be replaced.

data points to an array of data items. data may be nullptr.

itemSize is the size of each item in the given array.

itemCount contains the number of items pointed to by data. For an array, this will be greater than 1.

deleter is a function used to delete data when either a new value is set at the key or the context is invalidated. If deleter is nullptr, it is up to the calling code to manage the lifetime of the data.

Thread Safety

Accessing the key/value datastore is not thread safe.

virtual void *castWithoutAcquire_abi(omni::core::TypeId id) noexcept = 0

Casts this object to the type described the the given id.

Returns nullptr if the cast was not successful.

Unlike omni::core::IObject::cast(), this casting method does not call omni::core::IObject::acquire().

Thread Safety

This method is thread safe.

virtual uint32_t getUseCount_abi() noexcept = 0

Returns the number of different instances (this included) referencing the current object.

Thread Safety

This method is thread safe.

virtual void *cast_abi(TypeId id) noexcept = 0

Returns a pointer to the interface defined by the given type id if this object implements the type id’s interface.

Objects can support multiple interfaces, even interfaces that are in different inheritance chains.

The returned object will have omni::core::IObject::acquire() called on it before it is returned, meaning it is up to the caller to call omni::core::IObject::release() on the returned pointer.

The returned pointer can be safely reinterpret_cast<> to the type id’s C++ class. For example, “omni.windowing.IWindow” can be cast to omni::windowing::IWindow.

Do not directly use this method, rather use a wrapper function like omni::core::cast() or omni::core::ObjectPtr::as().

Thread Safety

This method is thread safe.

virtual void acquire_abi() noexcept = 0

Increments the object’s reference count.

Objects may have multiple reference counts (e.g. one per interface implemented). As such, it is important that you call omni::core::IObject::release() on the same pointer from which you called omni::core::IObject::acquire().

Do not directly use this method, rather use omni::core::ObjectPtr, which will manage calling omni::core::IObject::acquire() and omni::core::IObject::release() for you.

Thread Safety

This method is thread safe.

virtual void release_abi() noexcept = 0

Decrements the objects reference count.

Most implementations will destroy the object if the reference count reaches 0 (though this is not a requirement).

Objects may have multiple reference counts (e.g. one per interface implemented). As such, it is important that you call omni::core::IObject::release() on the same pointer from which you called omni::core::IObject::acquire().

Do not directly use this method, rather use omni::core::ObjectPtr, which will manage calling omni::core::IObject::acquire() and omni::core::IObject::release() for you.

Thread Safety

This method is thread safe.