Ult3D
Implementation of "Ultimate 3D Game Engine Design & Architecture" by Allan Sherrod
Loading...
Searching...
No Matches
Ult::Handle< T > Class Template Reference

#include <Handle.h>

Public Member Functions

 Handle ()
 
void Initialize (const int index)
 
void Nullify ()
 
int GetIndex () const
 
bool IsNull () const
 
bool operator== (const Handle< T > &handle)
 

Static Public Attributes

static constexpr int NULL_HANDLE = -1
 

Detailed Description

template<typename T>
class Ult::Handle< T >

Used to represent a reference handle for a type T. Wraps and index value to where the object instance is located.

Constructor & Destructor Documentation

◆ Handle()

template<typename T>
Ult::Handle< T >::Handle ( )
inline

Handle constructor.

Member Function Documentation

◆ GetIndex()

template<typename T>
int Ult::Handle< T >::GetIndex ( ) const
inline

Returns the object reference index.

◆ Initialize()

template<typename T>
void Ult::Handle< T >::Initialize ( const int index)
inline

Set the index of the referenced object.

◆ IsNull()

template<typename T>
bool Ult::Handle< T >::IsNull ( ) const
inline

Returns whether the index is NULL_HANDLE or not.

◆ Nullify()

template<typename T>
void Ult::Handle< T >::Nullify ( )
inline

Set the index to NULL_HANDLE.

◆ operator==()

template<typename T>
bool Ult::Handle< T >::operator== ( const Handle< T > & handle)
inline

Checks if the two handle indexes are equal.

Member Data Documentation

◆ NULL_HANDLE

template<typename T>
int Ult::Handle< T >::NULL_HANDLE = -1
staticconstexpr

The documentation for this class was generated from the following file: