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

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

template Prefixable; More...

#include <Unit.h>

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

Units::Unit< GT, ST > Units::Units Units::Prefixed< Prefixable< GT, U, ST >, P > List of all members.

Public Types

typedef Loki::Typelist< Prefixed<
Prefixable< GT, U, ST >,
Yotta >, Loki::Typelist<
Prefixed< Prefixable< GT,
U, ST >, Zetta >, Loki::Typelist<
Prefixed< Prefixable< GT,
U, ST >, Exa >, Loki::Typelist<
Prefixed< Prefixable< GT,
U, ST >, Peta >, Loki::Typelist<
Prefixed< Prefixable< GT,
U, ST >, Tera >, Loki::Typelist<
Prefixed< Prefixable< GT,
U, ST >, Giga >, Loki::Typelist<
Prefixed< Prefixable< GT,
U, ST >, Mega >, Loki::Typelist<
Prefixed< Prefixable< GT,
U, ST >, Kilo >, Loki::Typelist<
Prefixed< Prefixable< GT,
U, ST >, Hecto >, Loki::Typelist<
Prefixed< Prefixable< GT,
U, ST >, Deca >, Loki::Typelist<
Prefixed< Prefixable< GT,
U, ST >, No >, Loki::Typelist<
Prefixed< Prefixable< GT,
U, ST >, Deci >, Loki::Typelist<
Prefixed< Prefixable< GT,
U, ST >, Centi >, Loki::Typelist<
Prefixed< Prefixable< GT,
U, ST >, Milli >, Loki::Typelist<
Prefixed< Prefixable< GT,
U, ST >, Micro >, Loki::Typelist<
Prefixed< Prefixable< GT,
U, ST >, Nano >, Loki::Typelist<
Prefixed< Prefixable< GT,
U, ST >, Pico >, Loki::Typelist<
Prefixed< Prefixable< GT,
U, ST >, Femto >, Loki::Typelist<
Prefixed< Prefixable< GT,
U, ST >, Atto >, Loki::Typelist<
Prefixed< Prefixable< GT,
U, ST >, Zepto >, Loki::Typelist<
Prefixed< Prefixable< GT,
U, ST >, Yocto >, Loki::NullType > > > > > > > > > > > > > > > > > > > > > 
Units
 Typelist of all Prefixed derived units;.


Public Member Functions

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

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


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


Static Public Attributes

const ST StandardRatio
 determine the ratio between units for standardization


Protected Member Functions

ST standard (const ST &value) const
 convert value in Prefixable<GT, U, ST> into the standard unit;

ST reverse (const ST &value) const
 convert value in the standard unit into Prefixable<GT, U, ST>;


Static Protected Member Functions

ST Standard (const ST &value)
 convert value in Prefixable<GT, U, ST> into the standard unit;

ST Reverse (const ST &value)
 convert value in the standard unit into Prefixable<GT, U, ST>;


Static Protected Attributes

const std::string Basename
 the name of this unit;

const std::string Basesymbol
 the symbol for this unit;


Static Private Attributes

const bool SI
 whether the unit is an SI unit;

const bool Exact
 whether the unit conversion is defined exactly,


Detailed Description

template<class GT, class U, class ST>
class Units::Prefixable< GT, U, ST >

template Prefixable;

a unit with an additional prefix (defined by the SI) which defines the order of magnitude; it is derived from a base unit; the base unit is a Unit<GT, ST>, which is defined by 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 class defines a member Units, which lists all the expanded units which can be derived from Prefixable<GT, U, ST> by attaching a prefix; the static public member functions and the static const members in these classes must be defined for each type Prefixable<GT, U, ST> outside of the class.

Definition at line 460 of file Unit.h.


Member Function Documentation

template<class GT, class U, class ST>
bool Units::Prefixable< GT, U, ST >::is_exact void   )  const [inline, virtual]
 

whether the unit conversion is defined exactly,

dynamic access.

Implements Units::Unit< GT, ST >.

Definition at line 522 of file Unit.h.

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

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

whether the unit conversion is defined exactly,

for 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 517 of file Unit.h.

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

template<class GT, class U, class ST>
bool Units::Prefixable< GT, U, ST >::is_SI void   )  const [inline, virtual]
 

whether the unit is an SI unit;

dynamic access.

Implements Units::Unit< GT, ST >.

Definition at line 510 of file Unit.h.

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

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

whether the unit is an SI unit;

for 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 505 of file Unit.h.

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

template<class GT, class U, class ST>
ST Units::Prefixable< GT, U, ST >::reverse const ST &  value  )  const [inline, protected, virtual]
 

convert value in the standard unit into Prefixable<GT, U, ST>;

the member function is protected, since only the derived Prefixed classes should use it; must be defined for each type Prefixable<GT, U, ST>, preferably as an inline function; dynamic access.

Implements Units::Unit< GT, ST >.

Reimplemented in Units::Prefixed< Prefixable< GT, U, ST >, P >.

Definition at line 581 of file Unit.h.

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

template<class GT, class U, class ST>
ST Units::Prefixable< GT, U, ST >::Reverse const ST &  value  )  [inline, static, protected]
 

convert value in the standard unit into Prefixable<GT, U, ST>;

the member function is protected, since only the derived Prefixed classes should use it; must be defined for each type Prefixable<GT, U, ST>, preferably as an inline function; static access.

Reimplemented in Units::Prefixed< Prefixable< GT, U, ST >, P >.

Definition at line 572 of file Unit.h.

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

template<class GT, class U, class ST>
ST Units::Prefixable< GT, U, ST >::standard const ST &  value  )  const [inline, protected, virtual]
 

convert value in Prefixable<GT, U, ST> into the standard unit;

the member function is protected, since only the derived Prefixed classes should use it; must be defined for each type Prefixable<GT, U, ST>, preferably as an inline function; dynamic access.

Implements Units::Unit< GT, ST >.

Reimplemented in Units::Prefixed< Prefixable< GT, U, ST >, P >.

Definition at line 564 of file Unit.h.

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

template<class GT, class U, class ST>
ST Units::Prefixable< GT, U, ST >::Standard const ST &  value  )  [inline, static, protected]
 

convert value in Prefixable<GT, U, ST> into the standard unit;

the member function is protected, since only the derived Prefixed classes should use it; must be defined for each type Prefixable<GT, U, ST>, preferably as an inline function; static access.

Reimplemented in Units::Prefixed< Prefixable< GT, U, ST >, P >.

Definition at line 555 of file Unit.h.

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

template<class GT, class U, class ST>
ST Units::Prefixable< 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.

Reimplemented in Units::Prefixed< Prefixable< GT, U, ST >, P >.

Definition at line 534 of file Unit.h.


Member Data Documentation

template<class GT, class U, class ST>
const bool Units::Prefixable< GT, U, ST >::Exact [static, private]
 

whether the unit conversion is defined exactly,

this static variable must be defined outside of the class2Y

Definition at line 472 of file Unit.h.

template<class GT, class U, class ST>
const bool Units::Prefixable< GT, U, ST >::SI [static, private]
 

whether the unit is an SI unit;

this static variable must be defined outside of the class

Definition at line 467 of file Unit.h.

template<class GT, class U, class ST>
const ST Units::Prefixable< 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 528 of file Unit.h.


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