8#include <unordered_map>
51 inline ResourceInfo() :
52 resource(
nullptr), name()
56 std::vector<ResourceInfo> m_resourceInfos;
57 std::queue<const ISdlResource*> m_queuedResources;
58 std::unordered_map<const ISdlResource*, std::size_t> m_resourceToInfoIndex;
60 void calcDispatchOrderFromTopologicalSort();
61 std::optional<std::size_t> getResourceInfoIdx(
const ISdlResource* resource)
const;
Interface for all SDL resource.
Definition ISdlResource.h:22
Resolves dependency between SDL resources and provides a valid initialization order....
Definition SdlDependencyResolver.h:21
SdlDependencyResolver()
Definition SdlDependencyResolver.cpp:15
std::string_view getResourceName(const ISdlResource *resource) const
Get resource name by resource pointer. Only valid for the resources in the last analyze() call....
Definition SdlDependencyResolver.cpp:74
void analyze(TSpanView< const ISdlResource * > resources, TSpanView< std::string > resourceNames={})
Submit resources and start to resolve their dependencies. The containers for input do not need to be ...
Definition SdlDependencyResolver.cpp:21
const ISdlResource * next()
Get a resource from the analyzed scene with a valid dependency ordering.
Definition SdlDependencyResolver.cpp:62
The root for all renderer implementations.
Definition EEngineProject.h:6
std::span< const T, EXTENT > TSpanView
Same as TSpan, except that the objects are const-qualified. Note that for pointer types,...
Definition TSpan.h:19