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

quantity::AllUnits< UT, UL > Class Template Reference

#include <Quantity.h>

List of all members.

Public Types

typedef UL Units
 the list of Units


Public Member Functions

static::unit::Unit< UT > * 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 unit::CheckUnits<
unit::Unit< UT >, UL >::Check 
Check
 check that all units in UL are subclassed from Unit<UT>


Detailed Description

template<class UT, class UL>
class quantity::AllUnits< UT, UL >

store units from a common Unit<UT>; all units in typelist UL are checked vs. Unit<UT> 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 172 of file Quantity.h.


Member Typedef Documentation

template<class UT, class UL>
typedef unit::CheckUnits<unit::Unit<UT>, UL>::Check quantity::AllUnits< UT, UL >::Check [private]
 

check that all units in UL are subclassed from Unit<UT>

Check is a dummy type.

Definition at line 179 of file Quantity.h.

template<class UT, class UL>
typedef UL quantity::AllUnits< UT, UL >::Units
 

the list of Units

Definition at line 183 of file Quantity.h.


Member Function Documentation

template<class UT, class UL>
std::vector<std::string> quantity::AllUnits< UT, UL >::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 201 of file Quantity.h.

template<class UT, class UL>
static ::unit::Unit<UT>* quantity::AllUnits< UT, UL >::unit const std::string &  unitstring  )  [inline]
 

return a unit which has unitstring as the symbol;

uses UnitPointerBySymbol 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, in order to allow the use of its virtual functions polymorphically; however, you can not make decisions based on its type!

Definition at line 194 of file Quantity.h.


The documentation for this class was generated from the following file:
Generated on Sun Jan 15 14:05:22 2006 for Quantity by doxygen 1.3.6