HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HgiHandle< T > Class Template Reference

#include <handle.h>

Public Member Functions

 HgiHandle ()
 
 HgiHandle (T *obj, uint64_t id)
 
TGet () const
 
 operator bool () const
 
Toperator-> () const
 
bool operator== (const HgiHandle &other) const
 
bool operator!= (const HgiHandle &other) const
 

Detailed Description

template<class T>
class HgiHandle< T >

Handle that contains a hgi object and unique id.

The unique id is used to compare two handles to guard against pointer aliasing, where the same memory address is used to create a similar object, but it is not actually the same object.

Handle is not a shared or weak_ptr and destruction of the contained object should be explicitely managed by the client via the HgiDestroy*** functions.

If shared/weak ptr functionality is desired, the client creating Hgi objects can wrap the returned handle in a shared_ptr.

Definition at line 49 of file handle.h.

Constructor & Destructor Documentation

template<class T>
HgiHandle< T >::HgiHandle ( )
inline

Definition at line 52 of file handle.h.

template<class T>
HgiHandle< T >::HgiHandle ( T obj,
uint64_t  id 
)
inline

Definition at line 53 of file handle.h.

Member Function Documentation

template<class T>
T* HgiHandle< T >::Get ( ) const
inline

Definition at line 56 of file handle.h.

template<class T>
HgiHandle< T >::operator bool ( ) const
inlineexplicit

Definition at line 61 of file handle.h.

template<class T>
bool HgiHandle< T >::operator!= ( const HgiHandle< T > &  other) const
inline

Definition at line 70 of file handle.h.

template<class T>
T* HgiHandle< T >::operator-> ( ) const
inline

Definition at line 64 of file handle.h.

template<class T>
bool HgiHandle< T >::operator== ( const HgiHandle< T > &  other) const
inline

Definition at line 66 of file handle.h.


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