X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/76fb825a64343da7a8aa9b16c5dbcab709504832..474a9dc37f5085103d11cff3afa8642538f06a10:/stglibs/srvconf.lib/parsers/get_users.cpp?ds=sidebyside diff --git a/stglibs/srvconf.lib/parsers/get_users.cpp b/stglibs/srvconf.lib/parsers/get_users.cpp index ecc2917c..6c385b0c 100644 --- a/stglibs/srvconf.lib/parsers/get_users.cpp +++ b/stglibs/srvconf.lib/parsers/get_users.cpp @@ -19,21 +19,19 @@ * Author : Maxim Mamontov */ -#include "parser_get_users.h" - -#include +#include "get_users.h" #include using namespace STG; -GET_USERS::PARSER::PARSER() - : callback(NULL), - data(NULL), +GET_USERS::PARSER::PARSER(CALLBACK f, void * d) + : callback(f), + data(d), + userParser(&GET_USERS::PARSER::UserCallback, this), depth(0), parsingAnswer(false) { - userParser.SetCallback(&GET_USERS::PARSER::UserCallback, this); } //----------------------------------------------------------------------------- int GET_USERS::PARSER::ParseStart(const char * el, const char ** attr) @@ -69,12 +67,6 @@ void GET_USERS::PARSER::AddUser(const GET_USER::INFO & userInfo) info.push_back(userInfo); } //----------------------------------------------------------------------------- -void GET_USERS::PARSER::SetCallback(CALLBACK f, void * d) -{ -callback = f; -data = d; -} -//----------------------------------------------------------------------------- void GET_USERS::PARSER::UserCallback(bool result, const std::string & error, const GET_USER::INFO & info, void * data) { GET_USERS::PARSER * parser = static_cast(data);