X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/e9ae1f101b5418c0ba2e6c9d86b23c12f0140982..719325d30f713accc04c83c6951ff2a6bfcf33e0:/tests/testservices.h?ds=sidebyside diff --git a/tests/testservices.h b/tests/testservices.h index ace3c863..6282c660 100644 --- a/tests/testservices.h +++ b/tests/testservices.h @@ -1,26 +1,23 @@ -#ifndef __TEST_SERVICES__ -#define __TEST_SERVICES__ +#pragma once #include "stg/services.h" -class TEST_SERVICES : public STG::Services +class TestServices : public STG::Services { public: - virtual int Add(const STG::ServiceConf & /*service*/, const STG::Admin * /*admin*/) { return 0; } - virtual int Del(const std::string & /*name*/, const STG::Admin * /*admin*/) { return 0; } - virtual int Change(const STG::ServiceConf & /*service*/, const STG::Admin * /*admin*/) { return 0; } - virtual bool Find(const std::string & /*name*/, STG::ServiceConf * /*service*/) const { return false; } - virtual bool Find(const std::string & /*name*/, STG::ServiceConfOpt * /*service*/) const { return false; } - virtual bool Exists(const std::string & /*name*/) const { return false; } - virtual const std::string & GetStrError() const { return m_errorStr; } - virtual size_t Count() const { return 0; } + int Add(const STG::ServiceConf& /*service*/, const STG::Admin* /*admin*/) override { return 0; } + int Del(const std::string& /*name*/, const STG::Admin* /*admin*/) override { return 0; } + int Change(const STG::ServiceConf& /*service*/, const STG::Admin* /*admin*/) override { return 0; } + bool Find(const std::string& /*name*/, STG::ServiceConf* /*service*/) const override { return false; } + bool Find(const std::string& /*name*/, STG::ServiceConfOpt* /*service*/) const override { return false; } + bool Exists(const std::string& /*name*/) const override { return false; } + const std::string& GetStrError() const override { return m_errorStr; } + size_t Count() const override { return 0; } - virtual int OpenSearch() const { return 0; } - virtual int SearchNext(int, STG::ServiceConf * /*service*/) const { return 0; } - virtual int CloseSearch(int) const { return 0; } + int OpenSearch() const override { return 0; } + int SearchNext(int /*handle*/, STG::ServiceConf* /*service*/) const override { return 0; } + int CloseSearch(int /*handle*/) const override { return 0; } private: std::string m_errorStr; }; - -#endif