OpenLexocad
27.0
|
Base class for resource loaders. More...
#include <entt.hpp>
Friends | |
struct | cache< Resource > |
Resource loaders are friends of their caches. More... | |
Base class for resource loaders.
Resource loaders must inherit from this class and stay true to the CRTP idiom. Moreover, a resource loader must expose a public, const member function named load
that accepts a variable number of arguments and returns a shared pointer to the resource just created.
As an example:
In general, resource loaders should not have a state or retain data of any type. They should let the cache manage their resources instead.
Loader | Type of the derived class. |
Resource | Type of resource for which to use the loader. |
|
friend |
Resource loaders are friends of their caches.