iw4x-client/src/Utils/InfoString.hpp
2016-07-11 17:14:58 +02:00

26 lines
544 B
C++

#define ARR_SIZE(x) (sizeof(x) / sizeof(x[0]))
namespace Utils
{
class InfoString
{
public:
InfoString() {};
InfoString(std::string buffer) : InfoString() { this->Parse(buffer); };
InfoString(const InfoString &obj) : KeyValuePairs(obj.KeyValuePairs) {};
void Set(std::string key, std::string value);
std::string Get(std::string key);
std::string Build();
void Dump();
json11::Json to_json();
private:
std::map<std::string, std::string> KeyValuePairs;
void Parse(std::string buffer);
};
}