Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | Related Pages

Quantities::AllUnits< GT, UL, DU, ST > Class Template Reference

#include <Quantity.h>

List of all members.

Public Types

typedef UL Units
 the list of Units


Public Member Functions

static::Units::Unit< GT, ST > * unit (const std::string &unitstring)
 return a unit which has unitstring as the symbol;


Static Public Member Functions

std::vector< std::string > allsymbols (void)
 return a vector of the strings of all unit symbols


Private Types

typedef Units::CheckUnits<
Units::Unit< GT, ST >, UL
>::Checked 
Checked
 check that all units in UL are subclassed from Unit<GT, ST>


Detailed Description

template<class GT, class UL, class DU, class ST = double>
class Quantities::AllUnits< GT, UL, DU, ST >

store units from a common Unit<GT, ST>; all units in typelist UL are checked vs. Unit<GT, ST> with template CheckUnits; the complete list can be accessed with member Units; a member function unit () can dynamically be used to retrieve a particular unit, based on a string.

Definition at line 145 of file Quantity.h.


Member Typedef Documentation

template<class GT, class UL, class DU, class ST = double>
typedef Units::CheckUnits<Units::Unit<GT, ST>, UL>::Checked Quantities::AllUnits< GT, UL, DU, ST >::Checked [private]
 

check that all units in UL are subclassed from Unit<GT, ST>

Checked is a dummy type.

Definition at line 153 of file Quantity.h.


Member Function Documentation

template<class GT, class UL, class DU, class ST = double>
std::vector<std::string> Quantities::AllUnits< GT, UL, DU, ST >::allsymbols void   )  [inline, static]
 

return a vector of the strings of all unit symbols

uses ListUnitSymbols to extract all symbol strings from the typelist UL as a vector of std::strings

Definition at line 173 of file Quantity.h.

template<class GT, class UL, class DU, class ST = double>
static ::Units::Unit<GT, ST>* Quantities::AllUnits< GT, UL, DU, ST >::unit const std::string &  unitstring  )  [inline]
 

return a unit which has unitstring as the symbol;

uses FindBySymbol to scan the Typelist UL and returns the object created by this process; the object returned must be delete'd by the calling program if no longer needed; important: the returned object is the base unit class, while its virtual functions can be used, you can not make decisions based on its type!

Definition at line 166 of file Quantity.h.


The documentation for this class was generated from the following file:
Generated on Sun Jan 15 13:58:00 2006 for Quantity by doxygen 1.3.6