#ifndef __PALYERLOGOUT_H_ #define __PALYERLOGOUT_H_ #include #include #include #include #include using namespace std; class PlayerLogout { private: std::string URL = "/manager.do"; public: std::string cid; std::string ctype; std::string cname; public: PlayerLogout(); ~PlayerLogout(); void setURL(std::string url){ this->URL = url; } std::string getUrl(){ return this->URL; } void objectToJson(std::string& str){ rapidjson::StringBuffer strBuf; rapidjson::Writer writer(strBuf); this->objectToJson(writer); str = strBuf.GetString(); } void objectToJson(rapidjson::Writer& writer){ writer.StartObject(); writer.Key("cid"); writer.String(cid.c_str()); writer.Key("ctype"); writer.String(ctype.c_str()); writer.Key("cname"); writer.String(cname.c_str()); writer.EndObject(); } }; #endif