|
Flint Engine
Modular C++20 2D game engine powered by SDL3
|
RAII handle returned by watch(). More...
#include <flint/resource/assets-manager.h>
Collaboration diagram for Flint::AssetManager::WatchHandle:Public Member Functions | |
| WatchHandle ()=default | |
| Construct an empty (inactive) handle. | |
| WatchHandle (AssetManager *manager, uint64_t id, std::weak_ptr< ManagerLifetime > managerLifetime) | |
| Construct an active handle tied to a specific watch entry. | |
| ~WatchHandle () | |
| Destructor; calls reset() to cancel the watch if still active. | |
| WatchHandle (WatchHandle &&other) noexcept | |
| Move constructor; transfers ownership and nulls the source. | |
| WatchHandle & | operator= (WatchHandle &&other) noexcept |
| Move-assignment operator. | |
| WatchHandle (const WatchHandle &)=delete | |
| WatchHandle & | operator= (const WatchHandle &)=delete |
| bool | isActive () const |
| Return whether this handle is still registered. | |
| void | reset () |
| Cancel the watch and release the handle. | |
RAII handle returned by watch().
While a WatchHandle is alive the associated callback remains registered. Destroying or resetting the handle automatically deregisters it. Handles are move-only; they cannot be copied.
Definition at line 94 of file assets-manager.h.