|
CeresEngine 0.2.0
A game development framework
|
Base class for weak and strong resource handle implementation. More...
#include <CeresEngine/Resource/ResourceHandle.hpp>
Public Member Functions | |
| AbstractResourceHandle ()=default | |
| AbstractResourceHandle (ResourceHandleData *data) | |
| AbstractResourceHandle (SPtr< Resource > resource) noexcept | |
| const UUID & | getUUID () const noexcept |
| bool | isValid () const noexcept |
| Checks if the resource handle is valid. | |
| Async< HResource > | load () const |
| Loads the resource, if not loaded. | |
| bool | isLoaded () const noexcept |
| Checks if the resource handle is valid and loaded. | |
| operator bool () const noexcept | |
| Checks if the resource handle is valid. | |
| void | reset () |
| Resets the resource handle to the default state. | |
Protected Member Functions | |
| void | set (ResourceHandleData *const data) noexcept |
| Changes the internal resource handle data object of the handle. | |
Protected Attributes | |
| ResourceHandleData * | mData = nullptr |
Base class for weak and strong resource handle implementation.
|
default |
|
inlineexplicit |
|
explicitnoexcept |
|
inlinenoexcept |
Checks if the resource handle is valid and loaded.
|
inlinenoexcept |
Checks if the resource handle is valid.
Loads the resource, if not loaded.
|
inlineexplicitnoexcept |
Checks if the resource handle is valid.
|
inline |
Resets the resource handle to the default state.
|
inlineprotectednoexcept |
Changes the internal resource handle data object of the handle.
This will keep track of the reference counting calls.
| data | The new resource handle data to be set. Can be nullptr. |
|
protected |