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

Units::NonPrefixable< GT, U, ST > Class Template Reference

template NonPrefixable; More...

#include <Unit.h>

Inheritance diagram for Units::NonPrefixable< GT, U, ST >:

Units::Unit< GT, ST > Units::Units List of all members.

Public Member Functions

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

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

ST standard (const ST &value) const
 standardize a value

ST reverse (const ST &value) const
 reverse standardization of a value

const std::string name (void) const
 return the name of this unit.

const std::string symbol (void) const
 return the symbol of this unit.


Static Public Member Functions

bool Is_SI (void)
 whether the unit is an SI unit;

bool Is_exact (void)
 whether the unit conversion is defined exactly,

ST standardRatio (void)
 determine the ratio between units for standardization

ST Standard (const ST &value)
 standardize a value

ST Reverse (const ST &value)
 reverse standardization of a value

std::string Name (void)
 return the name of this unit.

std::string Symbol (void)
 return the symbol for this unit;


Static Public Attributes

const ST StandardRatio
 determine the ratio between units for standardization


Static Private Attributes

const bool SI
 report whether the unit is an SI unit.

const bool Exact
 report whether the unit is defined exactly.

const std::string Namestring = ""
 the name of the unit

const std::string Symbolstring = "(unknown unit)"
 the symbol of the unit


Detailed Description

template<class GT, class U, class ST = double>
class Units::NonPrefixable< GT, U, ST >

template NonPrefixable;

a unit which can not have a prefix; it is derived from a base unit; the base unit is a Unit<GT, ST>, defined by the group type GT; template parameter U is a dummy parameter; the storage type ST determines the parameter and return type for the standard and reverse functions; the static public member functions in these classes must be defined for each type NonPrefixable<GT, U>, preferably as an inline function.

Definition at line 236 of file Unit.h.


Member Function Documentation

template<class GT, class ST>
const bool Units::NonPrefixable< GT, ST >::is_exact void   )  const = true [inline, virtual]
 

whether the unit conversion is defined exactly,

dynamic access.

Implements Units::Unit< GT, ST >.

Definition at line 278 of file Unit.h.

References Units::NonPrefixable< GT, U, ST >::Is_exact().

template<class GT, class U, class ST = double>
bool Units::NonPrefixable< GT, U, ST >::Is_exact void   )  [inline, static]
 

whether the unit conversion is defined exactly,

for static access without having definition of is_exact available; common interface for all Units, can not be virtual since it is static member function;

Definition at line 273 of file Unit.h.

References Units::NonPrefixable< GT, U, ST >::Exact.

Referenced by Units::NonPrefixable< GT, U, ST >::is_exact().

template<class GT, class ST>
const bool Units::NonPrefixable< GT, ST >::is_SI void   )  const = false [inline, virtual]
 

whether the unit is an SI unit;

dynamic access.

Implements Units::Unit< GT, ST >.

Definition at line 266 of file Unit.h.

References Units::NonPrefixable< GT, U, ST >::Is_SI().

template<class GT, class U, class ST = double>
bool Units::NonPrefixable< GT, U, ST >::Is_SI void   )  [inline, static]
 

whether the unit is an SI unit;

for static access without having definition of is_SI available; common interface for all Units, can not be virtual since it is static member function

Definition at line 261 of file Unit.h.

References Units::NonPrefixable< GT, U, ST >::SI.

Referenced by Units::NonPrefixable< GT, U, ST >::is_SI().

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

return the name of this unit.

dynamic access, to be used polymorphically if exact type is not known at compile time

Implements Units::Unit< GT, ST >.

Definition at line 331 of file Unit.h.

References Units::NonPrefixable< GT, U, ST >::Name().

template<class GT, class U, class ST = double>
ST Units::NonPrefixable< GT, U, ST >::reverse const ST &  value  )  const [inline, virtual]
 

reverse standardization of a value

convert value in the standard unit into NonPrefixable<GT, U>; dynamic access.

Implements Units::Unit< GT, ST >.

Definition at line 316 of file Unit.h.

References Units::NonPrefixable< GT, U, ST >::Reverse().

template<class GT, class U, class ST = double>
ST Units::NonPrefixable< GT, U, ST >::Reverse const ST &  value  )  [inline, static]
 

reverse standardization of a value

convert value in the standard unit into NonPrefixable<GT, U>; static access.

Definition at line 309 of file Unit.h.

References Units::NonPrefixable< GT, U, ST >::StandardRatio.

Referenced by Units::NonPrefixable< GT, U, ST >::reverse().

template<class GT, class U, class ST = double>
ST Units::NonPrefixable< GT, U, ST >::standard const ST &  value  )  const [inline, virtual]
 

standardize a value

convert value in NonPrefixable<GT, U> into the standard unit; dynamic access.

Implements Units::Unit< GT, ST >.

Definition at line 303 of file Unit.h.

References Units::NonPrefixable< GT, U, ST >::Standard().

template<class GT, class U, class ST = double>
ST Units::NonPrefixable< GT, U, ST >::Standard const ST &  value  )  [inline, static]
 

standardize a value

convert value in NonPrefixable<GT, U> into the standard unit; static access.

Definition at line 296 of file Unit.h.

References Units::NonPrefixable< GT, U, ST >::StandardRatio.

Referenced by Units::NonPrefixable< GT, U, ST >::standard().

template<class GT, class U, class ST = double>
ST Units::NonPrefixable< GT, U, ST >::standardRatio void   )  [inline, static]
 

determine the ratio between units for standardization

defines the extent of the current unit with respect to the standard unit; dynamic access.

Definition at line 290 of file Unit.h.

References Units::NonPrefixable< GT, U, ST >::StandardRatio.

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

return the symbol of this unit.

dynamic access, to be used polymorphically if exact type is not known at compile time

Implements Units::Unit< GT, ST >.

Definition at line 346 of file Unit.h.

References Units::NonPrefixable< GT, U, ST >::Symbol().


Member Data Documentation

template<class GT, class U, class ST = double>
const std::string Units::NonPrefixable< GT, ST >::Namestring = "" [static, private]
 

the name of the unit

must be supplied by definition outside of class.

Definition at line 120 of file Generic.h.

template<class GT, class U, class ST = double>
const ST Units::NonPrefixable< GT, U, ST >::StandardRatio [static]
 

determine the ratio between units for standardization

defines the extent of the current unit with respect to the standard unit; static access.

Definition at line 284 of file Unit.h.

Referenced by Units::NonPrefixable< GT, U, ST >::Reverse(), Units::NonPrefixable< GT, U, ST >::Standard(), and Units::NonPrefixable< GT, U, ST >::standardRatio().

template<class GT, class U, class ST = double>
const std::string Units::NonPrefixable< GT, ST >::Symbolstring = "(unknown unit)" [static, private]
 

the symbol of the unit

must be supplied by definition outside of class.

Definition at line 125 of file Generic.h.


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