OpendTect  6.6
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 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 (PropertyRef::StdType, const char *nm) const
 
const UnitOfMeasuregetCurDefaultFor (const char *key) const
 
const UnitOfMeasuregetDefault (const char *key, PropertyRef::StdType) const
 
const UnitOfMeasuregetInternalFor (PropertyRef::StdType) const
 
void getRelevant (PropertyRef::StdType, 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.

<>

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 ( PropertyRef::StdType  ,
const char *  nm 
) const

◆ getCurDefaultFor()

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

◆ getDefault()

const UnitOfMeasure* UnitOfMeasureRepository::getDefault ( const char *  key,
PropertyRef::StdType   
) const

◆ getInternalFor()

const UnitOfMeasure* UnitOfMeasureRepository::getInternalFor ( PropertyRef::StdType  ) const

◆ getRelevant()

void UnitOfMeasureRepository::getRelevant ( PropertyRef::StdType  ,
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-2022