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

quantity::ReferencedVariable< Quantity< DIM, BT, UL, DU, ST >, SU > Class Template Reference

referenced variables, specialization More...

#include <ReferencedVariable.h>

List of all members.

Public Member Functions

 ReferencedVariable (void)
 default constructor

 ReferencedVariable (const ST new_value)
 constructor

 ReferencedVariable (const ST new_value, const ST new_reference)
 constructor

template<class NU>  ReferencedVariable (const ST new_value, const ST new_reference, const NU &)
 constructor

template<template< class, class > class QR, class BTR, class DIMR, class ULR, class DUR, class SUR, class STR>  ReferencedVariable (const ST new_value, const QR< Quantity< DIMR, BTR, ULR, DUR, STR >, SUR > &new_reference)
 constructor

 ReferencedVariable (const ReferencedVariable &new_variable)
 copy constructor

void reference (const ST new_reference)
 set the reference value

template<class NU> void reference (const ST new_reference, const NU &)
 set the reference value

ST reference (void)
 get reference value

template<class NU> ST reference (const NU &)
 get reference value

template<template< class, class > class Q1, class BT1, class DIM1, class UL1, class DU1, class SU1, class ST1> ReferencedVariable & operator= (const Q1< Quantity< DIM1, BT1, UL1, DU1, ST1 >, SU1 > &new_variable)
 assignment operator

ReferencedVariable & operator= (const ReferencedVariable &new_variable)
 assignment operator from ReferencedVariable

ST value (void) const
 return the value in the storage unit;

ST refvalue (void) const
 return the value in the storage unit;

template<class NU> ST value (const NU &) const
 return the value in unit NU;

const std::string unitsymbol (void) const
 return the storage unit symbol;

const std::string unitname (void) const
 return the storage unit name;


Static Public Member Functions

std::string Unitsymbol (void)
 return the storage unit symbol;

std::string Unitname (void)
 return the storage unit name;


Private Types

typedef Variable< Quantity<
DIM, BT, UL, DU, ST >, SU > 
V
 make the base Variable known as V

typedef Quantity< DIM, BT,
UL, DU, ST > 
Q
 make the parent quantity known as Q


Private Attributes

ST reference_value
 the value to which the variable value is reference


Detailed Description

template<class BT, class DIM, class UL, class DU, class SU, class ST>
class quantity::ReferencedVariable< Quantity< DIM, BT, UL, DU, ST >, SU >

referenced variables, specialization

the PQ is a Quantity; the ReferencedVariable is derived from the Variable based on the same PQ and SU.

Definition at line 51 of file ReferencedVariable.h.


Member Typedef Documentation

template<class BT, class DIM, class UL, class DU, class SU, class ST>
typedef Quantity<DIM, BT, UL, DU, ST> quantity::ReferencedVariable< Quantity< DIM, BT, UL, DU, ST >, SU >::Q [private]
 

make the parent quantity known as Q

Definition at line 60 of file ReferencedVariable.h.

Referenced by operator=(), and ReferencedVariable().

template<class BT, class DIM, class UL, class DU, class SU, class ST>
typedef Variable<Quantity<DIM, BT, UL, DU, ST>, SU> quantity::ReferencedVariable< Quantity< DIM, BT, UL, DU, ST >, SU >::V [private]
 

make the base Variable known as V

Definition at line 57 of file ReferencedVariable.h.


Member Function Documentation

template<class BT, class DIM, class UL, class DU, class SU, class ST>
ReferencedVariable& quantity::ReferencedVariable< Quantity< DIM, BT, UL, DU, ST >, SU >::operator= const ReferencedVariable< Quantity< DIM, BT, UL, DU, ST >, SU > &  new_variable  )  [inline]
 

assignment operator from ReferencedVariable

Definition at line 240 of file ReferencedVariable.h.

template<class BT, class DIM, class UL, class DU, class SU, class ST>
template<template< class, class > class Q1, class BT1, class DIM1, class UL1, class DU1, class SU1, class ST1>
ReferencedVariable& quantity::ReferencedVariable< Quantity< DIM, BT, UL, DU, ST >, SU >::operator= const Q1< Quantity< DIM1, BT1, UL1, DU1, ST1 >, SU1 > &  new_variable  )  [inline]
 

