Converter Class Reference

#include <Converter.h>

Collaboration diagram for Converter:
Collaboration graph

List of all members.

Public Member Functions

double getFactor (const std::string &unit1, const std::string &unit2) const
 Return numeric factor to convert from unit1 to unit2.

Static Private Attributes

static std::map< std::string,
std::map< std::string, double > > 


class ConverterDataFiller

Detailed Description

Class to keep track of constants that convert between various units. This implements the "monostate" design pattern, which is similar to the singleton pattern, in that only one instance of the class is allowed. This allows one to define the constants in this class and provide a global point of access to it.

Member Function Documentation

double Converter::getFactor ( const std::string &  unit1,
const std::string &  unit2 
) const

Friends And Related Function Documentation

friend class ConverterDataFiller [friend]

This friend class initialises the dictionary of conversion constants

Member Data Documentation

map< string, map< string, double > > Converter::convFactor [static, private]

Dictionary std::mapping the conversion constants from one unit to another. For example, the degrees to radians conversion factor is represented as convFactor["Degrees"]["RADIANS"]

Referenced by getFactor(), and ConverterDataFiller::setFactors().

The documentation for this class was generated from the following files:
Generated on Mon Oct 4 10:39:23 2010 for WfcamSrc by  doxygen 1.6.3