Template class for managing resources.
More...
#include <resource_management.h>
|
| template<typename Concrete, typename... Args> |
| void | load (Identifier id, Args &&...args) |
| | Loads a resource of a specific type.
|
| Resource & | get (Identifier id) |
| | Retrieves a resource by its identifier.
|
| const Resource & | get (Identifier id) const |
| | Retrieves a const reference to a resource by its identifier.
|
|
void | clear () noexcept |
| | Clears all resources from the manager.
|
|
bool | is_empty () const noexcept |
| | Checks if the resource manager is empty.
|
template<typename Resource, typename Identifier>
class mazes::resource_management< Resource, Identifier >
Template class for managing resources.
- Template Parameters
-
| Resource | The type of resource to manage |
| Identifier | The type used to identify resources |
◆ get() [1/2]
template<typename Resource, typename Identifier>
Retrieves a resource by its identifier.
Non-const version of get() to retrieve a resource by its identifier.
- Parameters
-
- Returns
- Template Parameters
-
- Parameters
-
- Returns
◆ get() [2/2]
template<typename Resource, typename Identifier>
Retrieves a const reference to a resource by its identifier.
Const version of get() to retrieve a resource by its identifier.
- Parameters
-
- Returns
- Template Parameters
-
- Parameters
-
- Returns
◆ load()
template<typename Resource, typename Identifier>
template<typename Concrete, typename... Args>
Loads a resource of a specific type.
- Template Parameters
-
| Concrete | The concrete type of the resource |
| ...Args | The types of arguments to pass to the resource constructor |
- Parameters
-
| id | The identifier for the resource |
| args | The arguments to pass to the resource constructor |
| ...args | The arguments to pass to the resource constructor |
The documentation for this class was generated from the following files: