#include "sensors.h"
+namespace STG
+{
+struct Tariffs;
+struct Users;
+}
+
class TableSensor {
public:
- TableSensor(const std::string & p) : prefix(p) {}
+ explicit TableSensor(const std::string & p) : prefix(p) {}
virtual ~TableSensor() {}
const std::string & GetPrefix() const { return prefix; }
class TariffUsersTable : public TableSensor {
public:
TariffUsersTable(const std::string & p,
- USERS & u)
+ STG::Tariffs & t,
+ STG::Users & u)
: TableSensor(p),
+ tariffs(t),
users(u)
{}
- virtual ~TariffUsersTable() {}
- void UpdateSensors(Sensors & sensors) const;
+ void UpdateSensors(Sensors & sensors) const override;
private:
- USERS & users;
+ STG::Tariffs & tariffs;
+ STG::Users & users;
};
typedef std::map<std::string, TableSensor *> Tables;