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

Repository of all Units of Measure in the system. More...

Public Types

typedef UnitOfMeasure::PropType PropType
 

Public Member Functions

bool add (const UnitOfMeasure &)
 returns false when already present More...
 
const ObjectSet< const UnitOfMeasure > & all () const
 
const UnitOfMeasureget (const char *nm) const
 
const UnitOfMeasureget (PropType, const char *nm) const
 
const UnitOfMeasuregetCurDefaultFor (const char *key) const
 
const UnitOfMeasuregetDefault (const char *key, PropType) const
 
const UnitOfMeasuregetInternalFor (PropType) const
 
void getRelevant (PropType, ObjectSet< const UnitOfMeasure > &) const
 
bool write (Repos::Source) const
 

Static Public Member Functions

static const char * guessedStdName (const char *)
 May return null. More...
 

Private Member Functions

 UnitOfMeasureRepository ()
 
void addUnitsFromFile (const char *, Repos::Source)
 
const UnitOfMeasurefindBest (const ObjectSet< const UnitOfMeasure > &, const char *nm) const
 Will try names first, then symbols, otherwise null. More...
 

Private Attributes

ManagedObjectSet< const UnitOfMeasureentries_
 

Friends

UnitOfMeasureRepositoryUoMR ()
 

Detailed Description

Repository of all Units of Measure in the system.

At first usage of the singleton instance of this class (accessible through the global UoMR() function), the data files for the repository are searched, by iterating through the different 'Repos' sources (see repos.h). Then, the standard ones like 'feet' are added if they are not yet defined in one of the files.

<>

Member Typedef Documentation

◆ PropType

Constructor & Destructor Documentation

◆ UnitOfMeasureRepository()

UnitOfMeasureRepository::UnitOfMeasureRepository ( )
private

Member Function Documentation

◆ add()

bool UnitOfMeasureRepository::add ( const UnitOfMeasure )

returns false when already present

◆ addUnitsFromFile()

void UnitOfMeasureRepository::addUnitsFromFile ( const char *  ,
Repos::Source   
)
private

◆ all()

const ObjectSet<const UnitOfMeasure>& UnitOfMeasureRepository::all ( ) const
inline

◆ findBest()

const UnitOfMeasure* UnitOfMeasureRepository::findBest ( const ObjectSet< const UnitOfMeasure > &  ,
const char *  nm 
) const
private

Will try names first, then symbols, otherwise null.

◆ get() [1/2]

const UnitOfMeasure* UnitOfMeasureRepository::get ( const char *  nm) const

◆ get() [2/2]

const UnitOfMeasure* UnitOfMeasureRepository::get ( PropType  ,
const char *  nm 
) const

◆ getCurDefaultFor()

const UnitOfMeasure* UnitOfMeasureRepository::getCurDefaultFor ( const char *  key) const

◆ getDefault()

const UnitOfMeasure* UnitOfMeasureRepository::getDefault ( const char *  key,
PropType   
) const

◆ getInternalFor()

const UnitOfMeasure* UnitOfMeasureRepository::getInternalFor ( PropType  ) const

◆ getRelevant()

void UnitOfMeasureRepository::getRelevant ( PropType  ,
ObjectSet< const UnitOfMeasure > &   
) const

◆ guessedStdName()

static const char* UnitOfMeasureRepository::guessedStdName ( const char *  )
static

May return null.

◆ write()

bool UnitOfMeasureRepository::write ( Repos::Source  ) const

Friends And Related Function Documentation

◆ UoMR

UnitOfMeasureRepository& UoMR ( )
friend

Member Data Documentation

◆ entries_

ManagedObjectSet<const UnitOfMeasure> UnitOfMeasureRepository::entries_
private

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