OpendTect
7.0
|
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 UnitOfMeasure * | get (const char *nm) const |
const UnitOfMeasure * | get (PropType, const char *nm) const |
const UnitOfMeasure * | getCurDefaultFor (const char *key) const |
const UnitOfMeasure * | getDefault (const char *key, PropType) const |
const UnitOfMeasure * | getInternalFor (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 UnitOfMeasure * | findBest (const ObjectSet< const UnitOfMeasure > &, const char *nm) const |
Will try names first, then symbols, otherwise null. More... | |
Private Attributes | |
ManagedObjectSet< const UnitOfMeasure > | entries_ |
Friends | |
UnitOfMeasureRepository & | UoMR () |
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.
<>
|
private |
bool UnitOfMeasureRepository::add | ( | const UnitOfMeasure & | ) |
returns false when already present
|
private |
|
inline |
|
private |
Will try names first, then symbols, otherwise null.
const UnitOfMeasure* UnitOfMeasureRepository::get | ( | const char * | nm | ) | const |
const UnitOfMeasure* UnitOfMeasureRepository::get | ( | PropType | , |
const char * | nm | ||
) | const |
const UnitOfMeasure* UnitOfMeasureRepository::getCurDefaultFor | ( | const char * | key | ) | const |
const UnitOfMeasure* UnitOfMeasureRepository::getDefault | ( | const char * | key, |
PropType | |||
) | const |
const UnitOfMeasure* UnitOfMeasureRepository::getInternalFor | ( | PropType | ) | const |
void UnitOfMeasureRepository::getRelevant | ( | PropType | , |
ObjectSet< const UnitOfMeasure > & | |||
) | const |
|
static |
May return null.
bool UnitOfMeasureRepository::write | ( | Repos::Source | ) | const |
|
friend |
|
private |
Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B.V. 1995-2024