26 #ifndef __TERRALIB_COMMON_INTERNAL_UNITOFMEASURE_H
27 #define __TERRALIB_COMMON_INTERNAL_UNITOFMEASURE_H
38 #include <boost/shared_ptr.hpp>
87 UnitOfMeasure(
unsigned int id,
const std::string& name,
const std::string& symbol,
88 MeasureType type,
const std::string& description =
"");
106 UnitOfMeasure(
unsigned int id,
const std::string& name,
const std::string& symbol,
108 double A,
double B = 0.0,
double C = 0.0,
double D = 1.0,
109 const std::string& description =
"");
A class to represent units of measure.
std::string m_description
unit of measure description.
std::string getWKT() const
Returns the WKT description of a unit of measure.
unsigned int m_baseUnitId
Unique identification number of the base unit to which a conversion operation is provided.
void getConversionFactors(double &A, double &B, double &C, double &D) const
Returns the conversion factors to convert the unit to its base unit.
bool isBaseUnit() const
Returns true if this is a base unit; otherwise returns false.
~UnitOfMeasure()
Destructor.
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.
MeasureType m_type
Unit type of measure.
const std::string & getName() const
Returns the unit of measure oficial name.
double getConversionValue() const
Returns a multiplicative value to convert the unit to its base unit.
UnitOfMeasure(unsigned int id, const std::string &name, const std::string &symbol, MeasureType type, unsigned int baseUnitId, double A, double B=0.0, double C=0.0, double D=1.0, const std::string &description="")
Creates a new derived unit of measure.
std::string m_name
unit of measure name according to SI.
const std::string & getDescription() const
Returns the unit of measure description.
void setDescription(const std::string &description)
Sets the unit of measure description.
const unsigned int getBaseUnitId() const
Returns the base unit id from which this unit derives of.
unsigned int getId() const
Returns the unit of measure identification.
const std::string & getSymbol() const
Returns the unit of measure symbol.
MeasureType getType() const
Returns the unit of measure type.
std::string m_symbol
Unit symbol.
unsigned int m_id
Unique identification number for a unit of measure.
MeasureType
Defines the possible types of unit of measurements.
boost::shared_ptr< UnitOfMeasure > UnitOfMeasurePtr
#define TECOMMONEXPORT
You can use this macro in order to export/import classes and functions from this module.
Proxy configuration file for TerraView (see terraview_config.h).
Enumerations of XML module.