Repository of all Units of Measure in the system. More...
Public Member Functions | |
| const UnitOfMeasure * | get (const char *nm) const |
| Will try names first, then symbols, otherwise null. | |
| const ObjectSet< const UnitOfMeasure > & | all () const |
| void | getRelevant (PropertyRef::StdType, ObjectSet< const UnitOfMeasure > &) const |
| bool | add (const UnitOfMeasure &) |
| returns whether already present | |
| bool | write (Repos::Source) const |
Static Public Member Functions | |
| static const char * | guessedStdName (const char *) |
| May return null. | |
Private Member Functions | |
| UnitOfMeasureRepository () | |
| void | addUnitsFromFile (const char *, Repos::Source) |
Private Attributes | |
| ObjectSet< 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.
| UnitOfMeasureRepository::UnitOfMeasureRepository | ( | ) | [private] |
| bool UnitOfMeasureRepository::add | ( | const UnitOfMeasure & | ) |
returns whether already present
| void UnitOfMeasureRepository::addUnitsFromFile | ( | const char * | , | |
| Repos::Source | ||||
| ) | [private] |
| const ObjectSet<const UnitOfMeasure>& UnitOfMeasureRepository::all | ( | ) | const [inline] |
| const UnitOfMeasure* UnitOfMeasureRepository::get | ( | const char * | nm | ) | const |
Will try names first, then symbols, otherwise null.
| void UnitOfMeasureRepository::getRelevant | ( | PropertyRef::StdType | , | |
| ObjectSet< const UnitOfMeasure > & | ||||
| ) | const |
| static const char* UnitOfMeasureRepository::guessedStdName | ( | const char * | ) | [static] |
May return null.
| bool UnitOfMeasureRepository::write | ( | Repos::Source | ) | const |
| UnitOfMeasureRepository& UoMR | ( | ) | [friend] |
ObjectSet<const UnitOfMeasure> UnitOfMeasureRepository::entries [private] |
1.7.1