iw4x-client/src/Utils/InfoString.hpp

26 lines
513 B
C++
Raw Normal View History

2017-01-20 08:36:52 -05:00
#pragma once
2017-01-19 16:23:59 -05:00
namespace Utils
{
class InfoString
{
public:
InfoString() {};
2018-12-17 08:29:18 -05:00
InfoString(const std::string& buffer) : InfoString() { this->parse(buffer); };
2017-01-19 16:23:59 -05:00
InfoString(const InfoString &obj) : keyValuePairs(obj.keyValuePairs) {};
2018-12-17 08:29:18 -05:00
void set(const std::string& key, const std::string& value);
std::string get(const std::string& key);
2017-01-19 16:23:59 -05:00
std::string build();
void dump();
json11::Json to_json();
private:
std::map<std::string, std::string> keyValuePairs;
void parse(std::string buffer);
};
}