ezEngine  Milestone 9
ezTypelessResourceHandle Class Reference

The typeless implementation of resource handles. A typed interface is provided by ezTypedResourceHandle. More...

#include <ResourceHandle.h>

Public Member Functions

 ezTypelessResourceHandle (ezResource *pResource)
 [internal] Increases the refcount of the given resource.
 
EZ_ALWAYS_INLINE ezTypelessResourceHandle (const ezTypelessResourceHandle &rhs)
 Increases the refcount of the given resource.
 
EZ_ALWAYS_INLINE ezTypelessResourceHandle (ezTypelessResourceHandle &&rhs)
 Move constructor, no refcount change is necessary.
 
EZ_ALWAYS_INLINE ~ezTypelessResourceHandle ()
 Releases any referenced resource.
 
EZ_ALWAYS_INLINE bool IsValid () const
 Returns whether the handle stores a valid pointer to a resource.
 
void Invalidate ()
 Clears any reference to a resource and reduces its refcount.
 
ezUInt32 GetResourceIDHash () const
 Returns the Resource ID hash of the exact resource that this handle points to, without acquiring the resource. The handle must be valid.
 
const ezStringGetResourceID () const
 Returns the Resource ID of the exact resource that this handle points to, without acquiring the resource. The handle must be valid.
 
void operator= (const ezTypelessResourceHandle &rhs)
 Releases the current reference and increases the refcount of the given resource.
 
void operator= (ezTypelessResourceHandle &&rhs)
 Move operator, no refcount change is necessary.
 
EZ_ALWAYS_INLINE bool operator== (const ezTypelessResourceHandle &rhs) const
 Checks whether the two handles point to the same resource.
 
EZ_ALWAYS_INLINE bool operator!= (const ezTypelessResourceHandle &rhs) const
 Checks whether the two handles point to the same resource.
 
EZ_ALWAYS_INLINE bool operator< (const ezTypelessResourceHandle &rhs) const
 For storing handles as keys in maps.
 
EZ_ALWAYS_INLINE bool operator== (const ezResource *rhs) const
 Checks whether the handle points to the given resource.
 
EZ_ALWAYS_INLINE bool operator!= (const ezResource *rhs) const
 Checks whether the handle points to the given resource.
 

Protected Attributes

ezResourcem_pResource = nullptr
 

Friends

class ezResourceManager
 
class ezResourceHandleWriteContext
 
class ezResourceHandleReadContext
 

Detailed Description

The typeless implementation of resource handles. A typed interface is provided by ezTypedResourceHandle.


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