EnTT
3.3.2
src
entt
resource
loader.hpp
1
#ifndef ENTT_RESOURCE_LOADER_HPP
2
#define ENTT_RESOURCE_LOADER_HPP
3
4
5
#include <memory>
6
#include "fwd.hpp"
7
8
9
namespace
entt
{
10
11
44
template
<
typename
Loader,
typename
Resource>
45
class
loader {
47
friend
struct
cache
<Resource>;
48
55
template
<
typename
... Args>
56
std::shared_ptr<Resource> get(Args &&... args)
const
{
57
return
static_cast<const Loader *>(
this
)->
load
(std::forward<Args>(args)...);
58
}
59
};
60
61
62
}
63
64
65
#endif
entt::cache
Simple cache for resources of a given type.
Definition:
cache.hpp:29
entt
EnTT default namespace.
Definition:
algorithm.hpp:13
entt::cache::load
entt::handle< Resource > load(const id_type id, Args &&... args)
Loads the resource that corresponds to a given identifier.
Definition:
cache.hpp:95
Generated by
1.8.16