mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-04-21 00:25:44 +00:00
28 lines
921 B
C++
28 lines
921 B
C++
#pragma once
|
|
#include <unordered_map>
|
|
#include <string>
|
|
#include <vector>
|
|
|
|
#include "Utils/ClassUtils.h"
|
|
#include "Obj/Gdt/GdtEntry.h"
|
|
|
|
class InfoString
|
|
{
|
|
static const std::string EMPTY_VALUE;
|
|
std::unordered_map<std::string, std::string> m_values;
|
|
std::vector<std::string> m_keys_by_insertion;
|
|
|
|
public:
|
|
_NODISCARD bool HasKey(const std::string& key) const;
|
|
_NODISCARD const std::string& GetValueForKey(const std::string& key) const;
|
|
const std::string& GetValueForKey(const std::string& key, bool* foundValue) const;
|
|
void SetValueForKey(const std::string& key, std::string value);
|
|
void RemoveKey(const std::string& key);
|
|
|
|
_NODISCARD std::string ToString() const;
|
|
_NODISCARD std::string ToString(const std::string& prefix) const;
|
|
void ToGdtProperties(const std::string& prefix, GdtEntry& gdtEntry) const;
|
|
|
|
void FromString();
|
|
void FromString(const std::string& prefix);
|
|
}; |