34 #include <boost/algorithm/string/case_conv.hpp> 41 m_description(description),
48 m_name = boost::to_upper_copy(name);
53 double A,
double B,
double C ,
double D,
54 const std::string& description)
67 m_name = boost::to_upper_copy(name);
134 std::ostringstream sstr;
~UnitOfMeasure()
Destructor.
MeasureType getType() const
Returns the unit of measure type.
UnitOfMeasure(unsigned int id, const std::string &name, const std::string &symbol, MeasureType type, const std::string &description="")
Creates a new base unit of measure.
void getConversionFactors(double &A, double &B, double &C, double &D) const
Returns the conversion factors to convert the unit to its base unit.
unsigned int getId() const
Returns the unit of measure identification.
unsigned int m_baseUnitId
Unique identification number of the base unit to which a conversion operation is provided.
std::string m_symbol
Unit symbol.
const std::string & getDescription() const
Returns the unit of measure description.
const std::string & getName() const
Returns the unit of measure oficial name.
unsigned int m_id
Unique identification number for a unit of measure.
MeasureType m_type
Unit type of measure.
A class for representing a unit of measure.
void setDescription(const std::string &description)
Sets the unit of measure description.
const std::string & getSymbol() const
Returns the unit of measure symbol.
std::string m_description
unit of measure description.
MeasureType
Defines the possible types of unit of measurements.
std::string m_name
unit of measure name according to SI.
double getConversionValue() const
Returns a multiplicative value to convert the unit to its base unit.
const unsigned int getBaseUnitId() const
Returns the base unit id from which this unit derives of.
bool isBaseUnit() const
Returns true if this is a base unit; otherwise returns false.
std::string getWKT() const
Returns the WKT description of a unit of measure.