简单的序列化反序列化工具,用于以二进制形式传递任意数据结构.详见代码.
bool add_value(const std::string &key, const T &value);
T get_value(const std::string &key, bool *isOK = nullptr) const;
bool remove(const std::string &key);
std::unordered_set<std::string> keys() const;
SIZE_TYPE count() const;
SData::type type_info(const std::string &key) const;
static std::string type_to_string(SData::type type);
void to_buffer(SIZE_TYPE &length, unsigned char *&buffer) const;
static SData from_buffer(SIZE_TYPE length, unsigned char *buffer);