+class TotalRulesSensor : public Sensor {
+ public:
+ explicit TotalRulesSensor(const TRAFFCOUNTER & t) : traffcounter(t) {}
+ virtual ~TotalRulesSensor() {}
+
+ bool GetValue(ObjectSyntax_t * objectSyntax) const
+ {
+ ValueToOS(traffcounter.RulesCount(), objectSyntax);
+ return true;
+ }
+
+#ifdef DEBUG
+ std::string ToString() const
+ { std::string res; x2str(traffcounter.RulesCount(), res); return res; }
+#endif
+
+ private:
+ const TRAFFCOUNTER & traffcounter;
+};
+