omni::graph::exec::unstable::IGraph_abi

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

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

Top-level container for storing the Execution Framework’s graph of graphs.

omni::graph::exec::unstable::IGraph is the top-level container used to store the graph of graphs. This top-level container is referred to as the execution graph.

omni::graph::exec::unstable::IGraph’s responsibilities include:

  • Tracking if the graph is currently being constructed. See omni::graph::exec::unstable::IGraph::inBuild().

  • Tracking gross changes to the topologies of graphs within the execution graph. This is done with the global topology stamp (see omni::graph::exec::unstable::IGraph::getGlobalTopologyStamp()). Each time a topology is invalidated, the global topology stamp is incremented. Consumers of the execution graph can use this stamp to detect changes in the graph. See Graph Invalidation for details.

  • Owning and providing access to the top level graph definition (see omni::graph::exec::unstable::IGraph::getNodeGraphDef()). The root node of the top-level graph definition is the root of execution graph. omni::graph::exec::unstable::IGraph is the only container, other than omni::graph::exec::unstable::INode, that attaches to definitions.

See Graph Concepts for more information on how omni::graph::exec::unstable::IGraph fits into the Execution Framework.

See omni::graph::exec::unstable::Graph for a concrete implementation of this interface.

Subclassed by omni::core::Generated< omni::graph::exec::unstable::IGraph_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 INodeGraphDef *getNodeGraphDef_abi() noexcept = 0

Access the top-level node graph definition.

The returned omni::graph::exec::unstable::INodeGraphDef will not have omni::core::IObject::acquire() called before being returned.

This method always returns a valid pointer.

Thread Safety

This method is thread safe. The returned pointer will be valid for the lifetime of this omni::graph::exec::unstable::IGraph.

virtual const ConstName *getName_abi() noexcept = 0

Name set on the graph during construction.

This method always returns a valid pointer.

Thread Safety

This method is thread safe. The returned pointer will be valid for the lifetime of this omni::graph::exec::unstable::IGraph.

virtual Stamp *getGlobalTopologyStamp_abi() noexcept = 0

Return global topology of the graph. Useful when detecting that graph transformation pipeline needs to run.

See Graph Invalidation to understand how this stamp is used to detect changes in the graph.

This method always returns a valid pointer.

Thread Safety

This method is thread safe. The returned pointer will be valid for the lifetime of this omni::graph::exec::unstable::IGraph. It is up to the caller to mutate the stamp in a thread safe manner.

virtual bool inBuild_abi() noexcept = 0

Return true if a omni::graph::exec::unstable::IGraphBuilder is currently building a part of this graph.

Thread Safety

This method is thread safe.

virtual void _setInBuild_abi(bool inBuild) noexcept = 0

Mark that an omni::graph::exec::unstable::IGraphBuilder is currently building a part of this graph.

Each builder should call _setInBuild(true) followed by _setInBuild(false) once building is complete. Since multiple builders can be active at a time, it is safe for this method to be called multiple times.

This method should only be called by omni::graph::exec::unstable::IGraphBuilder.

Thread Safety

This method is 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.