Topaz 5.0
Topaz Game Engine
Loading...
Searching...
No Matches
tz::handle< T > Class Template Reference

Description

template<typename T>
class tz::handle< T >

Represents a generic opaque handle.

To create your own opaque handle types, simply create a type alias for a handle<T> where T is any unique type identifier.

#include "handle.hpp"

Public Member Functions

std::underlying_type_t< hanval > peek () const
 Disregard the concept of "opaqueness" of an opaque handle by peeking at the underlying value. You should avoid the use of this outside of debug tools.
 
handleoperator= (hanval value)
 Assign a handle to the null handle, meaning it is now invalid.
 
bool operator== (nullhand_t) const
 Compare a handle to the null handle. This comparison will return false if the handle is valid.
 
bool operator!= (nullhand_t) const
 Compare a handle to the null handle. This comparison will return true if the handle is valid.
 

Member Function Documentation

◆ peek()

template<typename T >
std::underlying_type_t< hanval > tz::handle< T >::peek ( ) const
inline

Disregard the concept of "opaqueness" of an opaque handle by peeking at the underlying value. You should avoid the use of this outside of debug tools.

◆ operator=()

template<typename T >
handle & tz::handle< T >::operator= ( hanval value)
inline

Assign a handle to the null handle, meaning it is now invalid.

◆ operator==()

template<typename T >
bool tz::handle< T >::operator== ( nullhand_t ) const
inline

Compare a handle to the null handle. This comparison will return false if the handle is valid.

◆ operator!=()

template<typename T >
bool tz::handle< T >::operator!= ( nullhand_t ) const
inline

Compare a handle to the null handle. This comparison will return true if the handle is valid.