diff options
Diffstat (limited to 'lib/propertyinfo.hpp')
-rw-r--r-- | lib/propertyinfo.hpp | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/lib/propertyinfo.hpp b/lib/propertyinfo.hpp new file mode 100644 index 00000000..ae229a45 --- /dev/null +++ b/lib/propertyinfo.hpp @@ -0,0 +1,72 @@ +#ifndef PROPERTYINFO_H_ +#define PROPERTYINFO_H_ + +#include "abstractpropertytype.h" + +class PropertyInfo +{ +public: + + + /** PropertyInfo + * + **/ + PropertyInfo(): mUpdateFrequency(0), mIsValid(false) {} + + /** PropertyInfo + * @arg updateFrequency + * @arg zonesList + */ + PropertyInfo(uint updateFreq, Zone::ZoneList zonesList) + :mUpdateFrequency(updateFreq), mZones(zonesList), mIsValid(true) + { + + } + + + /** updateFrequency + * Maximum times per second a property is expected to update. + * + **/ + uint updateFrequency() + { + return mUpdateFrequency; + } + + /** zones + * Number of different zones supported by this property. + * + */ + Zone::ZoneList zones() + { + return mZones; + } + + /** isValid + * returns whether this PropertyInfo is valid + * + * default when you construct a PropertyInfo is false + **/ + bool isValid() + { + return mIsValid; + } + + + /** invalid() + * returns instance of PropertyInfo that isn't valid + **/ + static PropertyInfo invalid() + { + return PropertyInfo(); + } + +private: + + uint mUpdateFrequency; + Zone::ZoneList mZones; + bool mIsValid; +}; + + +#endif |