mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-09-04 07:47:25 +00:00
chore: make keyvaluepairscompiler use a zonestate
This commit is contained in:
28
src/ObjCompiling/KeyValuePairs/KeyValuePairsCreator.h
Normal file
28
src/ObjCompiling/KeyValuePairs/KeyValuePairsCreator.h
Normal file
@@ -0,0 +1,28 @@
|
||||
#pragma once
|
||||
|
||||
#include "Asset/IZoneAssetCreationState.h"
|
||||
#include "Zone/Definition/ZoneDefinition.h"
|
||||
|
||||
#include <string>
|
||||
|
||||
class CommonKeyValuePair
|
||||
{
|
||||
public:
|
||||
CommonKeyValuePair(std::string keyStr, std::string value);
|
||||
CommonKeyValuePair(unsigned keyHash, std::string value);
|
||||
|
||||
std::optional<std::string> m_key_str;
|
||||
std::optional<unsigned> m_key_hash;
|
||||
std::string m_value;
|
||||
};
|
||||
|
||||
class KeyValuePairsCreator : public IZoneAssetCreationState
|
||||
{
|
||||
public:
|
||||
void AddKeyValuePair(CommonKeyValuePair keyValuePair);
|
||||
void Finalize(const ZoneDefinition& zoneDefinition);
|
||||
std::vector<CommonKeyValuePair> GetFinalKeyValuePairs();
|
||||
|
||||
private:
|
||||
std::vector<CommonKeyValuePair> m_key_value_pairs;
|
||||
};
|
Reference in New Issue
Block a user