#include <DedimensionalizedVariable.h>
Public Types | |
typedef DedimensionalizedVariableDimension | DIM |
the dimension | |
typedef Loki::Typelist< DDH, DDT > | DDL |
the dedimensionalizer parameter type list type | |
typedef Loki::TL::TypeAt< DDL, 0 >::Result | DDP |
the parameters to the dedimensionalizing functor as a type | |
typedef Loki::Functor< R, DDL > | DD |
the dedimensionalizer type | |
typedef Quantity< DedimensionalizedVariableDimension, unit::DedimensionalizedUnit, unit::DedimensionalizedUnits, unit::DedimensionalizedUnity, ST > | ABQ |
the abstract base quantity type | |
typedef Variable< Quantity< dimension::Dimension< BSUtilities::Rational< RL_N, RL_D >, BSUtilities::Rational< RM_N, RM_D >, BSUtilities::Rational< RT_N, RT_D >, BSUtilities::Rational< RE_N, RE_D >, BSUtilities::Rational< RTE_N, RTE_D >, BSUtilities::Rational< RA_N, RA_D >, BSUtilities::Rational< RLU_N, RLU_D > >, BT, UL, DU, ST >, SU, DD > | V |
the dededimensionalized variable type | |
typedef Quantity< dimension::Dimension< BSUtilities::Rational< RL_N, RL_D >, BSUtilities::Rational< RM_N, RM_D >, BSUtilities::Rational< RT_N, RT_D >, BSUtilities::Rational< RE_N, RE_D >, BSUtilities::Rational< RTE_N, RTE_D >, BSUtilities::Rational< RA_N, RA_D >, BSUtilities::Rational< RLU_N, RLU_D > >, BT, UL, DU, ST > | PQ |
the parent quantity; | |
typedef unit::CheckUnit< unit::Unit< BT >, SU >::Check | Unit |
the storage unit | |
typedef BSUtilities::IF< BSUtilities::SameType< DD, typename DefaultDedimensionalizer< PQ, SU >::F >::sameType, DedimReturn< PQ, SU >, V >::RET | DDR |
the return variable type of dedimensionalizer | |
Public Member Functions | |
DedimensionalizedVariable (void) | |
default constructor | |
DedimensionalizedVariable (const DD &dedimensionalizer) | |
constructor with only dedimensionalizer function | |
DedimensionalizedVariable (const ST value) | |
constructor | |
DedimensionalizedVariable (const ST value, const DD &dedimensionalizer) | |
constructor | |
DedimensionalizedVariable (const V &value, const V &dedimensionalizationValue, const DD &dedimensionalizer) | |
constructor from two quantity objects | |
template<class SU1> | DedimensionalizedVariable (const V &value, const Variable< Quantity< dimension::Dimension< BSUtilities::Rational< RL_N, RL_D >, BSUtilities::Rational< RM_N, RM_D >, BSUtilities::Rational< RT_N, RT_D >, BSUtilities::Rational< RE_N, RE_D >, BSUtilities::Rational< RTE_N, RTE_D >, BSUtilities::Rational< RA_N, RA_D >, BSUtilities::Rational< RLU_N, RLU_D > >, BT, UL, DU, ST >, SU1 > &dedimensionalizationValue, const DD &dedimensionalizer) |
constructor from two quantity objects | |
DedimensionalizedVariable (const DedimensionalizedVariable &variable) | |
copy constructor | |
ST | value (void) const |
return the value in the storage unit; | |
ST | standard_value (void) const |
return the value in the standard unit; | |
ST | value (const unit::DedimensionalizedUnity &) const |
return the value in DedimensionalizedUnity | |
const std::string | unitsymbol (void) const |
return the storage unit symbol; | |
const std::string | unitname (void) const |
return the storage unit name; | |
DedimensionalizedVariable & | operator+= (const DedimensionalizedVariable &variable) |
operator+= | |
template<template< class, class > class Q1, class BT1, class DIM1, class DU1, class SU1> DedimensionalizedVariable & | operator+= (const Q1< Quantity< DIM1, BT1, Loki::Typelist< unit::NonPrefixable< BT1, unit::GenericUnit >, Loki::NullType >, DU1, ST >, SU1 > &quantity) |
operator+= | |
template<template< class, class > class Q1, class PQ1, class SU1> DedimensionalizedVariable & | operator+= (const Q1< PQ1, SU1 > &quantity) |
operator+= | |
DedimensionalizedVariable & | operator-= (const DedimensionalizedVariable &new_variable) |
operator-= | |
DedimensionalizedVariable | operator+ (void) const |
unary operator+ | |
DedimensionalizedVariable | operator- (void) const |
unary operator- | |
template<template< class, class > class Q1, class DIM1, class BT1, class UL1, class DU1, class SU1> DedimensionalizedVariable | operator+ (const Q1< Quantity< DIM1, BT1, UL1, DU1, ST >, SU1 > &quantity) const |
binary operator+ | |
template<template< class, class > class Q1, class DIM1, class BT1, class UL1, class DU1, class SU1> DedimensionalizedVariable | operator- (const Q1< Quantity< DIM1, BT1, UL1, DU1, ST >, SU1 > &quantity) const |
bool | operator== (const DedimensionalizedVariable &rhs_variable) const |
equality | |
template<template< class, class > class Q1, class DIM1, class BT1, class UL1, class DU1, class SU1> bool | operator== (const Q1< Quantity< DIM1, BT1, UL1, DU1, ST >, SU1 > &rhs_variable) const |
equality | |
bool | operator!= (const DedimensionalizedVariable &rhs_variable) const |
inequality | |
template<template< class, class > class Q1, class DIM1, class BT1, class UL1, class DU1, class SU1> bool | operator!= (const Q1< Quantity< DIM1, BT1, UL1, DU1, ST >, SU1 > &rhs_variable) const |
inequality | |
std::ostream & | print_value (std::ostream &os) const |
print the value and the unit of the dedimensionalized variable | |
void | operator>> (std::string &str) const |
store the value and unit of the variable in a std::string | |
std::ostream & | operator>> (std::ostream &os) const |
print the variable | |
void | save (BSUtilities::xmlw::XmlStream &os) const |
save contents of the dedimensionalized variable quantity object as xml | |
void | load (const TiXmlHandle node) const |
load contents of the dedimensionalized variable quantity object from xml code | |
Static Public Member Functions | |
std::string | Unitsymbol (void) |
return the storage unit symbol; | |
std::string | Unitname (void) |
return the storage unit name; | |
Static Public Attributes | |
const std::string | MODE |
the xml DedimensionalizedVariable tag | |
Static Private Member Functions | |
DDR | defaultDedimensionalizer (DDP) |
the default dedimensionalizing function | |
Private Attributes | |
DD | _dedimensionalizer |
the (de)dedimensionalizing functor object | |
ST | _value |
the value of the Variable in the storage unit | |
Static Private Attributes | |
const DD | _defaultDD |
the default dedimensionalizing functor |
the parent quantity is required to be a Quantity, while there is no requirement on SU; the dedimensionalized variable is derived from a special base quantity.
Definition at line 108 of file DedimensionalizedVariable.h.
|
the abstract base quantity type the Quantity which is used as the abstract base class for this dedimensionalized quantity; Definition at line 149 of file DedimensionalizedVariable.h. |
|
the dedimensionalizer type
Definition at line 141 of file DedimensionalizedVariable.h. |
|
the dedimensionalizer parameter type list type
Definition at line 128 of file DedimensionalizedVariable.h. |
|
the parameters to the dedimensionalizing functor as a type a (possibly inhomogenous) collection of values to be given to the dedimensionalizing functor upon a call to redimensionalize the DedimensionalizedVariable; this is extracted from the DDL typelist, which should have a single element, which is again a Loki::Tuple, containing the individual parameters Definition at line 138 of file DedimensionalizedVariable.h. |
|
the return variable type of dedimensionalizer
Definition at line 190 of file DedimensionalizedVariable.h. |
|
the dimension make the dimension known as DIM Definition at line 125 of file DedimensionalizedVariable.h. |
|
the parent quantity; this is the quantity which is used to generate this dedimensionalized quantity in template form as a parameter to the quantity mode; for a dedimensionalized quantity this is usually different from the abstract base quantity; it is used by other classes, and MUST be public Definition at line 178 of file DedimensionalizedVariable.h. |
|
the storage unit check SU against all available units, and make it known as Unit Definition at line 184 of file DedimensionalizedVariable.h. |
|
the dededimensionalized variable type
Definition at line 161 of file DedimensionalizedVariable.h. Referenced by DedimensionalizedVariable(). |
|
copy constructor initialize the parent quantity PQ, the value and the dedimensionalizationValue; then copy the name and symbol string Definition at line 297 of file DedimensionalizedVariable.h. |
|
constructor from two quantity objects Set the value to value; the dedimensionalizationValue has a storage unit different from that of the return value Definition at line 277 of file DedimensionalizedVariable.h. References V. |
|
constructor from two quantity objects the dedimensionalizationValue has the same storage unit as the return value; dedimensionalize by division with the value stored in dedimensionalizingValue; store the dedimensionalizer function. Definition at line 265 of file DedimensionalizedVariable.h. References V. |
|
constructor Set the value to value; the dedimensionalizationValue has the same storage unit as the return value; the supplied value is taken as is and stored, i.e., it is assumed that is is already dedimensionalized; the dedimensionalizer function is stored. Definition at line 254 of file DedimensionalizedVariable.h. |
|
constructor Set the value to value; use default dedimensionalizer. the supplied value is taken as is and stored, i.e., it is assumed that is is already dedimensionalized; the dedimensionalizer function is stored. Definition at line 244 of file DedimensionalizedVariable.h. |
|
constructor with only dedimensionalizer function set the value to 0 (or equivalent) and store the dedimensionalizer function Definition at line 234 of file DedimensionalizedVariable.h. |
|
default constructor set the value to 0 (or equivalent) and set the dedimensionalizer function to the default value Definition at line 227 of file DedimensionalizedVariable.h. |
|
the default dedimensionalizing function returns an unnamed object; used if no dedimensionalizer is given by the user; does not use any of the parameters in DDP, the returned object contains unity. Definition at line 198 of file DedimensionalizedVariable.h. |
|
load contents of the dedimensionalized variable quantity object from xml code use this is when attempting to input the contents of the dedimensionalized variable quantity object through the Quantity ObjectFactory Definition at line 1100 of file DedimensionalizedVariable.h. |
|
inequality compares to a right hand side operand being a general quantity; compares the values in the standard unit; to check dimension, the standardization call is generated through a compile time check; this should handle generated transient quantities as rhs argument. The dedimensionalizer is not considered in comparison. Definition at line 763 of file DedimensionalizedVariable.h. |
|
inequality compares identical types; use value to retrieve the variabler value of the right hand side Variable and directly compare to _value. The dedimensionalizer is not considered in comparison. Definition at line 750 of file DedimensionalizedVariable.h. |
|
binary operator+ forwards action to operator+=; returns a locally created object new object and does not change the left hand side object of the + operation. Definition at line 634 of file DedimensionalizedVariable.h. |
|
unary operator+ returns a new object of same type and same value. Definition at line 617 of file DedimensionalizedVariable.h. |
|
operator+= specialization for two quantities from different parent quantities where the second is NOT a generated quantity; should never compile, but rather yield a DimensionError<true> compiler error message. Return is only for syntactic correctness. Definition at line 534 of file DedimensionalizedVariable.h. |
|
operator+= can be chained as in a += b += c; for a right hand side operand which is a generated quantity having a generic unit and the same dimension as the left hand side operand, i.e. is dimensionless; value of both operands recalculated into standard unit; reverse standardization of the result before storing in _value is not necessary, since DedimensionalizedVariable has a reverse standardization factor of unity. The dedimensionalizer of the added object is discarded. Definition at line 514 of file DedimensionalizedVariable.h. |
|
operator+= can be chained as in a += b += c; for two identical DedimensionalizedVariables; dimension is not checked, since the above ensures that they must be the same; only a single storage unit is defined for DedimensionalizedVariable; thus, no recalculation is necessary; the left hand side object can not be a generated quantity object, thus, no check is necessary as in the case of Variable. Definition at line 495 of file DedimensionalizedVariable.h. |
|
forwards action to operator+=; returns a locally created object new object and does not change the left hand side object of the + operation. Definition at line 662 of file DedimensionalizedVariable.h. |
|
unary operator- returns a new object of same type and same value with changed sign. Definition at line 623 of file DedimensionalizedVariable.h. |
|
operator-= can be chained as in a -= b -= c; for two identical DedimensionalizedVariables; dimension is not checked, since the above ensures that they must be the same; only a single storage unit is defined for DedimensionalizedVariable; thus, no recalculation is necessary; the left hand side object can not be a generated quantity object, thus, no check is necessary as in the case of Variable. Definition at line 553 of file DedimensionalizedVariable.h. |
|
equality compares to a right hand side operand being a general quantity; compares the values in the standard unit; to check dimension, the standardization call is generated through a compile time check; this should handle generated transient quantities as rhs argument. The dedimensionalizer is not considered in comparison. Definition at line 734 of file DedimensionalizedVariable.h. |
|
equality compares identical types; use value to retrieve the variable value of the right hand side Variable and directly compare to _value. The dedimensionalizer is not considered in comparison. Definition at line 721 of file DedimensionalizedVariable.h. |
|
print the variable used if the variable is placed to the left of operator>>; calls print_value () indirectly through Quantity<>::print, thus including name and symbol of quantity if requested. Definition at line 1044 of file DedimensionalizedVariable.h. |
|
store the value and unit of the variable in a std::string converts to a string by template Conversion Definition at line 1035 of file DedimensionalizedVariable.h. |
|
print the value and the unit of the dedimensionalized variable places these items on the ostream os and returns the reference to the os object, thus allowing chaining of operator<< calls; the unit must be DedimensionalizedUnity. Definition at line 1028 of file DedimensionalizedVariable.h. References unit::NonPrefixable< BT, U >::Symbol(). |
|
save contents of the dedimensionalized variable quantity object as xml this should be used when attempting to output the contents of the dedimensionalized variable quantity object in xml form, which can later be read without knowledge of the object's type Definition at line 1088 of file DedimensionalizedVariable.h. |
|
return the value in the standard unit; The stored _value is returned; recalculation is not necessary. Definition at line 417 of file DedimensionalizedVariable.h. |
|
return the storage unit name; the name is interrogated from DedimensionalizedUnity; static access. Definition at line 481 of file DedimensionalizedVariable.h. References unit::NonPrefixable< BT, U >::Name(). |
|
return the storage unit name; the name is interrogated from DedimensionalizedUnity; dynamic access. Definition at line 475 of file DedimensionalizedVariable.h. References unit::NonPrefixable< BT, U >::Name(). |
|
return the storage unit symbol; the symbol is interrogated from DedimensionalizedUnity; static access. Definition at line 469 of file DedimensionalizedVariable.h. References unit::NonPrefixable< BT, U >::Symbol(). |
|
return the storage unit symbol; the symbol is interrogated from DedimensionalizedUnity; dynamic access. Definition at line 463 of file DedimensionalizedVariable.h. References unit::NonPrefixable< BT, U >::Symbol(). |
|
return the value in DedimensionalizedUnity The stored _value is returned; since DedimensionalizedUnity is the only unit and the standardization factor is unity, no recalculation is necessary. Definition at line 424 of file DedimensionalizedVariable.h. References unit::DedimensionalizedUnity. |
|
return the value in the storage unit; The stored _value is returned without recalculation. Definition at line 411 of file DedimensionalizedVariable.h. |
|
the (de)dedimensionalizing functor object the _dedimensionalizer object is a functor which returns an object to be used to perform the dedimensionalization of an object of type V (by division) or the redimensionalization of the internally stored value into an object of type V. Thus, _dedimensionalizer stores the recipe how to (de)dimensionalize the value stored in the DedimensionalizedVariable object. Definition at line 213 of file DedimensionalizedVariable.h. |
|
the default dedimensionalizing functor initialized outside of class to defaultDedimensionalizer Definition at line 203 of file DedimensionalizedVariable.h. |
|
the value of the Variable in the storage unit this data member is private, and can only be accessed through the member functions value (); this is the dedimensionalized value. Definition at line 220 of file DedimensionalizedVariable.h. |
|
the xml DedimensionalizedVariable tag define outside of class Definition at line 1126 of file DedimensionalizedVariable.h. |