Kanzi 4.0.0-beta2
Handles
Collaboration diagram for Handles:

Classes

struct  kanzi::gfx::DefaultHandleGuardT
 Helper struct to construct a default handle of any type. More...
 
class  kanzi::gfx::HandleGuard< T_Handle >
 The HandleGuard class provides a reference counted reference to a graphics handle. More...
 
struct  kanzi::gfx::InvalidHandleGuardT
 Helper struct to construct an invalid handle of any type. More...
 

Typedefs

using kanzi::gfx::BlendStateHandleGuard
 Reference counted blend state handle.
 
using kanzi::gfx::BufferHandleGuard
 Reference counted buffer handle.
 
using kanzi::gfx::CommandBufferHandleGuard
 Reference counted command buffer handle.
 
using kanzi::gfx::ComputePipelineHandleGuard
 Reference counted compute pipeline handle.
 
using kanzi::gfx::ComputeResourceSetHandleGuard
 Reference counted compute resource set handle.
 
using kanzi::gfx::DepthStencilStateHandleGuard
 Reference counted depth stencil state handle.
 
using kanzi::gfx::FrameBufferHandleGuard
 Reference counted frame buffer handle.
 
using kanzi::gfx::GpuFenceHandleGuard
 Reference counted GPU fence handle.
 
using kanzi::gfx::ImageHandleGuard
 Reference counted image handle.
 
using kanzi::gfx::RasterStateHandleGuard
 Reference counted raster state handle.
 
using kanzi::gfx::RenderPassHandleGuard
 Reference counted render pass handle.
 
using kanzi::gfx::RenderPipelineHandleGuard
 Reference counted render pipeline handle.
 
using kanzi::gfx::RenderResourceSetHandleGuard
 Reference counted render resource set handle.
 
using kanzi::gfx::SamplerHandleGuard
 Reference counted sampler handle.
 
using kanzi::gfx::ShaderHandleGuard
 Reference counted shader handle.
 
using kanzi::gfx::VertexInputStateHandleGuard
 Reference counted vertex input state handle.
 

Enumerations

enum class  kanzi::gfx::BlendStateHandle : uint16_t { kanzi::gfx::BlendStateHandle::Default , kanzi::gfx::BlendStateHandle::Invalid }
 Raw handle for blend state objects. More...
 
enum class  kanzi::gfx::BufferHandle : uint16_t { kanzi::gfx::BufferHandle::Default , kanzi::gfx::BufferHandle::Invalid }
 Raw handle for buffer objects. More...
 
enum class  kanzi::gfx::CommandBufferHandle : uint16_t { kanzi::gfx::CommandBufferHandle::Default , kanzi::gfx::CommandBufferHandle::Invalid }
 Raw handle for command buffer objects. More...
 
enum class  kanzi::gfx::ComputePipelineHandle : uint16_t { kanzi::gfx::ComputePipelineHandle::Default , kanzi::gfx::ComputePipelineHandle::Invalid }
 Raw handle for compute pipeline objects. More...
 
enum class  kanzi::gfx::ComputeResourceSetHandle : uint16_t { kanzi::gfx::ComputeResourceSetHandle::Default , kanzi::gfx::ComputeResourceSetHandle::Invalid }
 Raw handle for compute resource set objects. More...
 
enum class  kanzi::gfx::DepthStencilStateHandle : uint16_t { kanzi::gfx::DepthStencilStateHandle::Default , kanzi::gfx::DepthStencilStateHandle::Invalid }
 Raw handle for depth stencil state objects. More...
 
enum class  kanzi::gfx::FrameBufferHandle : uint16_t { kanzi::gfx::FrameBufferHandle::Default , kanzi::gfx::FrameBufferHandle::Invalid }
 Raw handle for frame buffer objects. More...
 
enum class  kanzi::gfx::GpuFenceHandle : uint16_t { kanzi::gfx::GpuFenceHandle::Default , kanzi::gfx::GpuFenceHandle::Invalid }
 Raw handle for GPU fence objects. More...
 
enum class  kanzi::gfx::ImageHandle : uint16_t { kanzi::gfx::ImageHandle::Default , kanzi::gfx::ImageHandle::Invalid }
 Raw handle for image objects. More...
 
enum class  kanzi::gfx::RasterStateHandle : uint16_t { kanzi::gfx::RasterStateHandle::Default , kanzi::gfx::RasterStateHandle::Invalid }
 Raw handle for raster state objects. More...
 
enum class  kanzi::gfx::RenderPassHandle : uint16_t { kanzi::gfx::RenderPassHandle::Default , kanzi::gfx::RenderPassHandle::Invalid }
 Raw handle for render pass objects. More...
 
enum class  kanzi::gfx::RenderPipelineHandle : uint16_t { kanzi::gfx::RenderPipelineHandle::Default , kanzi::gfx::RenderPipelineHandle::Invalid }
 Raw handle for render pipeline objects. More...
 
enum class  kanzi::gfx::RenderResourceSetHandle : uint16_t { kanzi::gfx::RenderResourceSetHandle::Default , kanzi::gfx::RenderResourceSetHandle::Invalid }
 Raw handle for render resource set objects. More...
 
enum class  kanzi::gfx::SamplerHandle : uint16_t { kanzi::gfx::SamplerHandle::Default , kanzi::gfx::SamplerHandle::Invalid }
 Raw handle for sampler objects. More...
 
enum class  kanzi::gfx::ShaderHandle : uint16_t { kanzi::gfx::ShaderHandle::Default , kanzi::gfx::ShaderHandle::Invalid }
 Raw handle for shader objects. More...
 
enum class  kanzi::gfx::VertexInputStateHandle : uint16_t { kanzi::gfx::VertexInputStateHandle::Default , kanzi::gfx::VertexInputStateHandle::Invalid }
 Raw handle for vertex input state objects. More...
 

Functions

T_Handle kanzi::gfx::HandleGuard< T_Handle >::get () const
 Gets the underlying handle value.
 
 kanzi::gfx::HandleGuard< T_Handle >::HandleGuard ()=default
 Constructor.
 
 kanzi::gfx::HandleGuard< T_Handle >::HandleGuard (const HandleGuard &other)
 Copy Constructor.
 
 kanzi::gfx::HandleGuard< T_Handle >::HandleGuard (HandleGuard &&other) noexcept
 Move Constructor.
 
 kanzi::gfx::HandleGuard< T_Handle >::HandleGuard (T_Handle h)
 Constructor.
 
bool kanzi::gfx::HandleGuard< T_Handle >::isValid () const
 Returns whether a handle is valid.
 
 kanzi::gfx::HandleGuard< T_Handle >::operator bool () const
 Tests the validity of a handle.
 
template<typename T_Handle >
constexpr kanzi::gfx::DefaultHandleGuardT::operator HandleGuard< T_Handle > () const
 Returns the default handle for any handle type.
 
template<typename T_Handle >
constexpr kanzi::gfx::InvalidHandleGuardT::operator HandleGuard< T_Handle > () const
 Returns the invalid handle for any handle type.
 
 kanzi::gfx::HandleGuard< T_Handle >::operator T_Handle () const
 Automatic conversion into underlying handle type.
 
template<typename T_Handle >
bool kanzi::gfx::operator!= (const HandleGuard< T_Handle > &lhs, const HandleGuard< T_Handle > &rhs)
 Handle non-equality operator.
 
template<typename T_Handle >
bool kanzi::gfx::operator!= (const HandleGuard< T_Handle > &lhs, const T_Handle &rhs)
 Handle non-equality operator.
 
HandleGuardkanzi::gfx::HandleGuard< T_Handle >::operator= (const HandleGuard &other)
 Assignment operator.
 
HandleGuardkanzi::gfx::HandleGuard< T_Handle >::operator= (HandleGuard &&other) noexcept
 Move assignment operator.
 
template<typename T_Handle >
bool kanzi::gfx::operator== (const HandleGuard< T_Handle > &lhs, const HandleGuard< T_Handle > &rhs)
 Handle equality operator.
 
template<typename T_Handle >
bool kanzi::gfx::operator== (const HandleGuard< T_Handle > &lhs, const T_Handle &rhs)
 Handle equality operator.
 
 kanzi::gfx::HandleGuard< T_Handle >::~HandleGuard ()
 Destructor.
 

Variables

struct kanzi::gfx::DefaultHandleGuardT kanzi::gfx::DefaultHandleGuard
 
struct kanzi::gfx::InvalidHandleGuardT kanzi::gfx::InvalidHandleGuard
 

Detailed Description

Handle types for the graphics library.

Typedef Documentation

◆ BufferHandleGuard

Reference counted buffer handle.

Since
Kanzi 4.0.0

◆ ImageHandleGuard

Reference counted image handle.

Since
Kanzi 4.0.0

◆ FrameBufferHandleGuard

Reference counted frame buffer handle.

Since
Kanzi 4.0.0

◆ VertexInputStateHandleGuard

Reference counted vertex input state handle.

Since
Kanzi 4.0.0

