+ 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) {}
+
+ bool GetValue(ObjectSyntax_t * objectSyntax) const override
+ {
+ ValueToOS(corporations.Count(), objectSyntax);
+ return true;
+ }
+
+#ifdef DEBUG
+ std::string ToString() const override
+ { std::string res; std::to_string(corporations.Count(), res); return res; }
+#endif
+
+ private:
+ const STG::Corporations & corporations;
+};
+
+class TotalRulesSensor : public Sensor {
+ public:
+ explicit TotalRulesSensor(const STG::TraffCounter & t) : traffcounter(t) {}
+
+ bool GetValue(ObjectSyntax_t * objectSyntax) const override
+ {
+ ValueToOS(traffcounter.rulesCount(), objectSyntax);
+ return true;
+ }
+
+#ifdef DEBUG
+ std::string ToString() const override
+ { std::string res; std::to_string(traffcounter.rulesCount(), res); return res; }
+#endif
+
+ private:
+ const STG::TraffCounter & traffcounter;