EnTT  3.8.1
loader.hpp
1 #ifndef ENTT_RESOURCE_LOADER_HPP
2 #define ENTT_RESOURCE_LOADER_HPP
3 
4 
5 #include "fwd.hpp"
6 #include "handle.hpp"
7 
8 
9 namespace entt {
10 
11 
44 template<typename Loader, typename Resource>
47  template<typename Other>
48  friend struct resource_cache;
49 
56  template<typename... Args>
57  [[nodiscard]] resource_handle<Resource> get(Args &&... args) const {
58  return static_cast<const Loader *>(this)->load(std::forward<Args>(args)...);
59  }
60 };
61 
62 
63 }
64 
65 
66 #endif
Shared resource handle.
Definition: handle.hpp:28
Base class for resource loaders.
Definition: loader.hpp:45
EnTT default namespace.
Definition: algorithm.hpp:13
Simple cache for resources of a given type.
Definition: cache.hpp:29