X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/6f7160dd027c8ce7e2760aa369768ba39ab80181..793149f04ce52bf75dc4efb7b83a3f8ed30d1fff:/projects/stargazer/admin_impl.cpp diff --git a/projects/stargazer/admin_impl.cpp b/projects/stargazer/admin_impl.cpp index d14bfa7d..3d2c4895 100644 --- a/projects/stargazer/admin_impl.cpp +++ b/projects/stargazer/admin_impl.cpp @@ -29,18 +29,20 @@ */ #include "admin_impl.h" -#include "common.h" +#include "stg/common.h" //----------------------------------------------------------------------------- ADMIN_IMPL::ADMIN_IMPL() - : conf(), + : ADMIN(), + conf(), ip(0), WriteServLog(GetStgLogger()) { } //----------------------------------------------------------------------------- ADMIN_IMPL::ADMIN_IMPL(const ADMIN_CONF & ac) - : conf(ac), + : ADMIN(), + conf(ac), ip(0), WriteServLog(GetStgLogger()) { @@ -49,46 +51,47 @@ ADMIN_IMPL::ADMIN_IMPL(const ADMIN_CONF & ac) ADMIN_IMPL::ADMIN_IMPL(const PRIV & priv, const std::string & login, const std::string & password) - : conf(priv, login, password), + : ADMIN(), + conf(priv, login, password), ip(0), WriteServLog(GetStgLogger()) { } //----------------------------------------------------------------------------- -ADMIN & ADMIN_IMPL::operator=(const ADMIN & adm) +ADMIN_IMPL & ADMIN_IMPL::operator=(const ADMIN_IMPL & adm) { if (&adm == this) return *this; -conf = adm.GetConf(); -ip = adm.GetIP(); +conf = adm.conf; +ip = adm.ip; return *this; } //----------------------------------------------------------------------------- -ADMIN & ADMIN_IMPL::operator=(const ADMIN_CONF & ac) +ADMIN_IMPL & ADMIN_IMPL::operator=(const ADMIN_CONF & ac) { conf = ac; return *this; } //----------------------------------------------------------------------------- -bool ADMIN_IMPL::operator==(const ADMIN & rhs) const +bool ADMIN_IMPL::operator==(const ADMIN_IMPL & rhs) const { -return conf.login == rhs.GetLogin(); +return conf.login == rhs.conf.login; } //----------------------------------------------------------------------------- -bool ADMIN_IMPL::operator!=(const ADMIN & rhs) const +bool ADMIN_IMPL::operator!=(const ADMIN_IMPL & rhs) const { -return conf.login != rhs.GetLogin(); +return conf.login != rhs.conf.login; } //----------------------------------------------------------------------------- -bool ADMIN_IMPL::operator<(const ADMIN & rhs) const +bool ADMIN_IMPL::operator<(const ADMIN_IMPL & rhs) const { -return conf.login < rhs.GetLogin(); +return conf.login < rhs.conf.login; } //----------------------------------------------------------------------------- -bool ADMIN_IMPL::operator<=(const ADMIN & rhs) const +bool ADMIN_IMPL::operator<=(const ADMIN_IMPL & rhs) const { -return conf.login <= rhs.GetLogin(); +return conf.login <= rhs.conf.login; } //----------------------------------------------------------------------------- std::string ADMIN_IMPL::GetIPStr() const