Class SBDQuantityDivision#
template <typename Quantity1, typename Quantity2>
ClassList > SBDQuantityDivision
This template class is used to compute the division of two quantity types. More...
#include <SBDQuantityDivision.hpp>
Public Types#
Type | Name |
---|---|
typedef SBDQuantityType< SBDQuantityUnitType< typename Quantity1::UnitType::SystemType,((Quantity1::UnitType::exponent1 - Quantity2::UnitType::exponent1) !=0 ?(Quantity1::UnitType::exponent1 !=0 ? Quantity1::UnitType::scale1 :(Quantity2::UnitType::exponent1 !=0 ? Quantity2::UnitType::scale1 :0)) :0), Quantity1::UnitType::exponent1 - Quantity2::UnitType::exponent1,((Quantity1::UnitType::exponent2 - Quantity2::UnitType::exponent2) !=0 ?(Quantity1::UnitType::exponent2 !=0 ? Quantity1::UnitType::scale2 :(Quantity2::UnitType::exponent2 !=0 ? Quantity2::UnitType::scale2 :0)) :0), Quantity1::UnitType::exponent2 - Quantity2::UnitType::exponent2,((Quantity1::UnitType::exponent3 - Quantity2::UnitType::exponent3) !=0 ?(Quantity1::UnitType::exponent3 !=0 ? Quantity1::UnitType::scale3 :(Quantity2::UnitType::exponent3 !=0 ? Quantity2::UnitType::scale3 :0)) :0), Quantity1::UnitType::exponent3 - Quantity2::UnitType::exponent3,((Quantity1::UnitType::exponent4 - Quantity2::UnitType::exponent4) !=0 ?(Quantity1::UnitType::exponent4 !=0 ? Quantity1::UnitType::scale4 :(Quantity2::UnitType::exponent4 !=0 ? Quantity2::UnitType::scale4 :0)) :0), Quantity1::UnitType::exponent4 - Quantity2::UnitType::exponent4,((Quantity1::UnitType::exponent5 - Quantity2::UnitType::exponent5) !=0 ?(Quantity1::UnitType::exponent5 !=0 ? Quantity1::UnitType::scale5 :(Quantity2::UnitType::exponent5 !=0 ? Quantity2::UnitType::scale5 :0)) :0), Quantity1::UnitType::exponent5 - Quantity2::UnitType::exponent5,((Quantity1::UnitType::exponent6 - Quantity2::UnitType::exponent6) !=0 ?(Quantity1::UnitType::exponent6 !=0 ? Quantity1::UnitType::scale6 :(Quantity2::UnitType::exponent6 !=0 ? Quantity2::UnitType::scale6 :0)) :0), Quantity1::UnitType::exponent6 - Quantity2::UnitType::exponent6,((Quantity1::UnitType::exponent7 - Quantity2::UnitType::exponent7) !=0 ?(Quantity1::UnitType::exponent7 !=0 ? Quantity1::UnitType::scale7 :(Quantity2::UnitType::exponent7 !=0 ? Quantity2::UnitType::scale7 :0)) :0), Quantity1::UnitType::exponent7 - Quantity2::UnitType::exponent7 >, typename Quantity1::ValueType > | Type |
Detailed Description#
Template parameters:
Quantity1
The first quantity typeQuantity2
The second quantity type
This template is used to define the division of two quantity types.
// declare a variable in grams per mole
SBQuantityDivision<SBQuantity::gram,SBQuantity::mole>::Type d;
The typedef Type
is the quantity type of the division of the two quantity types Quantity1
and Quantity2
.
Please refer to the description of SAMSON's unit system for more information.
Short name: SBQuantityDivision
See also: SAMSON's unit system
Public Types Documentation#
typedef Type#
typedef SBDQuantityType< SBDQuantityUnitType< typename Quantity1::UnitType::SystemType, ((Quantity1::UnitType::exponent1 - Quantity2::UnitType::exponent1) != 0 ? (Quantity1::UnitType::exponent1 != 0 ? Quantity1::UnitType::scale1 : (Quantity2::UnitType::exponent1 != 0 ? Quantity2::UnitType::scale1 : 0)) : 0), Quantity1::UnitType::exponent1 - Quantity2::UnitType::exponent1, ((Quantity1::UnitType::exponent2 - Quantity2::UnitType::exponent2) != 0 ? (Quantity1::UnitType::exponent2 != 0 ? Quantity1::UnitType::scale2 : (Quantity2::UnitType::exponent2 != 0 ? Quantity2::UnitType::scale2 : 0)) : 0), Quantity1::UnitType::exponent2 - Quantity2::UnitType::exponent2, ((Quantity1::UnitType::exponent3 - Quantity2::UnitType::exponent3) != 0 ? (Quantity1::UnitType::exponent3 != 0 ? Quantity1::UnitType::scale3 : (Quantity2::UnitType::exponent3 != 0 ? Quantity2::UnitType::scale3 : 0)) : 0), Quantity1::UnitType::exponent3 - Quantity2::UnitType::exponent3, ((Quantity1::UnitType::exponent4 - Quantity2::UnitType::exponent4) != 0 ? (Quantity1::UnitType::exponent4 != 0 ? Quantity1::UnitType::scale4 : (Quantity2::UnitType::exponent4 != 0 ? Quantity2::UnitType::scale4 : 0)) : 0), Quantity1::UnitType::exponent4 - Quantity2::UnitType::exponent4, ((Quantity1::UnitType::exponent5 - Quantity2::UnitType::exponent5) != 0 ? (Quantity1::UnitType::exponent5 != 0 ? Quantity1::UnitType::scale5 : (Quantity2::UnitType::exponent5 != 0 ? Quantity2::UnitType::scale5 : 0)) : 0), Quantity1::UnitType::exponent5 - Quantity2::UnitType::exponent5, ((Quantity1::UnitType::exponent6 - Quantity2::UnitType::exponent6) != 0 ? (Quantity1::UnitType::exponent6 != 0 ? Quantity1::UnitType::scale6 : (Quantity2::UnitType::exponent6 != 0 ? Quantity2::UnitType::scale6 : 0)) : 0), Quantity1::UnitType::exponent6 - Quantity2::UnitType::exponent6, ((Quantity1::UnitType::exponent7 - Quantity2::UnitType::exponent7) != 0 ? (Quantity1::UnitType::exponent7 != 0 ? Quantity1::UnitType::scale7 : (Quantity2::UnitType::exponent7 != 0 ? Quantity2::UnitType::scale7 : 0)) : 0), Quantity1::UnitType::exponent7 - Quantity2::UnitType::exponent7 >, typename Quantity1::ValueType > Type;