OpendTect  7.0
Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
UnitOfMeasure Class Reference

Unit of Measure. More...

Inheritance diagram for UnitOfMeasure:
[legend]

Public Types

typedef Mnemonic::StdType PropType
 
- Public Types inherited from ObjectWithName
typedef OD::String name_type
 

Public Member Functions

 UnitOfMeasure ()
 
 UnitOfMeasure (const char *n, const char *s, double f, PropType t=Mnemonic::Other)
 
 UnitOfMeasure (const UnitOfMeasure &)
 
 ~UnitOfMeasure ()
 
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 isCompatibleWith (const UnitOfMeasure &) const
 
bool isImperial () const
 
int nrTypes () const
 
UnitOfMeasureoperator= (const UnitOfMeasure &)
 
PropType propType (int idx=0) const
 
const LinScalerscaler () const
 
mDeprecatedDef void setPropType (PropType prtyp)
 
mDeprecatedDef void setScaler (const LinScaler &s)
 
mDeprecatedDef void setSource (Repos::Source s)
 
mDeprecatedDef 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 &)
 
const name_typename () const override
 
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 UnitOfMeasuredegreesUnit ()
 
static const UnitOfMeasurefeetSecondUnit ()
 
static const UnitOfMeasurefeetUnit ()
 
static const UnitOfMeasuregetGuessed (const char *)
 
static BufferString getUnitLbl (const UnitOfMeasure *, const char *deflbl=nullptr)
 
static const UnitOfMeasuremeterSecondUnit ()
 
static const UnitOfMeasuremeterUnit ()
 
static const UnitOfMeasuremillisecondsUnit ()
 
static const UnitOfMeasureradiansUnit ()
 
static void saveCurrentDefaults ()
 
static const UnitOfMeasuresecondsUnit ()
 
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 UnitOfMeasuresurveyDefOffsetUnit ()
 
static const UnitOfMeasuresurveyDefSRDStorageUnit ()
 Default srd unit in storage (m,ft) More...
 
static const UnitOfMeasuresurveyDefSRDUnit ()
 Default srd unit in displays (m,ft) More...
 
static const UnitOfMeasuresurveyDefTimeStorageUnit ()
 Survey storage time unit (s) More...
 
static const UnitOfMeasuresurveyDefTimeUnit ()
 Default time unit in displays (ms) More...
 
static uiString surveyDefTimeUnitAnnot (bool symbol, bool withparens)
 
static const UnitOfMeasuresurveyDefVelStorageUnit ()
 Default velocity unit in storage (m/s,ft/s) More...
 
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 const UnitOfMeasurezUnit (const ZDomain::Info &, bool storage=true)
 
static uiString zUnitAnnot (bool time, bool symbol, bool withparens)
 

Private Member Functions

 UnitOfMeasure (const char *nm, const char *symb, double shft, double fact, const TypeSet< PropType > &, Repos::Source)
 

Private Attributes

TypeSet< PropTypeproptypes_
 
LinScaler scaler_
 
Repos::Source source_
 
BufferString symbol_
 

Friends

class UnitOfMeasureRepository
 

Additional Inherited Members

- Protected Attributes inherited from NamedObject
BufferString name_
 

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.

<>

Member Typedef Documentation

◆ PropType

Constructor & Destructor Documentation

◆ UnitOfMeasure() [1/4]

UnitOfMeasure::UnitOfMeasure ( const UnitOfMeasure )

◆ ~UnitOfMeasure()

UnitOfMeasure::~UnitOfMeasure ( )

◆ UnitOfMeasure() [2/4]

UnitOfMeasure::UnitOfMeasure ( const char *  nm,
const char *  symb,
double  shft,
double  fact,
const TypeSet< PropType > &  ,
Repos::Source   
)
private

◆ UnitOfMeasure() [3/4]

UnitOfMeasure::UnitOfMeasure ( )
inline

◆ UnitOfMeasure() [4/4]

UnitOfMeasure::UnitOfMeasure ( const char *  n,
const char *  s,
double  f,
PropType  t = Mnemonic::Other 
)
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

◆ degreesUnit()

static const UnitOfMeasure* UnitOfMeasure::degreesUnit ( )
static

◆ feetSecondUnit()

static const UnitOfMeasure* UnitOfMeasure::feetSecondUnit ( )
static

◆ feetUnit()

static const UnitOfMeasure* UnitOfMeasure::feetUnit ( )
static

◆ 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

◆ isCompatibleWith()

bool UnitOfMeasure::isCompatibleWith ( const UnitOfMeasure ) const

◆ isImperial()

bool UnitOfMeasure::isImperial ( ) const

◆ meterSecondUnit()

static const UnitOfMeasure* UnitOfMeasure::meterSecondUnit ( )
static

◆ meterUnit()

static const UnitOfMeasure* UnitOfMeasure::meterUnit ( )
static

◆ millisecondsUnit()

static const UnitOfMeasure* UnitOfMeasure::millisecondsUnit ( )
static

◆ nrTypes()

int UnitOfMeasure::nrTypes ( ) const
inline

◆ operator=()

UnitOfMeasure& UnitOfMeasure::operator= ( const UnitOfMeasure )

◆ propType()

PropType UnitOfMeasure::propType ( int  idx = 0) const

◆ radiansUnit()

static const UnitOfMeasure* UnitOfMeasure::radiansUnit ( )
static

◆ 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

◆ secondsUnit()

static const UnitOfMeasure* UnitOfMeasure::secondsUnit ( )
static

◆ setPropType()

mDeprecatedDef void UnitOfMeasure::setPropType ( PropType  prtyp)
inline

◆ setScaler()

mDeprecatedDef void UnitOfMeasure::setScaler ( const LinScaler s)
inline

◆ setSource()

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

◆ setSymbol()

mDeprecatedDef 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

◆ surveyDefOffsetUnit()

static const UnitOfMeasure* UnitOfMeasure::surveyDefOffsetUnit ( )
static

Default offset unit for real datasets (m,ft) Not used for synthetic gathers

◆ surveyDefSRDStorageUnit()

static const UnitOfMeasure* UnitOfMeasure::surveyDefSRDStorageUnit ( )
static

Default srd unit in storage (m,ft)

◆ surveyDefSRDUnit()

static const UnitOfMeasure* UnitOfMeasure::surveyDefSRDUnit ( )
static

Default srd unit in displays (m,ft)

◆ surveyDefTimeStorageUnit()

static const UnitOfMeasure* UnitOfMeasure::surveyDefTimeStorageUnit ( )
static

Survey storage time unit (s)

◆ surveyDefTimeUnit()

static const UnitOfMeasure* UnitOfMeasure::surveyDefTimeUnit ( )
static

Default time unit in displays (ms)

◆ surveyDefTimeUnitAnnot()

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

◆ surveyDefVelStorageUnit()

static const UnitOfMeasure* UnitOfMeasure::surveyDefVelStorageUnit ( )
static

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

◆ 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

◆ zUnit()

static const UnitOfMeasure* UnitOfMeasure::zUnit ( const ZDomain::Info ,
bool  storage = true 
)
static

◆ zUnitAnnot()

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

Friends And Related Function Documentation

◆ UnitOfMeasureRepository

friend class UnitOfMeasureRepository
friend

Member Data Documentation

◆ proptypes_

TypeSet<PropType> UnitOfMeasure::proptypes_
private

◆ scaler_

LinScaler UnitOfMeasure::scaler_
private

◆ source_

Repos::Source UnitOfMeasure::source_
private

◆ symbol_

BufferString UnitOfMeasure::symbol_
private

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