00001
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #ifndef _HeterogeneousRateConstant_h
00028 #define _HeterogeneousRateConstant_h
00029
00030
00031 #include "Quantity/Variable.h"
00032 #include "Quantity/Constant.h"
00033 #include "Quantity/QuantityCluster.h"
00034 #include "PhysicalQuantities/Length.h"
00035 #include "PhysicalQuantities/Time.h"
00036
00037 namespace quantity {
00038 namespace heterogeneousRateConstant {
00039
00041 class Class;
00042
00044 class Unit;
00045
00046
00047
00048 typedef LOKI_TYPELIST_3(length::Metre, length::CentiMetre,
00049 length::MilliMetre) LengthList;
00050
00052 typedef
00053 unit::ComposeElement<Unit, LengthList,
00054 BSUtilities::Rational<1> > LengthElement;
00055
00056 typedef LOKI_TYPELIST_3(time::Second, time::MilliSecond,
00057 time::MicroSecond) TimeList;
00058
00060 typedef unit::ComposeElement<Unit, TimeList,
00061 BSUtilities::Rational<-1> > TimeElement;
00062
00063 typedef unit::ComposeBase<Unit,
00064 LOKI_TYPELIST_2(LengthElement, TimeElement)>
00065 HeterogeneousRateConstantComposedUnit;
00066
00067 typedef unit::Composed<HeterogeneousRateConstantComposedUnit,
00068 LOKI_TYPELIST_2(length::Metre, time::Second)> MetrePerSecond;
00069 typedef unit::Composed<HeterogeneousRateConstantComposedUnit,
00070 LOKI_TYPELIST_2(length::CentiMetre, time::Second)>
00071 CentiMetrePerSecond;
00072
00074 typedef LOKI_TYPELIST_2(MetrePerSecond, CentiMetrePerSecond) Units;
00075
00076
00077
00078 typedef Quantity<Class> Quantity;
00079
00080 class DerivedHeterogeneousRateConstant;
00081
00082 }
00083
00085
00087 template<typename ST>
00088 struct Standard<heterogeneousRateConstant::HeterogeneousRateConstantComposedUnit, ST>
00089 {
00090 static const ST ratio;
00091 static const bool exact;
00092 };
00093
00095 template<typename ST> const ST
00096 Standard<heterogeneousRateConstant::HeterogeneousRateConstantComposedUnit, ST>::ratio = 1.0;
00097
00099 template<typename ST> const bool
00100 Standard<heterogeneousRateConstant::HeterogeneousRateConstantComposedUnit, ST>::exact = true;
00101
00103 template<>
00104 struct QuantityTraits<heterogeneousRateConstant::Class>
00105 {
00106 typedef
00107 dimension::Dimension<BSUtilities::Rational<1>,
00108 BSUtilities::Rational<0>, BSUtilities::Rational<-1>,
00109 BSUtilities::Rational<0>, BSUtilities::Rational<0>,
00110 BSUtilities::Rational<0>, BSUtilities::Rational<0> > Dimension;
00111 typedef heterogeneousRateConstant::Unit UnitType;
00112 typedef heterogeneousRateConstant::Units UnitList;
00113 typedef heterogeneousRateConstant::MetrePerSecond DefaultUnit;
00114
00115 typedef heterogeneousRateConstant::DerivedHeterogeneousRateConstant DefaultDerivedQuantityType;
00116
00117 static const std::string NameString;
00118 static const std::string SymbolString;
00119
00120 };
00121
00122
00123 template<>
00124 struct DerivedQuantityTraits<heterogeneousRateConstant::Class,
00125 heterogeneousRateConstant::DerivedHeterogeneousRateConstant>
00126 {
00127 static const bool OverwriteName = false;
00128 static const bool OverwriteSymbol = false;
00129
00130 static const std::string NameString;
00131 static const std::string SymbolString;
00132
00133 };
00134
00135
00137 typedef Variable<heterogeneousRateConstant::Quantity> HeterogeneousRateConstant;
00138
00140 typedef Constant<heterogeneousRateConstant::Quantity> HeterogeneousRateConstantConstant;
00141
00143 typedef QuantityVector<Variable, heterogeneousRateConstant::Quantity> HeterogeneousRateConstantVector;
00144
00145 }
00146
00147 #endif