Flutter Engine
The Flutter Engine
|
A unique handle to a resource which will be reclaimed by the specified resource manager. More...
#include <resource_manager_vk.h>
Public Types | |
using | ResourceType = ResourceType_ |
Public Member Functions | |
UniqueResourceVKT (std::weak_ptr< ResourceManagerVK > resource_manager) | |
Construct a unique resource handle belonging to a manager. | |
UniqueResourceVKT (std::weak_ptr< ResourceManagerVK > resource_manager, ResourceType &&resource) | |
Construct a unique resource handle belonging to a manager. | |
~UniqueResourceVKT () | |
const ResourceType * | operator-> () const |
Returns a pointer to the resource. | |
void | Swap (ResourceType &&other) |
Reclaims the existing resource, if any, and replaces it. | |
void | Reset () |
Reclaims the existing resource, if any. | |
A unique handle to a resource which will be reclaimed by the specified resource manager.
ResourceType_ | A move-constructible resource type. |
Definition at line 145 of file resource_manager_vk.h.
using impeller::UniqueResourceVKT< ResourceType_ >::ResourceType = ResourceType_ |
Definition at line 147 of file resource_manager_vk.h.
|
inlineexplicit |
Construct a unique resource handle belonging to a manager.
Initially the handle is empty, and can be populated by calling Swap
.
[in] | resource_manager | The resource manager. |
Definition at line 154 of file resource_manager_vk.h.
|
inlineexplicit |
Construct a unique resource handle belonging to a manager.
Initially the handle is populated with the specified resource, but can be replaced (reclaiming the old resource) by calling Swap
.
[in] | resource_manager | The resource manager. |
[in] | resource | The resource to move. |
Definition at line 164 of file resource_manager_vk.h.
|
inline |
Definition at line 170 of file resource_manager_vk.h.
|
inline |
Returns a pointer to the resource.
Definition at line 173 of file resource_manager_vk.h.
|
inline |
Reclaims the existing resource, if any.
Definition at line 189 of file resource_manager_vk.h.
|
inline |
Reclaims the existing resource, if any, and replaces it.
[in] | other | The (new) resource to move. |
Definition at line 183 of file resource_manager_vk.h.