quantity::AllUnitsTemplate< 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

static 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<typename UT, typename UL>
class quantity::AllUnitsTemplate< 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 213 of file Quantity.h.


Member Typedef Documentation

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

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

Check is a dummy type.

Definition at line 220 of file Quantity.h.

template<typename UT, typename UL>
typedef UL quantity::AllUnitsTemplate< UT, UL >::Units

the list of Units

Definition at line 224 of file Quantity.h.


Member Function Documentation

template<typename UT, typename UL>
static ::unit::Unit<UT>* quantity::AllUnitsTemplate< 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 235 of file Quantity.h.

template<typename UT, typename UL>
static std::vector<std::string> quantity::AllUnitsTemplate< 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 242 of file Quantity.h.


The documentation for this class was generated from the following file:
Generated on Mon Jul 27 15:55:47 2009 for Quantities by  doxygen 1.5.3