+ 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;