assignment operator

Definition at line 211 of file ReferencedVariable.h.

References Q.

template<class BT, class DIM, class UL, class DU, class SU, class ST>
template<class NU>
ST quantity::ReferencedVariable< Quantity< DIM, BT, UL, DU, ST >, SU >::reference const NU &   )  [inline]
 

get reference value

return the reference value in the storage type ST and in unit NU; reference_value is recalculated into NU, while NU is checked to be in the list of all available units.

Definition at line 197 of file ReferencedVariable.h.

template<class BT, class DIM, class UL, class DU, class SU, class ST>
ST quantity::ReferencedVariable< Quantity< DIM, BT, UL, DU, ST >, SU >::reference void   )  [inline]
 

get reference value

return the raw (not recalculated) reference value in the storage type ST

Definition at line 189 of file ReferencedVariable.h.

template<class BT, class DIM, class UL, class DU, class SU, class ST>
template<class NU>
void quantity::ReferencedVariable< Quantity< DIM, BT, UL, DU, ST >, SU >::reference const ST  new_reference,
const NU & 
[inline]
 

set the reference value

set reference_value to new_reference, which is in unit NU; recalculate the reference value into unit SU; first dereference the original value, then calculate the new reference_value from new_reference including unit conversion, finally reference to the new reference_value.

Definition at line 176 of file ReferencedVariable.h.

template<class BT, class DIM, class UL, class DU, class SU, class ST>
void quantity::ReferencedVariable< Quantity< DIM, BT, UL, DU, ST >, SU >::reference const ST  new_reference  )  [inline]
 

set the reference value

set reference_value to new_reference, which is assumed to be in unit U; first calculate new variable_value by dereferencing with the old reference_value, then referencing with the new_reference value; then store the new_reference value.

Definition at line 162 of file ReferencedVariable.h.

template<class BT, class DIM, class UL, class DU, class SU, class ST>
quantity::ReferencedVariable< Quantity< DIM, BT, UL, DU, ST >, SU >::ReferencedVariable const ReferencedVariable< Quantity< DIM, BT, UL, DU, ST >, SU > &  new_variable  )  [inline]
 

copy constructor

initialize the parent quantity PQ; then copy the value, the reference value, and the name and symbol string of new_variable

Definition at line 145 of file ReferencedVariable.h.

template<class BT, class DIM, class UL, class DU, class SU, class ST>
template<template< class, class > class QR, class BTR, class DIMR, class ULR, class DUR, class SUR, class STR>
quantity::ReferencedVariable< Quantity< DIM, BT, UL, DU, ST >, SU >::ReferencedVariable const ST  new_value,
const QR< Quantity< DIMR, BTR, ULR, DUR, STR >, SUR > &  new_reference
[inline]
 

constructor

set the value of the variable to new_value and get the reference_value from Quantity new_reference with type QR; assume new_value to be in unit SU, and recalculate in the storage unit; use the recalculated referencer_value to reference new_value; checks that the Unit of new_reference be in the list of available units. NOTE: if QR is a ReferencedVariable, its non-referenced value is used as reference.

Definition at line 120 of file ReferencedVariable.h.

References Q.

template<class BT, class DIM, class UL, class DU, class SU, class ST>
template<class NU>
quantity::ReferencedVariable< Quantity< DIM, BT, UL, DU, ST >, SU >::ReferencedVariable const ST  new_value,
const ST  new_reference,
const NU & 
[inline]
 

constructor

set the value of the variable to new_value and the reference_value to new_reference; assume both values to be in unit NU, and recalculate in the storage unit. checks NU to be in the list of available units only once

Definition at line 96 of file ReferencedVariable.h.

template<class BT, class DIM, class UL, class DU, class SU, class ST>
quantity::ReferencedVariable< Quantity< DIM, BT, UL, DU, ST >, SU >::ReferencedVariable const ST  new_value,
const ST  new_reference
[inline]
 

