X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/a095f18afd3ffdc695ebe984a0ad0c74d61fd834..9c340da9ffa670c20c3658a2be43d35868a9f5d9:/projects/stargazer/admin_impl.h diff --git a/projects/stargazer/admin_impl.h b/projects/stargazer/admin_impl.h index 6a608e11..22ffa071 100644 --- a/projects/stargazer/admin_impl.h +++ b/projects/stargazer/admin_impl.h @@ -31,44 +31,41 @@ #ifndef ADMIN_IMPL_H #define ADMIN_IMPL_H -#include - #include "stg/admin.h" #include "stg/os_int.h" #include "stg/admin_conf.h" -#include "stg/logger.h" + +#include class ADMIN_IMPL : public ADMIN { public: ADMIN_IMPL(); - ADMIN_IMPL(const ADMIN_CONF & ac); + explicit ADMIN_IMPL(const ADMIN_CONF & ac); ADMIN_IMPL(const PRIV & priv, - const std::string & login, - const std::string & password); - virtual ~ADMIN_IMPL() {}; + const std::string & login, + const std::string & password); + virtual ~ADMIN_IMPL() {} - ADMIN_IMPL & operator=(const ADMIN_IMPL &); ADMIN_IMPL & operator=(const ADMIN_CONF &); bool operator==(const ADMIN_IMPL & rhs) const; bool operator!=(const ADMIN_IMPL & rhs) const; bool operator<(const ADMIN_IMPL & rhs) const; bool operator<=(const ADMIN_IMPL & rhs) const; - const std::string & GetPassword() const { return conf.password; }; - const std::string & GetLogin() const { return conf.login; }; - PRIV const * GetPriv() const { return &conf.priv; }; - uint16_t GetPrivAsInt() const { return conf.priv.ToInt(); }; - const ADMIN_CONF & GetConf() const { return conf; }; + const std::string & GetPassword() const { return conf.password; } + const std::string & GetLogin() const { return conf.login; } + PRIV const * GetPriv() const { return &conf.priv; } + uint32_t GetPrivAsInt() const { return conf.priv.ToInt(); } + const ADMIN_CONF & GetConf() const { return conf; } void Print() const; - uint32_t GetIP() const { return ip; }; + uint32_t GetIP() const { return ip; } std::string GetIPStr() const; - void SetIP(uint32_t ip) { ADMIN_IMPL::ip = ip; }; + void SetIP(uint32_t v) { ip = v; } const std::string GetLogStr() const; private: ADMIN_CONF conf; uint32_t ip; - STG_LOGGER & WriteServLog; }; #endif