7 #ifndef NAZARA_RESOURCEMANAGER_HPP 8 #define NAZARA_RESOURCEMANAGER_HPP 10 #include <Nazara/Core/ObjectRef.hpp> 11 #include <Nazara/Core/ResourceParameters.hpp> 12 #include <Nazara/Core/String.hpp> 13 #include <unordered_map> 17 template<
typename Type,
typename Parameters>
37 static bool Initialize();
38 static void Uninitialize();
40 using ManagerMap = std::unordered_map<String, ObjectRef<Type>>;
41 using ManagerParams = Parameters;
45 #include <Nazara/Core/ResourceManager.inl> 47 #endif // NAZARA_RESOURCEMANAGER_HPP TODO: Inherit SoundEmitter from Node.
Definition: Algorithm.hpp:12
static void Unregister(const String &filePath)
Unregisters the resource under the filePath.
Definition: ResourceManager.inl:122
static ObjectRef< Type > Get(const String &filePath)
Gets a reference to the object loaded from file.
Definition: ResourceManager.inl:34
Core class that represents a string.
Definition: String.hpp:22
static void SetDefaultParameters(const Parameters ¶ms)
Sets the defaults parameters for the load.
Definition: ResourceManager.inl:111
Core class that represents a reference to an object.
Definition: ObjectRef.hpp:18
static void Clear()
Clears the content of the manager.
Definition: ResourceManager.inl:22
Core class that represents a resource manager.
Definition: ResourceManager.hpp:18
static const Parameters & GetDefaultParameters()
Gets the defaults parameters for the load.
Definition: ResourceManager.inl:66
static void Register(const String &filePath, ObjectRef< Type > resource)
Registers the resource under the filePath.
Definition: ResourceManager.inl:98
static void Purge()
Purges the resource manager from every asset whose it is the only owner.
Definition: ResourceManager.inl:75