|
| resource_handle () ENTT_NOEXCEPT=default |
| Default constructor.
|
|
const Resource & | get () const ENTT_NOEXCEPT |
| Gets a reference to the managed resource. More...
|
|
Resource & | get () ENTT_NOEXCEPT |
| Gets a reference to the managed resource. More...
|
|
| operator const Resource & () const ENTT_NOEXCEPT |
| Gets a reference to the managed resource. More...
|
|
| operator Resource & () ENTT_NOEXCEPT |
| Gets a reference to the managed resource. More...
|
|
const Resource & | operator* () const ENTT_NOEXCEPT |
| Gets a reference to the managed resource. More...
|
|
Resource & | operator* () ENTT_NOEXCEPT |
| Gets a reference to the managed resource. More...
|
|
const Resource * | operator-> () const ENTT_NOEXCEPT |
| Gets a pointer to the managed resource. More...
|
|
Resource * | operator-> () ENTT_NOEXCEPT |
| Gets a pointer to the managed resource. More...
|
|
| operator bool () const ENTT_NOEXCEPT |
| Returns true if a handle contains a resource, false otherwise. More...
|
|
template<typename Resource>
class entt::resource_handle< Resource >
Shared resource handle.
A shared resource handle is a small class that wraps a resource and keeps it alive even if it's deleted from the cache. It can be either copied or moved. A handle shares a reference to the same resource with all the other handles constructed for the same identifier.
As a rule of thumb, resources should never be copied nor moved. Handles are the way to go to keep references to them.
- Template Parameters
-
Resource | Type of resource managed by a handle. |