00001 #ifndef UNITCONVERTOR_H 00002 #define UNITCONVERTOR_H 00003 00007 class UnitConvertor 00008 { 00009 public: 00010 UnitConvertor(); 00011 UnitConvertor(const double &factor, const double &offset); 00012 double operator()(const double &input) const ; 00013 void reset(); 00014 const bool &isValid() const ; 00015 00016 protected: 00017 double factor; 00018 double offset; 00019 bool valid; 00020 }; 00021 00025 class SqlUnitConvertor : public UnitConvertor 00026 { 00027 public: 00028 SqlUnitConvertor(const int db_unit_id_from, const int db_unit_id_to); 00029 }; 00030 00031 #endif // UNITCONVERTOR_H