constructor

set the value of the variable to new_value and the revference_value to new_reference; assume both values to be in storage unit SU.

Definition at line 83 of file ReferencedVariable.h.

template<class BT, class DIM, class UL, class DU, class SU, class ST>
quantity::ReferencedVariable< Quantity< DIM, BT, UL, DU, ST >, SU >::ReferencedVariable const ST  new_value  )  [inline]
 

constructor

set the value of the variable to new_value, and assume the reference value to be 0.0; assume both values to be in storage unit SU.

Definition at line 77 of file ReferencedVariable.h.

template<class BT, class DIM, class UL, class DU, class SU, class ST>
quantity::ReferencedVariable< Quantity< DIM, BT, UL, DU, ST >, SU >::ReferencedVariable void   )  [inline]
 

default constructor

set the value of the variable to 0.0, and assume the reference value to be 0.0. Also assume that both values are in storage unit SU.

Definition at line 70 of file ReferencedVariable.h.

template<class BT, class DIM, class UL, class DU, class SU, class ST>
ST quantity::ReferencedVariable< Quantity< DIM, BT, UL, DU, ST >, SU >::refvalue void   )  const [inline]
 

return the value in the storage unit;

The stored variable_value is returned without recalculation with respect to the unit, but with referencing.

Definition at line 260 of file ReferencedVariable.h.

template<class BT, class DIM, class UL, class DU, class SU, class ST>
std::string quantity::ReferencedVariable< Quantity< DIM, BT, UL, DU, ST >, SU >::Unitname void   )  [inline, static]
 

return the storage unit name;

the name is interrogated from SU; static access.

Definition at line 293 of file ReferencedVariable.h.

template<class BT, class DIM, class UL, class DU, class SU, class ST>
const std::string quantity::ReferencedVariable< Quantity< DIM, BT, UL, DU, ST >, SU >::unitname void   )  const [inline]
 

return the storage unit name;

the name is interrogated from SU; dynamic access.

Definition at line 288 of file ReferencedVariable.h.

template<class BT, class DIM, class UL, class DU, class SU, class ST>
std::string quantity::ReferencedVariable< Quantity< DIM, BT, UL, DU, ST >, SU >::Unitsymbol void   )  [inline, static]
 

return the storage unit symbol;

the symbol is interrogated from SU; static access.

Definition at line 283 of file ReferencedVariable.h.

template<class BT, class DIM, class UL, class DU, class SU, class ST>
const std::string quantity::ReferencedVariable< Quantity< DIM, BT, UL, DU, ST >, SU >::unitsymbol void   )  const [inline]
 

return the storage unit symbol;

the symbol is interrogated from SU; dynamic access.

Definition at line 277 of file ReferencedVariable.h.

template<class BT, class DIM, class UL, class DU, class SU, class ST>
template<class NU>
ST quantity::ReferencedVariable< Quantity< DIM, BT, UL, DU, ST >, SU >::value const NU &   )  const [inline]
 

return the value in unit NU;

The stored variable_value is first standardized using the standardize () function of the unit SU, and then recalculated into unit NU, which is checked against AllUnits; only the type NU is used.

Definition at line 269 of file ReferencedVariable.h.

template<class BT, class DIM, class UL, class DU, class SU, class ST>
ST quantity::ReferencedVariable< Quantity< DIM, BT, UL, DU, ST >, SU >::value void   )  const [inline]
 

return the value in the storage unit;

The stored variable_value is returned in the storage unit. Its value is NOT given versus the reference_value.

Definition at line 253 of file ReferencedVariable.h.


Member Data Documentation

template<class BT, class DIM, class UL, class DU, class SU, class ST>
ST quantity::ReferencedVariable< Quantity< DIM, BT, UL, DU, ST >, SU >::reference_value [private]
 

the value to which the variable value is reference

Definition at line 63 of file ReferencedVariable.h.


The documentation for this class was generated from the following file:
Generated on Mon Feb 12 18:48:42 2007 for Quantity by doxygen 1.3.6