class Sensor {
public:
+ virtual ~Sensor() {}
virtual bool GetValue(ObjectSyntax_t * objectSyntax) const = 0;
#ifdef DEBUG
virtual std::string ToString() const = 0;
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 {
T value;
};
+#ifdef DEBUG
template <>
inline
std::string ConstSensor<std::string>::ToString() const
{
return value;
}
+#endif
#endif