OpendTect-6_4  6.4
Public Member Functions | Static Public Member Functions | Protected Attributes | Private Member Functions | 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)
 
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)
 
bool isImperial () const
 
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)
 
- Public Member Functions inherited from NamedObject
 NamedObject (const char *nm=0)
 
 NamedObject (const NamedObject *linkedto)
 
 NamedObject (const NamedObject &)
 
virtual ~NamedObject ()
 
void setLinkedTo (NamedObject *)
 
bool operator== (const NamedObject &oth) const
 
virtual const OD::Stringname () const
 
virtual const OD::StringannotName () const
 
virtual void setName (const char *)
 
void setCleanName (const char *)
 cleans string first More...
 
void deleteNotify (const CallBack &)
 
- Public Member Functions inherited from CallBacker
 CallBacker ()
 
 CallBacker (const CallBacker &)
 
virtual ~CallBacker ()
 
bool attachCB (NotifierAccess &, const CallBack &, bool onlyifnew=false)
 
bool attachCB (NotifierAccess *notif, const CallBack &cb, bool onlyifnew=false)
 
void detachCB (NotifierAccess &, const CallBack &)
 
void detachCB (NotifierAccess *notif, const CallBack &cb)
 
bool isNotifierAttached (NotifierAccess *) const
 Only for debugging purposes, don't use. More...
 

Static Public Member Functions

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

Protected Attributes

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

Private Member Functions

 mODTextTranslationClass (UnitOfMeasure)
 

Additional Inherited Members

- Protected Member Functions inherited from CallBacker
void detachAllNotifiers ()
 Call from the destructor of your inherited object. More...
 

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 IOPar& UnitOfMeasure::currentDefaults ( )
static

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

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
inline
bool UnitOfMeasure::isImperial ( ) const
UnitOfMeasure::mODTextTranslationClass ( UnitOfMeasure  )
private
UnitOfMeasure& UnitOfMeasure::operator= ( const UnitOfMeasure )
PropertyRef::StdType UnitOfMeasure::propType ( ) const
inline
static void UnitOfMeasure::saveCurrentDefaults ( )
static

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

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::surveyDefDepthStorageUnit ( )
static

Default depth unit in storage (m,ft)

static const UnitOfMeasure* UnitOfMeasure::surveyDefDepthUnit ( )
static

Default depth unit in displays (m,ft)

static uiString UnitOfMeasure::surveyDefDepthUnitAnnot ( bool  symbol,
bool  withparens 
)
static
static const UnitOfMeasure* UnitOfMeasure::surveyDefTimeUnit ( )
static

Default time unit in displays (ms)

static uiString UnitOfMeasure::surveyDefTimeUnitAnnot ( bool  symbol,
bool  withparens 
)
static
static const UnitOfMeasure* UnitOfMeasure::surveyDefVelUnit ( )
static

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

static uiString UnitOfMeasure::surveyDefVelUnitAnnot ( bool  symbol,
bool  withparens 
)
static
static const UnitOfMeasure* UnitOfMeasure::surveyDefZStorageUnit ( )
static

Default unit in storage (s,m,ft)

static const UnitOfMeasure* UnitOfMeasure::surveyDefZUnit ( )
static

Default unit in displays (ms,m,ft)

static uiString UnitOfMeasure::surveyDefZUnitAnnot ( bool  symbol,
bool  withparens 
)
static
const char* UnitOfMeasure::symbol ( ) const
inline
template<class T >
T UnitOfMeasure::userValue ( inp) const
inline
static uiString UnitOfMeasure::zUnitAnnot ( bool  time,
bool  symbol,
bool  withparens 
)
static

Member Data Documentation

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

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