16#ifndef AEONGAMES_RESOURCEFACTORY_H
17#define AEONGAMES_RESOURCEFACTORY_H
22#include "aeongames/UniqueAnyPtr.hpp"
Identifies a resource by its type and path CRC32 hashes.
A type-erased owning smart pointer with unique ownership semantics.
<- This is here just for the literals
DLL const UniqueAnyPtr & GetDefaultResource(uint32_t aType)
Get the default resource for a given type.
DLL UniqueAnyPtr ConstructResource(const ResourceId &aResourceId)
Construct a resource identified by a ResourceId.
DLL bool UnregisterResourceConstructor(uint32_t aType)
Unregister a resource constructor.
DLL void EnumerateResourceConstructors(const std::function< bool(uint32_t) > &aEnumerator)
Enumerate all registered resource constructors.
DLL bool RegisterResourceConstructor(uint32_t aType, const std::function< UniqueAnyPtr(uint32_t) > &aConstructor, UniqueAnyPtr &&aDefaultResource=nullptr)
Register a constructor for a resource type.