OpendTect  6.6
Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
UnitOfMeasure Class Reference

Unit of Measure. More...

Inheritance diagram for UnitOfMeasure:
[legend]

Public Member Functions

 UnitOfMeasure ()
 
 UnitOfMeasure (const char *n, const char *s, double f, PropertyRef::StdType t=PropertyRef::Other)
 
 UnitOfMeasure (const UnitOfMeasure &uom)
 
const char * getLabel () const
 Symbol or name if no symbol, for IOPar I/O. More...
 
template<class T >
getSIValue (T inp) const
 
template<class T >
getUserValueFromSI (T inp) const
 
template<class T >
internalValue (T inp) const
 
bool isImperial () const
 
UnitOfMeasureoperator= (const UnitOfMeasure &)
 
PropertyRef::StdType propType () const
 
const LinScalerscaler () const
 
void setPropType (PropertyRef::StdType t)
 
void setScaler (const LinScaler &s)
 
void setSource (Repos::Source s)
 
void setSymbol (const char *s)
 
Repos::Source source () const
 
const char * symbol () const
 
template<class T >
userValue (T inp) const
 
- Public Member Functions inherited from NamedObject
 NamedObject (const char *nm=nullptr)
 
 NamedObject (const NamedObject &oth)
 
virtual ~NamedObject ()
 
virtual BufferString getName () const
 
bool getNameFromPar (const IOPar &)
 
virtual const name_typename () const
 
NamedObjectoperator= (const NamedObject &)
 
bool operator== (const NamedObject &oth) const
 
virtual void setName (const char *nm)
 
- Public Member Functions inherited from ObjectWithName
virtual ~ObjectWithName ()
 
bool hasName (const char *nm) const
 
bool hasName (const name_type &nm) const
 
void putNameInPar (IOPar &) const
 

Static Public Member Functions

static IOParcurrentDefaults ()
 
static const UnitOfMeasuregetGuessed (const char *)
 
static BufferString getUnitLbl (const UnitOfMeasure *, const char *deflbl=nullptr)
 
static void saveCurrentDefaults ()
 
static const UnitOfMeasuresurveyDefDepthStorageUnit ()
 Default depth unit in storage (m,ft) More...
 
static const UnitOfMeasuresurveyDefDepthUnit ()
 Default depth unit in displays (m,ft) More...
 
static uiString surveyDefDepthUnitAnnot (bool symbol, bool withparens)
 
static const UnitOfMeasuresurveyDefTimeUnit ()
 Default time unit in displays (ms) More...
 
static uiString surveyDefTimeUnitAnnot (bool symbol, bool withparens)
 
static const UnitOfMeasuresurveyDefVelUnit ()
 Default velocity unit in displays (m/s,ft/s) More...
 
static uiString surveyDefVelUnitAnnot (bool symbol, bool withparens)
 
static const UnitOfMeasuresurveyDefZStorageUnit ()
 Default unit in storage (s,m,ft) More...
 
static const UnitOfMeasuresurveyDefZUnit ()
 Default unit in displays (ms,m,ft) More...
 
static uiString surveyDefZUnitAnnot (bool symbol, bool withparens)
 
static uiString zUnitAnnot (bool time, bool symbol, bool withparens)
 

Protected Attributes

PropertyRef::StdType proptype_
 
LinScaler scaler_
 
Repos::Source source_
 
BufferString symbol_
 
- Protected Attributes inherited from NamedObject
BufferString name_
 

Additional Inherited Members

- Public Types inherited from ObjectWithName
typedef OD::String name_type
 

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() [1/3]

UnitOfMeasure::UnitOfMeasure ( )
inline

◆ UnitOfMeasure() [2/3]

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

◆ UnitOfMeasure() [3/3]

UnitOfMeasure::UnitOfMeasure ( const UnitOfMeasure uom)
inline

Member Function Documentation

◆ currentDefaults()

static IOPar& UnitOfMeasure::currentDefaults ( )
static

just a list of key -> unit of measure key can be property name or whatever seems good

◆ getGuessed()

static const UnitOfMeasure* UnitOfMeasure::getGuessed ( const char *  )
static

◆ getLabel()

