OpendTect
6.6
|
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 UnitOfMeasure * | get (const char *nm) const |
const UnitOfMeasure * | get (PropertyRef::StdType, const char *nm) const |
const UnitOfMeasure * | getCurDefaultFor (const char *key) const |
const UnitOfMeasure * | getDefault (const char *key, PropertyRef::StdType) const |
const UnitOfMeasure * | getInternalFor (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 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 | ( | PropertyRef::StdType | , |
const char * | nm | ||
) | const |
const UnitOfMeasure* UnitOfMeasureRepository::getCurDefaultFor | ( | const char * | key | ) | const |
const UnitOfMeasure* UnitOfMeasureRepository::getDefault | ( | const char * | key, |
PropertyRef::StdType | |||
) | const |
const UnitOfMeasure* UnitOfMeasureRepository::getInternalFor | ( | PropertyRef::StdType | ) | const |
void UnitOfMeasureRepository::getRelevant | ( | PropertyRef::StdType | , |
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-2022