Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Friends

UnitOfMeasureRepository Class Reference

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

List of all members.

Public Member Functions

const UnitOfMeasureget (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 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 (  )  [private]

Member Function Documentation

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

Friends And Related Function Documentation

UnitOfMeasureRepository& UoMR (  )  [friend]

Member Data Documentation