|
| | ResourceManager ()=default |
| | ~ResourceManager ()=default |
| | ResourceManager (const ResourceManager &)=delete |
| ResourceManager & | operator= (const ResourceManager &)=delete |
| | ResourceManager (ResourceManager &&) noexcept=default |
| ResourceManager & | operator= (ResourceManager &&) noexcept=default |
| template<typename... Args> |
| entt::resource< ResourceType > | Add (const entt::hashed_string &id, Args &&...args) |
| | Adds a resource to the manager.
|
| template<CViewStringable TViewStringable, typename... Args> |
| entt::resource< ResourceType > | Add (const TViewStringable &id, Args &&...args) |
| ResourceType & | Get (const entt::hashed_string &id) |
| | Get the reference to a stored resource.
|
| template<CViewStringable TViewStringable> |
| ResourceType & | Get (const TViewStringable &id) |
| const ResourceType & | Get (const entt::hashed_string &id) const |
| | Get the reference to a stored resource.
|
| template<CViewStringable TViewStringable> |
| const ResourceType & | Get (const TViewStringable &id) const |
| void | Remove (const entt::hashed_string &id) |
| | Delete an resource from the manager.
|
| template<CViewStringable TViewStringable> |
| void | Remove (const TViewStringable &id) |
| bool | Contains (const entt::hashed_string &id) const |
| | Check whenever the resource with given id exists in the manager.
|
| template<CViewStringable TViewStringable> |
| bool | Contains (const TViewStringable &id) const |
| void | SetDefault (ResourceType &&resource) |
| | Set the default resource that will be used as fallback.
|
| template<typename... Args> |
| void | SetDefault (Args &&...args) |
| ResourceType & | GetDefault () |
| | Get the default resource.
|
| const ResourceType & | GetDefault () const |
| | Get the default resource.
|
| ResourceType & | GetOrDefault (const entt::hashed_string &id) |
| | Get the reference to a stored resource, or the default resource if it doesn't exist.
|
| template<CViewStringable TViewStringable> |
| ResourceType & | GetOrDefault (const TViewStringable &id) |
| const ResourceType & | GetOrDefault (const entt::hashed_string &id) const |
| | Get the reference to a stored resource, or the default resource if it doesn't exist.
|
| template<CViewStringable TViewStringable> |
| const ResourceType & | GetOrDefault (const TViewStringable &id) const |
| bool | HasDefault () const |
| | Check if a default resource has been set.
|
template<typename ResourceType>
class Object::Resource::ResourceManager< ResourceType >
ResourceManager is a simple class that store resources. It provides methods to add, get, and remove resources. It should be used to manage resources like textures, shaders, and meshes.