const char* UnitOfMeasure::getLabel ( ) const

Symbol or name if no symbol, for IOPar I/O.

◆ getSIValue()

template<class T >
T UnitOfMeasure::getSIValue ( inp) const
inline

◆ getUnitLbl()

static BufferString UnitOfMeasure::getUnitLbl ( const UnitOfMeasure ,
const char *  deflbl = nullptr 
)
static

◆ getUserValueFromSI()

template<class T >
T UnitOfMeasure::getUserValueFromSI ( inp) const
inline

◆ internalValue()

template<class T >
T UnitOfMeasure::internalValue ( inp) const
inline

◆ isImperial()

bool UnitOfMeasure::isImperial ( ) const

◆ operator=()

UnitOfMeasure& UnitOfMeasure::operator= ( const UnitOfMeasure )

◆ propType()

PropertyRef::StdType UnitOfMeasure::propType ( ) const
inline

◆ saveCurrentDefaults()

static void UnitOfMeasure::saveCurrentDefaults ( )
static

store as a user setting on Survey level this will be done automatically at survey changes

◆ scaler()

const LinScaler& UnitOfMeasure::scaler ( ) const
inline

◆ setPropType()

void UnitOfMeasure::setPropType ( PropertyRef::StdType  t)
inline

◆ setScaler()

void UnitOfMeasure::setScaler ( const LinScaler s)
inline

◆ setSource()

void UnitOfMeasure::setSource ( Repos::Source  s)
inline

◆ setSymbol()

void UnitOfMeasure::setSymbol ( const char *  s)
inline

◆ source()

Repos::Source UnitOfMeasure::source ( ) const
inline

◆ surveyDefDepthStorageUnit()

static const UnitOfMeasure* UnitOfMeasure::surveyDefDepthStorageUnit ( )
static

Default depth unit in storage (m,ft)

◆ surveyDefDepthUnit()

static const UnitOfMeasure* UnitOfMeasure::surveyDefDepthUnit ( )
static

Default depth unit in displays (m,ft)

◆ surveyDefDepthUnitAnnot()

static uiString UnitOfMeasure::surveyDefDepthUnitAnnot ( bool  symbol,
bool  withparens 
)
static

◆ surveyDefTimeUnit()

static const UnitOfMeasure* UnitOfMeasure::surveyDefTimeUnit ( )
static

Default time unit in displays (ms)

◆ surveyDefTimeUnitAnnot()

static uiString UnitOfMeasure::surveyDefTimeUnitAnnot ( bool  symbol,
bool  withparens 
)
static

◆ surveyDefVelUnit()

static const UnitOfMeasure* UnitOfMeasure::surveyDefVelUnit ( )
static

Default velocity unit in displays (m/s,ft/s)

◆ surveyDefVelUnitAnnot()

static uiString UnitOfMeasure::surveyDefVelUnitAnnot ( bool  symbol,
bool  withparens 
)
static

◆ surveyDefZStorageUnit()

static const UnitOfMeasure* UnitOfMeasure::surveyDefZStorageUnit ( )
static

Default unit in storage (s,m,ft)

◆ surveyDefZUnit()

static const UnitOfMeasure* UnitOfMeasure::surveyDefZUnit ( )
static

Default unit in displays (ms,m,ft)

◆ surveyDefZUnitAnnot()

static uiString UnitOfMeasure::surveyDefZUnitAnnot ( bool  symbol,
bool  withparens 
)
static

◆ symbol()

const char* UnitOfMeasure::symbol ( ) const
inline

◆ userValue()

template<class T >
T UnitOfMeasure::userValue ( inp) const
inline

◆ zUnitAnnot()

static uiString UnitOfMeasure::zUnitAnnot ( bool  time,
bool  symbol,
bool  withparens 
)
static

Member Data Documentation

◆ proptype_

PropertyRef::StdType UnitOfMeasure::proptype_
protected

◆ scaler_

LinScaler UnitOfMeasure::scaler_
protected

◆ source_

Repos::Source UnitOfMeasure::source_
protected

◆ symbol_

BufferString UnitOfMeasure::symbol_
protected

Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B.V. 1995-2022