00001
00002
00003
00004
00005
00006
00007 #ifndef CONVERTER_H
00008 #define CONVERTER_H
00009
00010 #include <cmath>
00011 #include <map>
00012 #include <string>
00013
00019 class Converter
00020 {
00021 public:
00023 double getFactor(const std::string& unit1, const std::string& unit2) const;
00024
00027 friend class ConverterDataFiller;
00028
00029 private:
00033 static std::map<std::string, std::map<std::string, double> > convFactor;
00034 };
00035
00037 class ConverterDataFiller
00038 {
00039 public:
00041 ConverterDataFiller();
00042
00043 private:
00048 void setFactors(const std::string unit1,
00049 const std::string unit2,
00050 double factor);
00051 };
00052
00053 #endif