+ explicit TotalTariffsSensor(const STG::Tariffs & t) : tariffs(t) {}
+
+ bool GetValue(ObjectSyntax_t * objectSyntax) const override
+ {
+ ValueToOS(tariffs.Count(), objectSyntax);
+ return true;
+ }
+
+#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) {}
+
+ bool GetValue(ObjectSyntax_t * objectSyntax) const override
+ {
+ ValueToOS(admins.count(), objectSyntax);
+ return true;
+ }
+
+#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) {}
+
+ bool GetValue(ObjectSyntax_t * objectSyntax) const override
+ {
+ ValueToOS(services.Count(), objectSyntax);
+ return true;
+ }
+
+#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) {}