Go to the documentation of this file.
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 =
"");
217 #endif // __TERRALIB_COMMON_INTERNAL_UNITOFMEASURE_H
const std::string & getDescription() const
Returns the unit of measure description.
const std::string & getSymbol() const
Returns the unit of measure symbol.
~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.
boost::shared_ptr< UnitOfMeasure > UnitOfMeasurePtr
unsigned int getId() const
Returns the unit of measure identification.
#define TECOMMONEXPORT
You can use this macro in order to export/import classes and functions from this module.
MeasureType getType() const
Returns the unit of measure type.
MeasureType
Defines the possible types of unit of measurements.
std::string m_symbol
Unit symbol.
bool isBaseUnit() const
Returns true if this is a base unit; otherwise returns false.
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.
unsigned int m_id
Unique identification number for a unit of measure.
A class to represent units of measure.
double getConversionValue() const
Returns a multiplicative value to convert the unit to its base unit.
Enumerations of XML module.
MeasureType m_type
Unit type of measure.
void setDescription(const std::string &description)
Sets the unit of measure description.
std::string m_description
unit of measure description.
const unsigned int getBaseUnitId() const
Returns the base unit id from which this unit derives of.
const std::string & getName() const
Returns the unit of measure oficial name.
Proxy configuration file for TerraView (see terraview_config.h).
std::string m_name
unit of measure name according to SI.
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 getWKT() const
Returns the WKT description of a unit of measure.