X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/8c11e9e35e0cd09e25f513c15dc0c4a0613aa2f0..d230cb2411b6d2d6603a930f165bbd3138831eeb:/projects/stargazer/plugins/configuration/sgconfig/parser.h diff --git a/projects/stargazer/plugins/configuration/sgconfig/parser.h b/projects/stargazer/plugins/configuration/sgconfig/parser.h index df3d7155..f854a759 100644 --- a/projects/stargazer/plugins/configuration/sgconfig/parser.h +++ b/projects/stargazer/plugins/configuration/sgconfig/parser.h @@ -7,10 +7,6 @@ #ifndef PARSER_H #define PARSER_H -#include -#include -#include - #include "stg/resetable.h" #include "stg/const.h" #include "stg/store.h" @@ -19,6 +15,9 @@ #include "stg/users.h" #include "stg/message.h" +#include +#include + class TARIFFS; class SETTINGS; @@ -33,14 +32,12 @@ public: store(NULL), settings(NULL), currAdmin(NULL), - depth(0), - answerList(NULL) + depth(0) {} virtual ~BASE_PARSER() {} virtual int ParseStart(void *data, const char *el, const char **attr) = 0; virtual int ParseEnd(void *data, const char *el) = 0; - virtual void CreateAnswer() = 0; - virtual void SetAnswerList(std::list * ansList) { answerList = ansList; } + virtual void Reset() { answer.clear(); depth = 0; } virtual void SetUsers(USERS * u) { users = u; } virtual void SetAdmins(ADMINS * a) { admins = a; } @@ -48,9 +45,9 @@ public: virtual void SetStore(STORE * s) { store = s; } virtual void SetStgSettings(const SETTINGS * s) { settings = s; } - virtual void SetCurrAdmin(ADMIN & cua) { currAdmin = &cua; } - virtual std::string & GetStrError() { return strError; } - virtual void Reset() { answerList->clear(); depth = 0; } + void SetCurrAdmin(ADMIN & cua) { currAdmin = &cua; } + const std::string & GetStrError() const { return strError; } + const std::string & GetAnswer() const { return answer; } protected: BASE_PARSER(const BASE_PARSER & rvalue); @@ -64,7 +61,7 @@ protected: const SETTINGS * settings; ADMIN * currAdmin; int depth; - std::list * answerList; + std::string answer; }; //----------------------------------------------------------------------------- class PARSER_GET_ADMINS: public BASE_PARSER {