omni::graph::exec::unstable::IPassTypeRegistry
Defined in omni/graph/exec/unstable/IPassTypeRegistry.h
Structs
GetPass: Implementation detail to access registry ABI.
-
class IPassTypeRegistry : public omni::core::Generated<omni::graph::exec::unstable::IPassTypeRegistry_abi>
omni::graph::exec::unstable::IPassFactory registry for a particular omni::graph::exec::unstable::PassType.
Instances of this object are generally accessed via omni::graph::exec::unstable::IPassRegistry::getPassTypeRegistry() by omni::graph::exec::unstable::IPassPipeline during graph construction.
See Pass Concepts for an in-depth guide on how passes are used during graph construction.
See Pass Registration for more information about pass registration.
See Passes for more pass related functionality.
Public Types
-
using Passes = detail::ElementAt<IPassTypeRegistry, PassTypeRegistryEntry, GetPass>
Implementation detail that wraps index-based node access with iterators.
Public Functions
-
inline Passes getPasses() noexcept
Returns an object that allows the list of passes to be iterated over (i.e. using range-based for loops).
The returned iterator is valid as long as this pass type registry is not mutated (e.g. a pass is added or removed from the registry).
-
inline uint64_t getPassCount() noexcept
Returns the number of registered passes.
- Thread Safety
This method is not thread safe.
-
inline omni::graph::exec::unstable::PassTypeRegistryEntry getPassAt(uint64_t index) noexcept
Returns the information about the registered pass at the given index.
index
must not be greater than the number of registered passes for this type.The memory to which the returned entry points will remain valid until the next time a pass is either added or removed from this type registry.
- 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 uint64_t getPassCount_abi() noexcept = 0
Returns the number of registered passes.
- Thread Safety
This method is not thread safe.
-
virtual PassTypeRegistryEntry getPassAt_abi(uint64_t index) noexcept = 0
Returns the information about the registered pass at the given index.
index
must not be greater than the number of registered passes for this type.The memory to which the returned entry points will remain valid until the next time a pass is either added or removed from this type registry.
- Thread Safety
This method 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 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.
-
struct GetPass
Implementation detail to access registry ABI.
Public Static Functions
-
static inline void getAt(IPassTypeRegistry *owner, uint64_t index, PassTypeRegistryEntry *out)
Access element at a given index.
-
static inline uint64_t getCount(IPassTypeRegistry *owner)
Returns element count.
-
static inline void getAt(IPassTypeRegistry *owner, uint64_t index, PassTypeRegistryEntry *out)
-
using Passes = detail::ElementAt<IPassTypeRegistry, PassTypeRegistryEntry, GetPass>