X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/0907aa4037b12b6b88ee24495d4577a064d4f8db..80aca6d78d4ff5d514216fe96c44e2ee75c4e933:/projects/stargazer/plugins/configuration/sgconfig/parser_admins.h?ds=sidebyside diff --git a/projects/stargazer/plugins/configuration/sgconfig/parser_admins.h b/projects/stargazer/plugins/configuration/sgconfig/parser_admins.h index 423ac3cd..4a6924bd 100644 --- a/projects/stargazer/plugins/configuration/sgconfig/parser_admins.h +++ b/projects/stargazer/plugins/configuration/sgconfig/parser_admins.h @@ -24,9 +24,9 @@ #include "parser.h" #include "stg/common.h" -#include "stg/optional.h" #include +#include namespace STG { @@ -44,7 +44,7 @@ class GET_ADMINS: public BASE_PARSER { public: explicit FACTORY(const Admins & admins) : m_admins(admins) {} - virtual BASE_PARSER * create(const Admin & admin) { return new GET_ADMINS(admin, m_admins); } + BASE_PARSER * create(const Admin & admin) override { return new GET_ADMINS(admin, m_admins); } static void Register(REGISTRY & registry, const Admins & admins) { registry[ToLower(tag)] = new FACTORY(admins); } private: @@ -59,7 +59,7 @@ class GET_ADMINS: public BASE_PARSER private: const Admins & m_admins; - void CreateAnswer(); + void CreateAnswer() override; }; class ADD_ADMIN: public BASE_PARSER @@ -69,7 +69,7 @@ class ADD_ADMIN: public BASE_PARSER { public: explicit FACTORY(Admins & admins) : m_admins(admins) {} - virtual BASE_PARSER * create(const Admin & admin) { return new ADD_ADMIN(admin, m_admins); } + BASE_PARSER * create(const Admin & admin) override { return new ADD_ADMIN(admin, m_admins); } static void Register(REGISTRY & registry, Admins & admins) { registry[ToLower(tag)] = new FACTORY(admins); } private: @@ -80,13 +80,13 @@ class ADD_ADMIN: public BASE_PARSER ADD_ADMIN(const Admin & admin, Admins & admins) : BASE_PARSER(admin, tag), m_admins(admins) {} - int Start(void * data, const char * el, const char ** attr); + int Start(void * data, const char * el, const char ** attr) override; private: std::string m_admin; Admins & m_admins; - void CreateAnswer(); + void CreateAnswer() override; }; class DEL_ADMIN: public BASE_PARSER @@ -96,7 +96,7 @@ class DEL_ADMIN: public BASE_PARSER { public: explicit FACTORY(Admins & admins) : m_admins(admins) {} - virtual BASE_PARSER * create(const Admin & admin) { return new DEL_ADMIN(admin, m_admins); } + BASE_PARSER * create(const Admin & admin) override { return new DEL_ADMIN(admin, m_admins); } static void Register(REGISTRY & registry, Admins & admins) { registry[ToLower(tag)] = new FACTORY(admins); } private: @@ -107,13 +107,13 @@ class DEL_ADMIN: public BASE_PARSER DEL_ADMIN(const Admin & admin, Admins & admins) : BASE_PARSER(admin, tag), m_admins(admins) {} - int Start(void * data, const char * el, const char ** attr); + int Start(void * data, const char * el, const char ** attr) override; private: std::string m_admin; Admins & m_admins; - void CreateAnswer(); + void CreateAnswer() override; }; class CHG_ADMIN: public BASE_PARSER @@ -123,7 +123,7 @@ class CHG_ADMIN: public BASE_PARSER { public: explicit FACTORY(Admins & admins) : m_admins(admins) {} - virtual BASE_PARSER * create(const Admin & admin) { return new CHG_ADMIN(admin, m_admins); } + BASE_PARSER * create(const Admin & admin) override { return new CHG_ADMIN(admin, m_admins); } static void Register(REGISTRY & registry, Admins & admins) { registry[ToLower(tag)] = new FACTORY(admins); } private: @@ -134,15 +134,15 @@ class CHG_ADMIN: public BASE_PARSER CHG_ADMIN(const Admin & admin, Admins & admins) : BASE_PARSER(admin, tag), m_admins(admins) {} - int Start(void * data, const char * el, const char ** attr); + int Start(void * data, const char * el, const char ** attr) override; private: std::string login; - Optional password; - Optional privAsString; + std::optional password; + std::optional privAsString; Admins & m_admins; - void CreateAnswer(); + void CreateAnswer() override; }; } // namespace PARSER