add one sample for gson object serialization.

This commit is contained in:
zhengshuxin 2017-01-03 10:46:31 +08:00
parent c9db9bc30a
commit 2eb4403b88
7 changed files with 20 additions and 8 deletions

View File

@ -34,17 +34,21 @@ struct user
male = v;
return *this;
}
const char* get_name(void)
{
return name.c_str();
}
/*
const char* get_name(void) const
{
return name.c_str();
}
*/
bool is_male(void) const
{
return male;
}
int get_age(void) const
{
return age;
}
//Gson@skip
acl::string nick;

BIN
dist/master/libexec/linux64/acl_master vendored Normal file

Binary file not shown.

View File

@ -1,6 +1,9 @@
修改历史列表:
-----------------------------------------------------------------------
461) 2017.1.3
461.1) feature: gson 对象序列化模块增加成员函数限定符的支持
460) 2016.12.31
460.1) bugfix: gson 对象序列化模块修改了 std::map 第二个参数不能为类对象的问题
460.2) feature: gson 对象序列化模块支持 struct 对象的成员函数及非序列化成员变量

View File

@ -0,0 +1,2 @@
include ../Makefile.in
PROG = test

View File

@ -34,7 +34,7 @@ protected:
private:
};
int main(int argc, char* argv[])
int main(void)
{
test_snprintf();
#ifdef WIN32

View File

@ -6,6 +6,6 @@
#include <iostream>
#include <tchar.h>
//#include <tchar.h>
// TODO: 在此处引用程序要求的附加头文件

View File

@ -0,0 +1,3 @@
#!/bin/sh
valgrind --tool=memcheck --leak-check=yes -v ./test