Cogs.Core
|
Handle template class used to provide opaque, non-converting handles. More...
#include <Common.h>
Public Types | |
typedef int64_t | handle_type |
Internal handle storage type. | |
Public Member Functions | |
Handle_t () | |
Construct a handle. | |
Handle_t (const Handle_t &other) | |
Copy constructor. | |
Handle_t (const handle_type &handle) | |
Construct a handle with an explicit internal resource handle. | |
Handle_t (const Convertible &other) | |
Conversion constructor from Convertible type. | |
Handle_t & | operator= (const Handle_t &other) |
Assignment operator. | |
bool | operator== (const Handle_t &other) const |
Equality operator. | |
operator bool () const | |
Boolean conversion operator. | |
operator Convertible () | |
Conversion operator to automatically convert handle instances to the template Convertible type. | |
Public Attributes | |
handle_type | handle |
Internal resource handle. | |
Static Public Attributes | |
static const Handle_t | NoHandle = Handle_t<T, U>(0) |
Represents a handle to nothing. | |
static const Handle_t | InvalidHandle = Handle_t<T, U>(-1) |
Represents an invalid handle. | |
Handle template class used to provide opaque, non-converting handles.
typedef int64_t Cogs::Handle_t< Type, Convertible >::handle_type |
|
inline |
Construct a handle.
The handle is default initialized to Handle_t::InvalidHandle.
|
inline |
|
inlineexplicit |
|
inline |
|
inlineexplicit |
Boolean conversion operator.
Definition at line 64 of file Common.h.
References Cogs::Handle_t< Type, Convertible >::handle.
|
inline |
|
inline |
Assignment operator.
Definition at line 53 of file Common.h.
References Cogs::Handle_t< Type, Convertible >::handle.
|
inline |
Equality operator.
other | Another handle instance. |
Definition at line 61 of file Common.h.
References Cogs::Handle_t< Type, Convertible >::handle.
handle_type Cogs::Handle_t< Type, Convertible >::handle |
Internal resource handle.
Definition at line 74 of file Common.h.
Referenced by Cogs::BuffersD3D11::annotate(), Cogs::EffectsWebGPU::getBufferBinding(), Cogs::BuffersNull::getNativeHandle(), Cogs::TexturesNull::getNativeHandle(), Cogs::EffectsWebGPU::getSamplerStateBinding(), Cogs::EffectsWebGPU::getTextureBinding(), Cogs::Handle_t< Type, Convertible >::operator bool(), Cogs::Handle_t< BufferTag, BufferHandle >::operator BufferHandle(), Cogs::Handle_t< Type, Convertible >::operator=(), Cogs::Handle_t< Type, Convertible >::operator==(), Cogs::RenderTargetsNull::releaseBlendState(), Cogs::RenderTargetsWebGPU::releaseBlendState(), Cogs::BuffersNull::releaseBuffer(), Cogs::RenderTargetsNull::releaseDepthStencilState(), Cogs::RenderTargetsWebGPU::releaseDepthStencilState(), Cogs::RenderTargetsNull::releaseDepthStencilTarget(), Cogs::EffectsNull::releaseEffect(), Cogs::BuffersNull::releaseIndexBuffer(), Cogs::RenderTargetsNull::releaseRasterizerState(), Cogs::RenderTargetsWebGPU::releaseRasterizerState(), Cogs::RenderTargetsNull::releaseRenderTarget(), Cogs::TexturesGL20::releaseSamplerState(), Cogs::TexturesNull::releaseSamplerState(), Cogs::TexturesNull::releaseTexture(), Cogs::TexturesGL20::releaseTextureView(), Cogs::TexturesNull::releaseTextureView(), Cogs::BuffersNull::releaseVertexBuffer(), Cogs::ContextGL20::setBuffer(), Cogs::ContextD3D11::setConstantBuffer(), Cogs::ContextD3D12::setConstantBuffer(), Cogs::ContextGL20::setConstantBuffer(), Cogs::ContextGLES30::setConstantBuffer(), Cogs::ContextVK::setConstantBuffer(), Cogs::ContextWebGPU::setConstantBuffer(), Cogs::ContextGLES30::setEffect(), Cogs::ContextGLES30::setIndexBuffer(), Cogs::ContextWebGPU::setIndexBuffer(), Cogs::ContextGLES30::setMatrixVariable(), Cogs::ContextD3D11::setSamplerState(), Cogs::ContextD3D12::setSamplerState(), Cogs::ContextGL20::setSamplerState(), Cogs::ContextGLES30::setSamplerState(), Cogs::ContextVK::setSamplerState(), Cogs::ContextWebGPU::setSamplerState(), Cogs::ContextGLES30::setScalarVariable(), Cogs::ContextD3D11::setTexture(), Cogs::ContextGLES30::setTexture(), Cogs::ContextD3D12::setTexture(), Cogs::ContextGL20::setTexture(), Cogs::ContextVK::setTexture(), Cogs::ContextWebGPU::setTexture(), Cogs::ContextCommon::setVariable(), Cogs::ContextGLES30::setVector2Variable(), Cogs::ContextGLES30::setVector3Variable(), and Cogs::ContextGLES30::setVector4Variable().
|
static |
Represents an invalid handle.
Definition at line 80 of file Common.h.
Referenced by Cogs::EffectsGL20::getBufferBinding().
|
static |
Represents a handle to nothing.
Definition at line 77 of file Common.h.
Referenced by Cogs::SyncObjectsCommon::createFence(), Cogs::SyncObjectsD3D11::createFence(), Cogs::SyncObjectsD3D12::createFence(), and Cogs::EffectsWebGPU::getBufferBinding().