◆ DepthStencilStateHandleGuard

Reference counted depth stencil state handle.

Since
Kanzi 4.0.0

◆ BlendStateHandleGuard

Reference counted blend state handle.

Since
Kanzi 4.0.0

◆ RasterStateHandleGuard

Reference counted raster state handle.

Since
Kanzi 4.0.0

◆ SamplerHandleGuard

Reference counted sampler handle.

Since
Kanzi 4.0.0

◆ RenderResourceSetHandleGuard

Reference counted render resource set handle.

Since
Kanzi 4.0.0

◆ ComputeResourceSetHandleGuard

Reference counted compute resource set handle.

Since
Kanzi 4.0.0

◆ ShaderHandleGuard

Reference counted shader handle.

Since
Kanzi 4.0.0

◆ ComputePipelineHandleGuard

Reference counted compute pipeline handle.

Since
Kanzi 4.0.0

◆ RenderPipelineHandleGuard

Reference counted render pipeline handle.

Since
Kanzi 4.0.0

◆ RenderPassHandleGuard

Reference counted render pass handle.

Since
Kanzi 4.0.0

◆ CommandBufferHandleGuard

Reference counted command buffer handle.

Since
Kanzi 4.0.0

◆ GpuFenceHandleGuard

Reference counted GPU fence handle.

Since
Kanzi 4.0.0

Enumeration Type Documentation

◆ BufferHandle

Raw handle for buffer objects.

Since
Kanzi 4.0.0
Enumerator
Default 

Default handle.

Invalid 

Handle that represents an invalid object.

◆ ImageHandle

Raw handle for image objects.

Since
Kanzi 4.0.0
Enumerator
Default 

Default handle.

Invalid 

Handle that represents an invalid object.

◆ FrameBufferHandle

Raw handle for frame buffer objects.

Since
Kanzi 4.0.0
Enumerator
Default 

Default handle.

Invalid 

Handle that represents an invalid object.

◆ VertexInputStateHandle

Raw handle for vertex input state objects.

Since
Kanzi 4.0.0
Enumerator
Default 

Default handle.

Invalid 

Handle that represents an invalid object.

◆ DepthStencilStateHandle

Raw handle for depth stencil state objects.

Since
Kanzi 4.0.0
Enumerator
Default 

Default handle.

Invalid 

Handle that represents an invalid object.

◆ BlendStateHandle

Raw handle for blend state objects.

Since
Kanzi 4.0.0
Enumerator
Default 

Default handle.

Invalid 

Handle that represents an invalid object.

◆ RasterStateHandle

Raw handle for raster state objects.

Since
Kanzi 4.0.0
Enumerator
Default 

Default handle.

Invalid 

Handle that represents an invalid object.

◆ SamplerHandle

Raw handle for sampler objects.

Since
Kanzi 4.0.0
Enumerator
Default 

Default handle.

Invalid 

Handle that represents an invalid object.

◆ RenderResourceSetHandle

Raw handle for render resource set objects.

Since
Kanzi 4.0.0
Enumerator
Default 

Default handle.

Invalid 

Handle that represents an invalid object.

◆ ComputeResourceSetHandle

Raw handle for compute resource set objects.

Since
Kanzi 4.0.0
Enumerator
Default 

Default handle.

Invalid 

Handle that represents an invalid object.

◆ ShaderHandle

Raw handle for shader objects.

Since
Kanzi 4.0.0
Enumerator
Default 

Default handle.

Invalid 

Handle that represents an invalid object.

◆ ComputePipelineHandle

Raw handle for compute pipeline objects.

Since
Kanzi 4.0.0
Enumerator
Default 

Default handle.

Invalid 

Handle that represents an invalid object.

◆ RenderPipelineHandle

Raw handle for render pipeline objects.

Since
Kanzi 4.0.0
Enumerator
Default 

Default handle.

Invalid 

Handle that represents an invalid object.

◆ RenderPassHandle

Raw handle for render pass objects.

Since
Kanzi 4.0.0
Enumerator
Default 

Default handle.

Invalid 

Handle that represents an invalid object.

◆ CommandBufferHandle

Raw handle for command buffer objects.

Since
Kanzi 4.0.0
Enumerator
Default 

Default handle.

Invalid 

Handle that represents an invalid object.

◆ GpuFenceHandle

Raw handle for GPU fence objects.

Since
Kanzi 4.0.0
Enumerator
Default 

Default handle.

Invalid 

Handle that represents an invalid object.

Function Documentation

◆ HandleGuard() [1/4]

template<typename T_Handle >
kanzi::gfx::HandleGuard< T_Handle >::HandleGuard ( )
default

