IPassRegistry#
Fully qualified name: omni::graph::exec::unstable::IPassRegistry
-
class IPassRegistry : public omni::core::Generated<omni::graph::exec::unstable::IPassRegistry_abi>#
Registry (database) of known omni::graph::exec::unstable::IPass objects.
When registering passes, prefer using Pass Registration helpers rather than directly accessing methods on this interface.
See Passes for more pass related functionality.
Public Functions
- inline uint32_t registerPass(
- omni::graph::exec::unstable::PassType passType,
- const char *name,
- omni::core::ObjectParam<omni::graph::exec::unstable::IPassFactory> factory,
- const omni::graph::exec::unstable::ConstName &nameToMatch,
- omni::graph::exec::unstable::PassPriority priority,
Registers a new pass.
type
is the type of pass being registered (e.g. populate, partition, etc).name
is the name of the pass, it is for debugging purposes. Must not benullptr
.factory
is the interface that will instantiate the pass. Must not benullptr
.Some pass types (e.g. populate passes) desire to affect only a subset of the nodes and/or definitions in a graph.
nameToMatch
is used to specify the name of the node/definitions the pass wishes to affect. The meaning of this field is pass type dependent. Many pass types ignorenameToMatch
. Must not benullptr
. This method copies the name.Some pass types (e.g. partition passes) are designed such that only a single pass should affect an entity. When multiple passes wish to affect an entity,
priority
can be used to resolve the conflict. The meaning of the priority value is pass type specific. Many pass types ignorepriority
.When registering passes, prefer using Pass Registration helpers rather than directly accessing this method.
Returns a unique identifier that can be passed to omni::graph::exec::unstable::IPassRegistry::deregisterPass() to deregister the pass. A value of 0 is never returned.
- Thread Safety
This method is not thread safe.
- inline void deregisterPass( ) noexcept#
Deregisters a pass.
passId
is the id of the pass to deregister.passId
is generated by omni::graph::exec::unstable::IPassRegistry::registerPass().It is not an error if
passId
is not found.When deregistering passes, prefer using Pass Registration helpers rather than directly accessing this method.
- Thread Safety
This method is not thread safe.
- inline omni::graph::exec::unstable::IPassTypeRegistry *getPassTypeRegistry( ) noexcept#
Returns a sub-registry containing pass of the specified type.
The returned omni::graph::exec::unstable::IPassTypeRegistry will not have omni::core::IObject::acquire() called before being returned.
A valid pointer is always returned.
- Thread Safety
This method is not thread safe.
-
inline omni::graph::exec::unstable::Stamp getStamp() noexcept#
Returns version stamp for the registry.
Version is incremented each time the content of registry changes, i.e. pass is added or removed.
- Thread Safety
This method is not 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 uint32_t registerPass_abi(
- PassType passType,
- const char *name,
- IPassFactory *factory,
- const ConstName *nameToMatch,
- PassPriority priority,
Registers a new pass.
type
is the type of pass being registered (e.g. populate, partition, etc).name
is the name of the pass, it is for debugging purposes. Must not benullptr
.factory
is the interface that will instantiate the pass. Must not benullptr
.Some pass types (e.g. populate passes) desire to affect only a subset of the nodes and/or definitions in a graph.
nameToMatch
is used to specify the name of the node/definitions the pass wishes to affect. The meaning of this field is pass type dependent. Many pass types ignorenameToMatch
. Must not benullptr
. This method copies the name.Some pass types (e.g. partition passes) are designed such that only a single pass should affect an entity. When multiple passes wish to affect an entity,
priority
can be used to resolve the conflict. The meaning of the priority value is pass type specific. Many pass types ignorepriority
.When registering passes, prefer using Pass Registration helpers rather than directly accessing this method.
Returns a unique identifier that can be passed to omni::graph::exec::unstable::IPassRegistry::deregisterPass() to deregister the pass. A value of 0 is never returned.
- Thread Safety
This method is not thread safe.
- virtual void deregisterPass_abi( ) noexcept = 0#
Deregisters a pass.
passId
is the id of the pass to deregister.passId
is generated by omni::graph::exec::unstable::IPassRegistry::registerPass().It is not an error if
passId
is not found.When deregistering passes, prefer using Pass Registration helpers rather than directly accessing this method.
- Thread Safety
This method is not thread safe.
- virtual IPassTypeRegistry *getPassTypeRegistry_abi(
- PassType type,
Returns a sub-registry containing pass of the specified type.
The returned omni::graph::exec::unstable::IPassTypeRegistry will not have omni::core::IObject::acquire() called before being returned.
A valid pointer is always returned.
- Thread Safety
This method is not thread safe.
-
virtual Stamp getStamp_abi() noexcept = 0#
Returns version stamp for the registry.
Version is incremented each time the content of registry changes, i.e. pass is added or removed.
- Thread Safety
This method is not thread safe.
- virtual void *castWithoutAcquire_abi( ) 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.