+ explicit TotalTariffsSensor(const STG::Tariffs & t) : tariffs(t) {}
+
+ void GetValue(ObjectSyntax_t * objectSyntax) const override
+ {
+ ValueToOS(tariffs.Count(), objectSyntax);
+ }
+
+#ifdef DEBUG
+ std::string ToString() const override
+ { std::string res; std::to_string(tariffs.Count(), res); return res; }
+#endif
+
+ private:
+ const STG::Tariffs & tariffs;
+};
+
+class TotalAdminsSensor : public Sensor {
+ public:
+ explicit TotalAdminsSensor(const STG::Admins & a) : admins(a) {}
+
+ void GetValue(ObjectSyntax_t * objectSyntax) const override
+ {
+ ValueToOS(admins.count(), objectSyntax);
+ }
+
+#ifdef DEBUG
+ std::string ToString() const override
+ { std::string res; std::to_string(admins.Count(), res); return res; }
+#endif
+
+ private:
+ const STG::Admins & admins;
+};
+
+class TotalServicesSensor : public Sensor {
+ public:
+ explicit TotalServicesSensor(const STG::Services & s) : services(s) {}
+
+ void GetValue(ObjectSyntax_t * objectSyntax) const override
+ {
+ ValueToOS(services.Count(), objectSyntax);
+ }
+
+#ifdef DEBUG
+ std::string ToString() const override
+ { std::string res; std::to_string(services.Count(), res); return res; }
+#endif
+
+ private:
+ const STG::Services & services;
+};
+
+class TotalCorporationsSensor : public Sensor {
+ public:
+ explicit TotalCorporationsSensor(const STG::Corporations & c) : corporations(c) {}