From 1beda872e0156fa9ea05363227fd2980f0c3dc02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?shuxin=20=E3=80=80=E3=80=80zheng?= Date: Thu, 6 Aug 2020 17:46:26 +0800 Subject: [PATCH] fixed demo compiling error --- app/gson/demo/struct.gson.cpp | 1 - app/gson/demo/struct.h | 55 +---------- app/gson/demo/struct.stub | 177 ++++++++++++---------------------- 3 files changed, 63 insertions(+), 170 deletions(-) diff --git a/app/gson/demo/struct.gson.cpp b/app/gson/demo/struct.gson.cpp index b58e88c70..c6195d6b4 100644 --- a/app/gson/demo/struct.gson.cpp +++ b/app/gson/demo/struct.gson.cpp @@ -1,7 +1,6 @@ #include "stdafx.h" #include "struct.h" #include "struct.gson.h" -#include "acl_cpp/serialize/gson_helper.ipp" namespace acl { acl::json_node& gson(acl::json &$json, const base &$obj) diff --git a/app/gson/demo/struct.h b/app/gson/demo/struct.h index 7ffbe1685..ad4e186a9 100644 --- a/app/gson/demo/struct.h +++ b/app/gson/demo/struct.h @@ -1,4 +1,4 @@ -#pragma once#pragma once +#pragma once #include struct base @@ -60,56 +60,3 @@ struct world : list1 int me; }; } - - -struct base -{ - std::string string ; - //Gson@optional - std::string *string_ptr ; - int a ; - int *a_ptr ; - unsigned int b ; - unsigned int *b_ptr; - int64_t c ; - int64_t *c_ptr ; - unsigned long d; - unsigned long *d_ptr ; - unsigned long long e ; - unsigned long long *e_ptr; - long f ; - long *f_ptr ; - long long g; - - long long *g_ptr ; - acl::string acl_string; - acl::string *acl_string_ptr; - - float h; - float *h_ptr; - double i; - double *i_ptr; -}; - -struct list1 -{ - base b; - base *b_ptr; - std::list bases_list; - std::list *bases_list_ptr; - //Gson@optional - std::list *bases_ptr_list_ptr; - std::map base_map; - std::map string_map; - std::map > base_list_map; - std::vector vector_string; - std::vector > vector_list_base; -}; - -namespace hello -{ -struct world : list1 -{ -int me; -}; -} diff --git a/app/gson/demo/struct.stub b/app/gson/demo/struct.stub index 01270dd61..ad4e186a9 100644 --- a/app/gson/demo/struct.stub +++ b/app/gson/demo/struct.stub @@ -1,115 +1,62 @@ -#pragma once#pragma once -#include - -struct base -{ - std::string string ; - //Gson@optional - std::string *string_ptr ; - int a ; - int *a_ptr ; - unsigned int b ; - unsigned int *b_ptr; - int64_t c ; - int64_t *c_ptr ; - unsigned long d; - unsigned long *d_ptr ; - unsigned long long e ; - unsigned long long *e_ptr; - long f ; - long *f_ptr ; - long long g; - - long long *g_ptr ; - acl::string acl_string; - acl::string *acl_string_ptr; - - float h; - float *h_ptr; - double i; - double *i_ptr; -}; - -struct list1 -{ - base b; - base *b_ptr; - std::list bases_list; - std::list *bases_list_ptr; - //Gson@optional - std::list *bases_ptr_list_ptr; - std::vector vector_string; - std::vector > vector_list_base; - - std::map base_map; - std::map string_map; - std::map int_map; - std::map bool_map; - std::map > base_list_map; - - //set - std::set str_set_; - std::set int_set_; - std::set bool_set_; -}; - -namespace hello -{ -struct world : list1 -{ -int me; -}; -} - - -struct base -{ - std::string string ; - //Gson@optional - std::string *string_ptr ; - int a ; - int *a_ptr ; - unsigned int b ; - unsigned int *b_ptr; - int64_t c ; - int64_t *c_ptr ; - unsigned long d; - unsigned long *d_ptr ; - unsigned long long e ; - unsigned long long *e_ptr; - long f ; - long *f_ptr ; - long long g; - - long long *g_ptr ; - acl::string acl_string; - acl::string *acl_string_ptr; - - float h; - float *h_ptr; - double i; - double *i_ptr; -}; - -struct list1 -{ - base b; - base *b_ptr; - std::list bases_list; - std::list *bases_list_ptr; - //Gson@optional - std::list *bases_ptr_list_ptr; - std::map base_map; - std::map string_map; - std::map > base_list_map; - std::vector vector_string; - std::vector > vector_list_base; -}; - -namespace hello -{ -struct world : list1 -{ -int me; -}; -} +#pragma once +#include + +struct base +{ + std::string string ; + //Gson@optional + std::string *string_ptr ; + int a ; + int *a_ptr ; + unsigned int b ; + unsigned int *b_ptr; + int64_t c ; + int64_t *c_ptr ; + unsigned long d; + unsigned long *d_ptr ; + unsigned long long e ; + unsigned long long *e_ptr; + long f ; + long *f_ptr ; + long long g; + + long long *g_ptr ; + acl::string acl_string; + acl::string *acl_string_ptr; + + float h; + float *h_ptr; + double i; + double *i_ptr; +}; + +struct list1 +{ + base b; + base *b_ptr; + std::list bases_list; + std::list *bases_list_ptr; + //Gson@optional + std::list *bases_ptr_list_ptr; + std::vector vector_string; + std::vector > vector_list_base; + + std::map base_map; + std::map string_map; + std::map int_map; + std::map bool_map; + std::map > base_list_map; + + //set + std::set str_set_; + std::set int_set_; + std::set bool_set_; +}; + +namespace hello +{ +struct world : list1 +{ +int me; +}; +}