![]() |
Plasma Engine
2.0
|
The typeless implementation of resource handles. A typed interface is provided by plTypedResourceHandle. More...
#include <ResourceHandle.h>
Public Member Functions | |
| plTypelessResourceHandle (plResource *pResource) | |
| [internal] Increases the refcount of the given resource. | |
| PL_ALWAYS_INLINE | plTypelessResourceHandle (const plTypelessResourceHandle &rhs) |
| Increases the refcount of the given resource. | |
| PL_ALWAYS_INLINE | plTypelessResourceHandle (plTypelessResourceHandle &&rhs) |
| Move constructor, no refcount change is necessary. | |
| PL_ALWAYS_INLINE | ~plTypelessResourceHandle () |
| Releases any referenced resource. | |
| PL_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. | |
| plUInt64 | 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 plString & | GetResourceID () 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 plTypelessResourceHandle &rhs) |
| Releases the current reference and increases the refcount of the given resource. | |
| void | operator= (plTypelessResourceHandle &&rhs) |
| Move operator, no refcount change is necessary. | |
| PL_ALWAYS_INLINE bool | operator== (const plTypelessResourceHandle &rhs) const |
| Checks whether the two handles point to the same resource. | |
| PL_ALWAYS_INLINE bool | operator!= (const plTypelessResourceHandle &rhs) const |
| Checks whether the two handles point to the same resource. | |
| PL_ALWAYS_INLINE bool | operator< (const plTypelessResourceHandle &rhs) const |
| For storing handles as keys in maps. | |
| PL_ALWAYS_INLINE bool | operator== (const plResource *rhs) const |
| Checks whether the handle points to the given resource. | |
| PL_ALWAYS_INLINE bool | operator!= (const plResource *rhs) const |
| Checks whether the handle points to the given resource. | |
| const plRTTI * | GetResourceType () const |
| Returns the type information of the resource or nullptr if the handle is invalid. | |
Protected Attributes | |
| plResource * | m_pResource = nullptr |
Friends | |
| class | plResourceManager |
| class | plResourceHandleWriteContext |
| class | plResourceHandleReadContext |
| class | plResourceHandleStreamOperations |
The typeless implementation of resource handles. A typed interface is provided by plTypedResourceHandle.