X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/03da774482c3c3cabfc2a92f19d737d015881f28..9d7269d8d8333fc1ff47bedcaf488142570b1258:/projects/stargazer/plugins/other/smux/sensors.h?ds=sidebyside diff --git a/projects/stargazer/plugins/other/smux/sensors.h b/projects/stargazer/plugins/other/smux/sensors.h index db3f26f3..3787611f 100644 --- a/projects/stargazer/plugins/other/smux/sensors.h +++ b/projects/stargazer/plugins/other/smux/sensors.h @@ -18,6 +18,7 @@ class Sensor { public: + virtual ~Sensor() {} virtual bool GetValue(ObjectSyntax_t * objectSyntax) const = 0; #ifdef DEBUG virtual std::string ToString() const = 0; @@ -159,7 +160,16 @@ class TariffChangeUsersSensor : public UsersSensor { private: bool UserPredicate(USER_PTR userPtr) const - { return userPtr->GetProperty().nextTariff.ConstData().empty(); } + { return !userPtr->GetProperty().nextTariff.ConstData().empty(); } +}; + +class ActiveUsersSensor : public UsersSensor { + public: + ActiveUsersSensor(USERS & u) : UsersSensor(u) {} + virtual ~ActiveUsersSensor() {} + + private: + bool UserPredicate(USER_PTR userPtr) const; }; class TotalTariffsSensor : public Sensor {