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

Units::Unit< GT, ST > Class Template Reference

Basic template Unit;. More...

#include <Unit.h>

Inheritance diagram for Units::Unit< GT, ST >:

Units::Units Units::Compound< GT, Loki::Typelist< CompoundElement< GT, Loki::Typelist< UHead, UTail >, BSUtilities::Rational< N, D >, ST >, Tail >, ST > Units::NonPrefixable< GT, U, ST > Units::NonPrefixable< Quantities::GenericClass< GT >, GenericUnit, ST > Units::Prefixable< GT, U, ST > Units::Prefixed< Prefixable< GT, U, ST >, P > List of all members.

Public Member Functions

virtual const std::string name (void) const=0
 return the name of the unit;

virtual const std::string symbol (void) const=0
 return the symbol of the unit;

virtual ST standard (const ST &) const=0
 recalculate a value in the unit into a standardized value

virtual ST reverse (const ST &) const=0
 recalculate a standardized value into a value given in the unit

virtual bool is_SI (void) const=0
 whether the unit is an SI unit;

virtual bool is_exact (void) const=0
 whether the unit conversion is defined exactly,


Detailed Description

template<class GT, class ST = double>
class Units::Unit< GT, ST >

Basic template Unit;.

Template parameter T is the group type, which ties the unit together with other template classes; the resulting specialized classes can be used as base units, see below.

Definition at line 185 of file Unit.h.


Member Function Documentation

template<class GT, class ST = double>
virtual bool Units::Unit< GT, ST >::is_exact void   )  const [pure virtual]
 

whether the unit conversion is defined exactly,

dynamic access, to be used polymorphically

Implemented in Units::NonPrefixable< GT, U, ST >, and Units::Prefixable< GT, U, ST >.

template<class GT, class ST = double>
virtual bool Units::Unit< GT, ST >::is_SI void   )  const [pure virtual]
 

whether the unit is an SI unit;

dynamic access, to be used polymorphically

Implemented in Units::NonPrefixable< GT, U, ST >, and Units::Prefixable< GT, U, ST >.

template<class GT, class ST = double>
virtual const std::string Units::Unit< GT, ST >::name void   )  const [pure virtual]
 

return the name of the unit;

dynamic access, to be used polymorphically

Implemented in Units::NonPrefixable< GT, U, ST >, and Units::Prefixed< Prefixable< GT, U, ST >, P >.

template<class GT, class ST = double>
virtual ST Units::Unit< GT, ST >::reverse const ST &   )  const [pure virtual]
 

recalculate a standardized value into a value given in the unit

dynamic access, to be used polymorphically

Implemented in Units::NonPrefixable< GT, U, ST >, Units::Prefixed< Prefixable< GT, U, ST >, P >, and Units::Prefixable< GT, U, ST >.

template<class GT, class ST = double>
virtual ST Units::Unit< GT, ST >::standard const ST &   )  const [pure virtual]
 

recalculate a value in the unit into a standardized value

dynamic access, to be used polymorphically

Implemented in Units::NonPrefixable< GT, U, ST >, Units::Prefixed< Prefixable< GT, U, ST >, P >, and Units::Prefixable< GT, U, ST >.

template<class GT, class ST = double>
virtual const std::string Units::Unit< GT, ST >::symbol void   )  const [pure virtual]
 

return the symbol of the unit;

dynamic access, to be used polymorphically

Implemented in Units::NonPrefixable< GT, U, ST >, and Units::Prefixed< Prefixable< GT, U, ST >, P >.


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