Public Member Functions | Static Public Member Functions | Protected Attributes

UnitOfMeasure Class Reference

Unit of Measure. More...

Inheritance diagram for UnitOfMeasure:
NamedObject CallBacker

List of all members.

Public Member Functions

 UnitOfMeasure ()
 UnitOfMeasure (const char *n, const char *s, double f, PropertyRef::StdType t=PropertyRef::Other)
 UnitOfMeasure (const UnitOfMeasure &uom)
UnitOfMeasureoperator= (const UnitOfMeasure &)
const char * symbol () const
PropertyRef::StdType propType () const
const LinScalerscaler () const
void setSymbol (const char *s)
void setScaler (const LinScaler &s)
void setPropType (PropertyRef::StdType t)
template<class T >
getSIValue (T inp) const
template<class T >
getUserValueFromSI (T inp) const
template<class T >
internalValue (T inp) const
template<class T >
userValue (T inp) const
Repos::Source source () const
void setSource (Repos::Source s)

Static Public Member Functions

static const UnitOfMeasuregetGuessed (const char *)
static const UnitOfMeasuresurveyDefZUnit ()
static const char * surveyDefZUnitAnnot (bool symbol, bool withparens)
static const UnitOfMeasuresurveyDefDepthUnit ()
static const char * surveyDefDepthUnitAnnot (bool symbol, bool withparens)
static const char * zUnitAnnot (bool time, bool symbol, bool withparens)

Protected Attributes

BufferString symbol_
LinScaler scaler_
PropertyRef::StdType proptype_
Repos::Source source_

Detailed Description

Unit of Measure.

Only linear transformations to SI units supported.

All units of measure in OpendTect are available through the UoMR() instance accessor of the singleton UnitOfMeasureRepository instance.


Constructor & Destructor Documentation

UnitOfMeasure::UnitOfMeasure (  )  [inline]
UnitOfMeasure::UnitOfMeasure ( const char *  n,
const char *  s,
double  f,
PropertyRef::StdType  t = PropertyRef::Other 
) [inline]
UnitOfMeasure::UnitOfMeasure ( const UnitOfMeasure uom  )  [inline]

Member Function Documentation

static const UnitOfMeasure* UnitOfMeasure::getGuessed ( const char *   )  [static]
template<class T >
T UnitOfMeasure::getSIValue ( inp  )  const [inline]
template<class T >
T UnitOfMeasure::getUserValueFromSI ( inp  )  const [inline]
template<class T >
T UnitOfMeasure::internalValue ( inp  )  const
UnitOfMeasure& UnitOfMeasure::operator= ( const UnitOfMeasure  ) 
PropertyRef::StdType UnitOfMeasure::propType (  )  const [inline]
const LinScaler& UnitOfMeasure::scaler (  )  const [inline]
void UnitOfMeasure::setPropType ( PropertyRef::StdType  t  )  [inline]
void UnitOfMeasure::setScaler ( const LinScaler s  )  [inline]
void UnitOfMeasure::setSource ( Repos::Source  s  )  [inline]
void UnitOfMeasure::setSymbol ( const char *  s  )  [inline]
Repos::Source UnitOfMeasure::source (  )  const [inline]
static const UnitOfMeasure* UnitOfMeasure::surveyDefDepthUnit (  )  [static]
static const char* UnitOfMeasure::surveyDefDepthUnitAnnot ( bool  symbol,
bool  withparens 
) [static]
static const UnitOfMeasure* UnitOfMeasure::surveyDefZUnit (  )  [static]
static const char* UnitOfMeasure::surveyDefZUnitAnnot ( bool  symbol,
bool  withparens 
) [static]
const char* UnitOfMeasure::symbol (  )  const [inline]
template<class T >
T UnitOfMeasure::userValue ( inp  )  const
static const char* UnitOfMeasure::zUnitAnnot ( bool  time,
bool  symbol,
bool  withparens 
) [static]

Member Data Documentation