omni::graph::exec::unstable::IGraphBuilderNode
Defined in omni/graph/exec/unstable/IGraphBuilderNode.h
-
class IGraphBuilderNode : public omni::core::Generated<omni::graph::exec::unstable::IGraphBuilderNode_abi>
Describes a node omni::graph::exec::unstable::IGraphBuilder can manipulate.
Only omni::graph::exec::unstable::IGraphBuilder should use omni::graph::exec::unstable::IGraphBuilderNode. One way to think about this interface is that it is a private interface used by omni::graph::exec::unstable::IGraphBuilder to connect instances of omni::graph::exec::unstable::INode.
Public Types
-
using Parents = detail::ElementAt<IGraphBuilderNode, IGraphBuilderNode*, GetParent>
Iterable wrapper providing access to the node’s parent.
-
using Children = detail::ElementAt<IGraphBuilderNode, IGraphBuilderNode*, GetChild>
Iterable wrapper providing access to the node’s parent.
Public Functions
-
inline Parents getParents() noexcept
Returns an object that allows the list of parents to be iterated over (i.e. using range-based for loops).
- Thread Safety
This method is not thread safe.
-
inline Children getChildren() noexcept
Returns an object that allows the list of children to be iterated over (i.e. using range-based for loops).
- Thread Safety
This method is not thread safe.
-
inline void _addParent(omni::core::ObjectParam<omni::graph::exec::unstable::IGraphBuilderNode> parent) noexcept
Adds the given node as a parent (i.e. upstream) of this node.
omni::core::IObject::acquire() is not called on the given node. It is up to the calling code to ensure the node persists while in use by this interface.
parent
must not benullptr
.It is undefined behavior to add a parent multiple times to a node.
Do not directly call this method. Instead, call omni::graph::exec::unstable::IGraphBuilder::connect().
- Thread Safety
This method is not thread safe.
-
inline void _removeParent(omni::core::ObjectParam<omni::graph::exec::unstable::IGraphBuilderNode> parent) noexcept
Removes the given node as a parent.
It is not an error if the given node is not a parent.
The given node may be
nullptr
.Do not directly call this method. Instead, call omni::graph::exec::unstable::IGraphBuilder::disconnect().
- Thread Safety
This method is not thread safe.
-
inline void _addChild(omni::core::ObjectParam<omni::graph::exec::unstable::IGraphBuilderNode> child) noexcept
Adds the given node as a child (i.e. downstream) of this node.
omni::core::IObject::acquire() is not called on the given node. It is up to the calling code to ensure the node persists while in use by this interface.
child
must not benullptr
.It is undefined behavior to add a child multiple times to a node.
Do not directly call this method. Instead, call omni::graph::exec::unstable::IGraphBuilder::connect().
- Thread Safety
This method is not thread safe.
-
inline void _removeChild(omni::core::ObjectParam<omni::graph::exec::unstable::IGraphBuilderNode> child) noexcept
Removes the given node as a child.
It is not an error if the given node is not a parent.
The given node may not be
nullptr
.Do not directly call this method. Instead, call omni::graph::exec::unstable::IGraphBuilder::disconnect().
- Thread Safety
This method is not thread safe.
-
inline void _removeInvalidParents() noexcept
Remove from this node’s parent list any nodes that no longer exist in current topology, i.e are invalid.
omni::core::IObject::release() is not called on the invalid nodes.
Do not directly call this method. It is used internally by omni::graph::exec::unstable::IGraphBuilder.
- Thread Safety
This method is not thread safe.
-
inline void _removeInvalidChildren() noexcept
Remove from this node’s children list any nodes that no longer exist in current topology, i.e are invalid.
omni::core::IObject::release() is not called on the invalid nodes.
Do not directly call this method. It is used internally by omni::graph::exec::unstable::IGraphBuilder.
- Thread Safety
This method is not thread safe.
-
inline void _invalidateConnections() noexcept
Invalidate all children and parents connections by invalidating the topology stamp this node is synchronized with.
Do not directly call this method. It is used internally by omni::graph::exec::unstable::IGraphBuilder.
- Thread Safety
This method is thread safe.
Warning
This only removes connections on a single node. The topology has bi-directional connections for every node with the exception of the connection with the root node.
-
inline void setCycleParentCount(uint32_t count) noexcept
Sets the number of parents who are a part of cycle.
- Thread Safety
This method is not thread safe.
-
inline void _setNodeDef(omni::core::ObjectParam<omni::graph::exec::unstable::INodeDef> nodeDef) noexcept
Sets the definition for this node.
If a definition is already set, it will be replaced by the given definition.
The given definition may be
nullptr
.omni::core::IObject::acquire() is called on the given pointer.
See also omni::graph::exec::unstable::IGraphBuilderNode::_setNodeGraphDef().
Do not directly call this method. Instead, call omni::graph::exec::unstable::IGraphBuilder::setNodeDef().
- Thread Safety
This method is not thread safe.
-
inline void _setNodeGraphDef(omni::core::ObjectParam<omni::graph::exec::unstable::INodeGraphDef> nodeGraphDef) noexcept
Sets the definition for this node.
If a definition is already set, it will be replaced by the given definition.
The given definition may be
nullptr
.omni::core::IObject::acquire() is called on the given pointer.
See also omni::graph::exec::unstable::IGraphBuilderNode::_setNodeDef().
Do not directly call this method. Instead, call omni::graph::exec::unstable::IGraphBuilder::setNodeGraphDef().
- Thread Safety
This method is not thread safe.
-
inline void _clearDef() noexcept
- Thread Safety
This method is not thread safe.
-
inline omni::graph::exec::unstable::ITopology *getTopology() noexcept
Access the topology owning this node.
The returned omni::graph::exec::unstable::ITopology will not have omni::core::IObject::acquire() called before being returned.
The returned pointer is always valid.
- Thread Safety
This method is not thread safe.
-
inline void validateOrResetTopology() noexcept
Check if this node is valid in the topology, dropping all connections if it is not.
This method checks if the node is valid in the topology (i.e. checks the node’s topology stamp with the topology). If it is not valid, all parent and child connections are removed and the cycle count is set back to zero.
If the node is valid in the topology, this method does nothing.
See Graph Invalidation to better understand stamps, topologies, and invalidation.
- Thread Safety
This method is not thread safe.
-
inline omni::graph::exec::unstable::IGraphBuilderNode *getParentAt(uint64_t index) noexcept
Access the parent at the given index.
It is an error if the the given index is greater than the parent count.
See omni::graph::exec::unstable::IGraphBuilderNode::getParentCount().
Consider using omni::graph::exec::unstable::IGraphBuilderNode::getParents() for a modern C++ wrapper to this method.
The returned omni::graph::exec::unstable::IGraphBuilderNode will not have omni::core::IObject::acquire() called before being returned.
The returned pointer will not be
nullptr
.- Thread Safety
This method is not thread safe.
-
inline uint64_t getParentCount() noexcept
Returns the number of parents.
- Thread Safety
This method is not thread safe.
-
inline omni::graph::exec::unstable::IGraphBuilderNode *getChildAt(uint64_t index) noexcept
Access the child at the given index.
It is an error if the the given index is greater than the child count.
See omni::graph::exec::unstable::IGraphBuilderNode::getChildCount().
Consider using omni::graph::exec::unstable::IGraphBuilderNode::getChildren() for a modern C++ wrapper to this method.
The returned omni::graph::exec::unstable::IGraphBuilderNode will not have omni::core::IObject::acquire() called before being returned.
The returned pointer will not be
nullptr
.- Thread Safety
This method is not thread safe.
-
inline uint64_t getChildCount() noexcept
Returns the number of children.
- Thread Safety
This method is not thread safe.
-
inline bool hasChild(omni::core::ObjectParam<omni::graph::exec::unstable::IGraphBuilderNode> node) noexcept
Returns
true
if the given node is an immediate child of this node.node
may benullptr
.- Thread Safety
This method is not thread safe.
-
inline bool isRoot() noexcept
Returns
true
if this node is the root of the topology.- Thread Safety
This method is not thread safe.
-
inline omni::graph::exec::unstable::IGraphBuilderNode *getRoot() noexcept
Returns the root node of the topology of which this node is a part.
The returned omni::graph::exec::unstable::IGraphBuilderNode will not have omni::core::IObject::acquire() called before being returned.
The returned pointer will not be
nullptr
.- Thread Safety
This method is not thread safe.
-
inline const omni::graph::exec::unstable::ConstName &getName() noexcept
Access node’s unique identifier name.
The lifetime of the returned object is tied to this node.
- Thread Safety
This method is thread safe.
-
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 toomni::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 void _addParent_abi(IGraphBuilderNode *parent) noexcept = 0
Adds the given node as a parent (i.e. upstream) of this node.
omni::core::IObject::acquire() is not called on the given node. It is up to the calling code to ensure the node persists while in use by this interface.
parent
must not benullptr
.It is undefined behavior to add a parent multiple times to a node.
Do not directly call this method. Instead, call omni::graph::exec::unstable::IGraphBuilder::connect().
- Thread Safety
This method is not thread safe.
-
virtual void _removeParent_abi(IGraphBuilderNode *parent) noexcept = 0
Removes the given node as a parent.
It is not an error if the given node is not a parent.
The given node may be
nullptr
.Do not directly call this method. Instead, call omni::graph::exec::unstable::IGraphBuilder::disconnect().
- Thread Safety
This method is not thread safe.
-
virtual void _addChild_abi(IGraphBuilderNode *child) noexcept = 0
Adds the given node as a child (i.e. downstream) of this node.
omni::core::IObject::acquire() is not called on the given node. It is up to the calling code to ensure the node persists while in use by this interface.
child
must not benullptr
.It is undefined behavior to add a child multiple times to a node.
Do not directly call this method. Instead, call omni::graph::exec::unstable::IGraphBuilder::connect().
- Thread Safety
This method is not thread safe.
-
virtual void _removeChild_abi(IGraphBuilderNode *child) noexcept = 0
Removes the given node as a child.
It is not an error if the given node is not a parent.
The given node may not be
nullptr
.Do not directly call this method. Instead, call omni::graph::exec::unstable::IGraphBuilder::disconnect().
- Thread Safety
This method is not thread safe.
-
virtual void _removeInvalidParents_abi() noexcept = 0
Remove from this node’s parent list any nodes that no longer exist in current topology, i.e are invalid.
omni::core::IObject::release() is not called on the invalid nodes.
Do not directly call this method. It is used internally by omni::graph::exec::unstable::IGraphBuilder.
- Thread Safety
This method is not thread safe.
-
virtual void _removeInvalidChildren_abi() noexcept = 0
Remove from this node’s children list any nodes that no longer exist in current topology, i.e are invalid.
omni::core::IObject::release() is not called on the invalid nodes.
Do not directly call this method. It is used internally by omni::graph::exec::unstable::IGraphBuilder.
- Thread Safety
This method is not thread safe.
-
virtual void _invalidateConnections_abi() noexcept = 0
Invalidate all children and parents connections by invalidating the topology stamp this node is synchronized with.
Do not directly call this method. It is used internally by omni::graph::exec::unstable::IGraphBuilder.
- Thread Safety
This method is thread safe.
Warning
This only removes connections on a single node. The topology has bi-directional connections for every node with the exception of the connection with the root node.
-
virtual void setCycleParentCount_abi(uint32_t count) noexcept = 0
Sets the number of parents who are a part of cycle.
- Thread Safety
This method is not thread safe.
-
virtual void _setNodeDef_abi(INodeDef *nodeDef) noexcept = 0
Sets the definition for this node.
If a definition is already set, it will be replaced by the given definition.
The given definition may be
nullptr
.omni::core::IObject::acquire() is called on the given pointer.
See also omni::graph::exec::unstable::IGraphBuilderNode::_setNodeGraphDef().
Do not directly call this method. Instead, call omni::graph::exec::unstable::IGraphBuilder::setNodeDef().
- Thread Safety
This method is not thread safe.
-
virtual void _setNodeGraphDef_abi(INodeGraphDef *nodeGraphDef) noexcept = 0
Sets the definition for this node.
If a definition is already set, it will be replaced by the given definition.
The given definition may be
nullptr
.omni::core::IObject::acquire() is called on the given pointer.
See also omni::graph::exec::unstable::IGraphBuilderNode::_setNodeDef().
Do not directly call this method. Instead, call omni::graph::exec::unstable::IGraphBuilder::setNodeGraphDef().
- Thread Safety
This method is not thread safe.
-
virtual void _clearDef_abi() noexcept = 0
Unsets this node’s definition.
If the definition is already
nullptr
, this method does nothing.Do not directly call this method. Instead, call omni::graph::exec::unstable::IGraphBuilder::clearDef().
- Thread Safety
This method is not thread safe.
-
virtual ITopology *getTopology_abi() noexcept = 0
Access the topology owning this node.
The returned omni::graph::exec::unstable::ITopology will not have omni::core::IObject::acquire() called before being returned.
The returned pointer is always valid.
- Thread Safety
This method is not thread safe.
-
virtual void validateOrResetTopology_abi() noexcept = 0
Check if this node is valid in the topology, dropping all connections if it is not.
This method checks if the node is valid in the topology (i.e. checks the node’s topology stamp with the topology). If it is not valid, all parent and child connections are removed and the cycle count is set back to zero.
If the node is valid in the topology, this method does nothing.
See Graph Invalidation to better understand stamps, topologies, and invalidation.
- Thread Safety
This method is not thread safe.
-
virtual IGraphBuilderNode *getParentAt_abi(uint64_t index) noexcept = 0
Access the parent at the given index.
It is an error if the the given index is greater than the parent count.
See omni::graph::exec::unstable::IGraphBuilderNode::getParentCount().
Consider using omni::graph::exec::unstable::IGraphBuilderNode::getParents() for a modern C++ wrapper to this method.
The returned omni::graph::exec::unstable::IGraphBuilderNode will not have omni::core::IObject::acquire() called before being returned.
The returned pointer will not be
nullptr
.- Thread Safety
This method is not thread safe.
-
virtual uint64_t getParentCount_abi() noexcept = 0
Returns the number of parents.
- Thread Safety
This method is not thread safe.
-
virtual IGraphBuilderNode *getChildAt_abi(uint64_t index) noexcept = 0
Access the child at the given index.
It is an error if the the given index is greater than the child count.
See omni::graph::exec::unstable::IGraphBuilderNode::getChildCount().
Consider using omni::graph::exec::unstable::IGraphBuilderNode::getChildren() for a modern C++ wrapper to this method.
The returned omni::graph::exec::unstable::IGraphBuilderNode will not have omni::core::IObject::acquire() called before being returned.
The returned pointer will not be
nullptr
.- Thread Safety
This method is not thread safe.
-
virtual uint64_t getChildCount_abi() noexcept = 0
Returns the number of children.
- Thread Safety
This method is not thread safe.
-
virtual bool hasChild_abi(IGraphBuilderNode *node) noexcept = 0
Returns
true
if the given node is an immediate child of this node.node
may benullptr
.- Thread Safety
This method is not thread safe.
-
virtual bool isRoot_abi() noexcept = 0
Returns
true
if this node is the root of the topology.- Thread Safety
This method is not thread safe.
-
virtual IGraphBuilderNode *getRoot_abi() noexcept = 0
Returns the root node of the topology of which this node is a part.
The returned omni::graph::exec::unstable::IGraphBuilderNode will not have omni::core::IObject::acquire() called before being returned.
The returned pointer will not be
nullptr
.- Thread Safety
This method is not thread safe.
-
virtual const ConstName *getName_abi() noexcept = 0
Access node’s unique identifier name.
The lifetime of the returned object is tied to this node.
- 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 toomni::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.
-
using Parents = detail::ElementAt<IGraphBuilderNode, IGraphBuilderNode*, GetParent>