Constructor.

◆ ~HandleGuard()

Destructor.

◆ HandleGuard() [2/4]

template<typename T_Handle >
kanzi::gfx::HandleGuard< T_Handle >::HandleGuard ( T_Handle h)
inlineexplicit

Constructor.

Parameters
hThe handle to wrap.

◆ HandleGuard() [3/4]

template<typename T_Handle >
kanzi::gfx::HandleGuard< T_Handle >::HandleGuard ( const HandleGuard< T_Handle > & other)
inline

Copy Constructor.

Parameters
otherThe other HandleGuard.

◆ HandleGuard() [4/4]

template<typename T_Handle >
kanzi::gfx::HandleGuard< T_Handle >::HandleGuard ( HandleGuard< T_Handle > && other)
inlinenoexcept

Move Constructor.

Parameters
otherThe other HandleGuard.

◆ operator=() [1/2]

Assignment operator.

Parameters
otherThe other HandleGuard.

◆ operator=() [2/2]

Move assignment operator.

Parameters
otherThe other HandleGuard.

◆ operator T_Handle()

Automatic conversion into underlying handle type.

◆ isValid()

template<typename T_Handle >
bool kanzi::gfx::HandleGuard< T_Handle >::isValid ( ) const
inline

Returns whether a handle is valid.

Returns
If the handle is valid, true, otherwise false..

◆ operator bool()

template<typename T_Handle >
kanzi::gfx::HandleGuard< T_Handle >::operator bool ( ) const
inlineexplicit

Tests the validity of a handle.

◆ get()

template<typename T_Handle >
T_Handle kanzi::gfx::HandleGuard< T_Handle >::get ( ) const
inline

Gets the underlying handle value.

Returns
the underlying handle value.

◆ operator==() [1/2]

template<typename T_Handle >
bool kanzi::gfx::operator== ( const HandleGuard< T_Handle > & lhs,
const HandleGuard< T_Handle > & rhs )

Handle equality operator.

Parameters
lhsThe first HandleGuard.
rhsThe second HandleGuard.
Template Parameters
T_HandleThe handle type.
Returns
If the handles are equivalent, true, otherwise false.
Since
Kanzi 4.0.0

◆ operator!=() [1/2]

template<typename T_Handle >
bool kanzi::gfx::operator!= ( const HandleGuard< T_Handle > & lhs,
const HandleGuard< T_Handle > & rhs )

Handle non-equality operator.

Parameters
lhsThe first HandleGuard.
rhsThe second HandleGuard.
Template Parameters
T_HandleThe handle type.
Returns
If the handles are not equivalent, true, otherwise false.
Since
Kanzi 4.0.0

◆ operator==() [2/2]

template<typename T_Handle >
bool kanzi::gfx::operator== ( const HandleGuard< T_Handle > & lhs,
const T_Handle & rhs )

Handle equality operator.

Parameters
lhsThe first HandleGuard.
rhsThe second Handle.
Template Parameters
T_HandleThe handle type.
Returns
If the handles are equivalent, true, otherwise false.
Since
Kanzi 4.0.0

◆ operator!=() [2/2]

template<typename T_Handle >
bool kanzi::gfx::operator!= ( const HandleGuard< T_Handle > & lhs,
const T_Handle & rhs )

Handle non-equality operator.

Parameters
lhsThe first HandleGuard.
rhsThe second Handle.
Template Parameters
T_HandleThe handle type.
Returns
If the handles are not equivalent, true, otherwise false.
Since
Kanzi 4.0.0

◆ operator HandleGuard< T_Handle >() [1/2]

template<typename T_Handle >
constexpr kanzi::gfx::DefaultHandleGuardT::operator HandleGuard< T_Handle > ( ) const
inlineconstexpr

Returns the default handle for any handle type.

Template Parameters
Thehandle type.
Returns
A HandleGuard for the default handle.

◆ operator HandleGuard< T_Handle >() [2/2]

template<typename T_Handle >
constexpr kanzi::gfx::InvalidHandleGuardT::operator HandleGuard< T_Handle > ( ) const
inlineconstexpr

Returns the invalid handle for any handle type.

Template Parameters
Thehandle type.
Returns
A HandleGuard for the invalid handle.

Variable Documentation

◆ DefaultHandleGuard

struct kanzi::gfx::DefaultHandleGuardT kanzi::gfx::DefaultHandleGuard

◆ InvalidHandleGuard

struct kanzi::gfx::InvalidHandleGuardT kanzi::gfx::InvalidHandleGuard