mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-04-19 15:52:53 +00:00
23 lines
627 B
C++
23 lines
627 B
C++
#pragma once
|
|
|
|
#include "Asset/IZoneAssetLoaderState.h"
|
|
#include "TechsetDefinition.h"
|
|
#include "Utils/ClassUtils.h"
|
|
|
|
#include <memory>
|
|
#include <string>
|
|
#include <unordered_map>
|
|
|
|
namespace techset
|
|
{
|
|
class TechsetDefinitionCache final : public IZoneAssetLoaderState
|
|
{
|
|
public:
|
|
_NODISCARD TechsetDefinition* GetCachedTechsetDefinition(const std::string& techsetName) const;
|
|
void AddTechsetDefinitionToCache(std::string name, std::unique_ptr<TechsetDefinition> definition);
|
|
|
|
private:
|
|
std::unordered_map<std::string, std::unique_ptr<TechsetDefinition>> m_cache;
|
|
};
|
|
} // namespace techset
|