Cogs.Rendering
|
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 |
Internal handle storage type.
|
inline |
Construct a handle.
The handle is default initialized to Handle_t::InvalidHandle.
|
inline |
Copy constructor.
The handle constructed from will still be valid after the copy.
|
inlineexplicit |
Construct a handle with an explicit internal resource handle.
handle | A 64-bit resource handle. |
|
inline |
Conversion constructor from Convertible type.
other | An instance of the Convertible type. The internal resource handle is copied from this instance. |
|
inlineexplicit |
Boolean conversion operator.
References Cogs::Handle_t< Type, Convertible >::handle.
|
inline |
Conversion operator to automatically convert handle instances to the template Convertible type.
References Cogs::Handle_t< Type, Convertible >::handle.
|
inline |
Assignment operator.
References Cogs::Handle_t< Type, Convertible >::handle.
|
inline |
Equality operator.
other | Another handle instance. |
References Cogs::Handle_t< Type, Convertible >::handle.
handle_type Cogs::Handle_t< Type, Convertible >::handle |
Internal resource handle.
Referenced by Cogs::TextureViewDescription::hash(), Cogs::Handle_t< Type, Convertible >::operator bool(), Cogs::Handle_t< Type, Convertible >::operator Convertible(), std::hash< Cogs::Handle_t< T, U > >::operator()(), Cogs::Handle_t< Type, Convertible >::operator=(), and Cogs::Handle_t< Type, Convertible >::operator==().
|
static |
Represents an invalid handle.
|
static |
Represents a handle to nothing.
Referenced by Cogs::IRenderTargets::loadBlendState().