ngl_server 1.0
基于 Actor 模型的 C++ 服务器框架
ngl::xml_serialize< ATTR, T > Struct Template Reference

XML序列化模板 More...

#include <xml_serialize.h>

Static Public Member Functions

static bool push (tinyxml2::XMLElement *aele, const char *akey, const T &adata)
 将数据写入XML
static bool pop (tinyxml2::XMLElement *aele, const char *akey, T &adata)
 从XML读取数据

Detailed Description

template<bool ATTR, typename T>
struct ngl::xml_serialize< ATTR, T >

XML序列化模板

Template Parameters
ATTR是否为属性模式
T数据类型

提供XML数据的序列化和反序列化功能。 针对基础类型、容器类型和自定义类型提供特化实现。

Member Function Documentation

◆ pop()

template<bool ATTR, typename T>
bool ngl::xml_serialize< ATTR, T >::pop ( tinyxml2::XMLElement * aele,
const char * akey,
T & adata )
static

从XML读取数据

Parameters
aeleXML元素
akey键名
adata输出数据
Returns
读取成功返回true

◆ push()

template<bool ATTR, typename T>
bool ngl::xml_serialize< ATTR, T >::push ( tinyxml2::XMLElement * aele,
const char * akey,
const T & adata )
static

将数据写入XML

Parameters
aeleXML元素
akey键名
adata数据
Returns
写入成功返回true

The documentation for this struct was generated from the following file: