X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/7c744ef82350aa401c61aa6f0424866a16c2ed1a..1c529746ff07312e30e76fd933c628c658e3c77d:/include/stg/tariffs.h?ds=sidebyside diff --git a/include/stg/tariffs.h b/include/stg/tariffs.h index 515e7608..66db5f31 100644 --- a/include/stg/tariffs.h +++ b/include/stg/tariffs.h @@ -18,38 +18,41 @@ * Author : Maxim Mamontov */ -#ifndef TARIFFS_H -#define TARIFFS_H +#pragma once #include -#include +#include #include "notifer.h" -class ADMIN; -class TARIFF; -struct TARIFF_DATA; +namespace STG +{ -class TARIFFS { -public: - virtual int ReadTariffs () = 0; - virtual const TARIFF * FindByName(const std::string & name) const = 0; - virtual const TARIFF * GetNoTariff() const = 0; - virtual int Del(const std::string & name, const ADMIN * admin) = 0; - virtual int Add(const std::string & name, const ADMIN * admin) = 0; - virtual int Chg(const TARIFF_DATA & td, const ADMIN * admin) = 0; +struct Admin; +struct Tariff; +struct TariffData; - virtual void AddNotifierAdd(NOTIFIER_BASE * notifier) = 0; - virtual void DelNotifierAdd(NOTIFIER_BASE * notifier) = 0; +struct Tariffs { + virtual ~Tariffs() = default; - virtual void AddNotifierDel(NOTIFIER_BASE * notifier) = 0; - virtual void DelNotifierDel(NOTIFIER_BASE * notifier) = 0; + virtual int ReadTariffs() = 0; + virtual const Tariff* FindByName(const std::string& name) const = 0; + virtual const Tariff* GetNoTariff() const = 0; + virtual int Del(const std::string& name, const Admin* admin) = 0; + virtual int Add(const std::string& name, const Admin* admin) = 0; + virtual int Chg(const TariffData& td, const Admin* admin) = 0; - virtual void GetTariffsData(std::list * tdl) = 0; + virtual void AddNotifierAdd(NotifierBase* notifier) = 0; + virtual void DelNotifierAdd(NotifierBase* notifier) = 0; + + virtual void AddNotifierDel(NotifierBase* notifier) = 0; + virtual void DelNotifierDel(NotifierBase* notifier) = 0; + + virtual void GetTariffsData(std::vector* tdl) const = 0; virtual size_t Count() const = 0; - virtual const std::string & GetStrError() const = 0; + virtual const std::string& GetStrError() const = 0; }; -#endif +}