29 #ifndef THOR_RESOURCEHOLDER_HPP
30 #define THOR_RESOURCEHOLDER_HPP
37 #include <Aurora/Tools/NonCopyable.hpp>
59 template <
typename R,
typename I,
class O = Resources::CentralOwner>
66 typedef typename detail::OwnershipModel<O, R> Om;
144 std::map<I, typename Om::Stored> mMap;
151 #include <Thor/Resources/Detail/ResourceHolder.inl>
152 #endif // THOR_RESOURCEHOLDER_HPP
Classes thor::ResourceLoadingException, thor::ResourceAccessException.
Ownership models for thor::ResourceHolder.
void release(const I &id)
Unloads the resource currently identified as id.
Enum KnownIdStrategy, used by thor::ResourceHolder.
Loads a new resource if the ID is unknown. Otherwise, a ResourceAccessException is thrown...
Definition: KnownIdStrategy.hpp:47
KnownIdStrategy
Strategy to deal with already known resource IDs.
Definition: KnownIdStrategy.hpp:45
Definition: AnimationMap.hpp:42
ResourceHolder()
Default constructor.
Om::ConstReturned ConstResource
Resource handle for constant access.
Definition: ResourceHolder.hpp:84
Class that is responsible of the management of resources like images, fonts or music.
Definition: ResourceHolder.hpp:60
Resource acquire(const I &id, const ResourceLoader< R > &how, Resources::KnownIdStrategy known=Resources::AssumeNew)
Loads a new resource, identified as id.
Resource operator[](const I &id)
Accesses a resource using the identifier id.
ResourceHolder & operator=(ResourceHolder &&source)
Move assignment operator.
Class storing loading information for resources.
Definition: ResourceLoader.hpp:48
Class template thor::ResourceLoader.
Om::Returned Resource
Resource handle for mutable access.
Definition: ResourceHolder.hpp:77