Added client to Zone.Get.Initial.Entity.Positions

Added type field to Zone.Get.Initial.Entity.Positions
Added method Zone.Move.Entity, currently in test mode
Made modifications to explode function in web_interface_utils.h
This commit is contained in:
Akkadius
2014-08-07 20:13:37 -05:00
parent c6d8b7e337
commit 34913c2046
8 changed files with 98 additions and 9 deletions
+4 -4
View File
@@ -29,7 +29,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
using namespace rapidjson;
using namespace std;
std::vector<std::string> explode(std::string const & s, char delim)
std::vector<std::string> explode_string(std::string const & s, char delim)
{
std::vector<std::string> result;
std::istringstream iss(s);
@@ -48,10 +48,10 @@ std::string MakeJSON(std::string json)
Writer<StringBuffer> writer(s);
writer.StartObject();
auto arg_c = explode(json, ',');
auto arg_c = explode_string(json, ',');
if (arg_c.size() == 0)
{
auto arg_v = explode(json, ':');
auto arg_v = explode_string(json, ':');
if (arg_v.size() > 0)
{
for (int j = 0; j < arg_v.size(); j++)
@@ -64,7 +64,7 @@ std::string MakeJSON(std::string json)
{
for (int i = 0; i < arg_c.size(); i++)
{
auto arg_v = explode(arg_c[i], ':');
auto arg_v = explode_string(arg_c[i], ':');
for (int j = 0; j < arg_v.size(); j++)
{
writer.String(arg_v[j].c_str());
+1
View File
@@ -26,6 +26,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#include <vector>
#include <utility>
std::vector<std::string> explode_string(std::string const & s, char delim);
std::string MakeJSON(std::string json);
#endif