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

HeterogeneousRateConstant.h

Go to the documentation of this file.
00001 
00005 /* Copyright (C) 2003-2004, Bernd Speiser */
00006 
00007 /* This file is part of Quantities.
00008 
00009 PhysicalQuantities is free software; you can redistribute it and/or
00010 modify it under the terms of the GNU General Public License
00011 as published by the Free Software Foundation; either version 2
00012 of the License, or (at your option) any later version.
00013 
00014 PhysicalQuantities is distributed in the hope that it will be useful,
00015 but WITHOUT ANY WARRANTY; without even the implied warranty of
00016 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017 GNU General Public License for more details.
00018   
00019 You should have received a copy of the GNU General Public License
00020 along with this program; if not, write to the Free Software
00021 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
00022 02111-1307, USA.
00023 */
00024 
00025 #ifndef _HeterogeneousRateConstant_h
00026 #define _HeterogeneousRateConstant_h
00027 
00028 #include "Quantity/Variable.h"
00029 #include "Quantity/Constant.h"
00030 #include "Quantity/QuantityCluster.h"
00031 
00032 #include "PhysicalQuantities/Length.h"
00033 #include "PhysicalQuantities/Time.h"
00034 
00035 namespace Quantities {
00036 
00037 /* HeterogeneousRateConstant dimension */
00038 typedef BSUtilities::Rational<1> HeterogeneousRateConstant_LE;
00039 typedef BSUtilities::Rational<0> HeterogeneousRateConstant_M; 
00040 typedef BSUtilities::Rational<-1> HeterogeneousRateConstant_TI;
00041 typedef BSUtilities::Rational<0> HeterogeneousRateConstant_E;
00042 typedef BSUtilities::Rational<0> HeterogeneousRateConstant_TE;
00043 typedef BSUtilities::Rational<0> HeterogeneousRateConstant_A;
00044 typedef BSUtilities::Rational<0> HeterogeneousRateConstant_LU;
00045 
00046 class HeterogeneousRateConstantGroup
00047   {
00048     public:
00049       typedef TYPELIST_7(HeterogeneousRateConstant_LE, 
00050                          HeterogeneousRateConstant_M, 
00051                          HeterogeneousRateConstant_TI, 
00052                          HeterogeneousRateConstant_E,
00053                          HeterogeneousRateConstant_TE, 
00054                          HeterogeneousRateConstant_A, 
00055                                     HeterogeneousRateConstant_LU) DimTL;
00056   };
00057 
00059   namespace HeterogeneousRateConstantUnits {
00060 
00061 /* declaration of HeterogeneousRateConstant unit base class */
00062 typedef Units::Unit<HeterogeneousRateConstantGroup> 
00063                                           HeterogeneousRateConstantUnit;
00064 
00065 /* the MetrePerSecond and prefixed variants */
00066 
00067 typedef TYPELIST_3(LengthUnits::Metre, LengthUnits::CentiMetre,
00068                                     LengthUnits::MilliMetre) LengthList;
00069 
00070 typedef 
00071   Units::CompoundElement<HeterogeneousRateConstantGroup, LengthList, 
00072                                BSUtilities::Rational<1> > LengthElement;
00073 
00074 typedef TYPELIST_3(TimeUnits::Second, TimeUnits::MilliSecond,
00075                                        TimeUnits::MicroSecond) TimeList;
00076 
00077 typedef Units::CompoundElement<HeterogeneousRateConstantGroup, TimeList,
00078                                 BSUtilities::Rational<-1> > TimeElement;
00079 
00080 typedef TYPELIST_2(LengthElement, TimeElement)
00081                                  HeterogeneousRateConstantCompoundList;
00082 typedef Units::Compound<HeterogeneousRateConstantGroup, 
00083   HeterogeneousRateConstantCompoundList> 
00084                                 HeterogeneousRateConstantCompoundUnits;
00085 
00086 typedef Units::Composed<HeterogeneousRateConstantCompoundUnits, 
00087       TYPELIST_2(LengthUnits::Metre, TimeUnits::Second)> MetrePerSecond;
00088 typedef Units::Composed<HeterogeneousRateConstantCompoundUnits, 
00089   TYPELIST_2(LengthUnits::CentiMetre, TimeUnits::Second)> 
00090                                                     CentiMetrePerSecond;
00091 
00093 typedef TYPELIST_2(MetrePerSecond, CentiMetrePerSecond)
00094                                          HeterogeneousRateConstantUnits;
00095 
00096   }
00097 
00098 
00099 /* declaration of HeterogeneousRateConstant dimension */
00100 
00101 typedef Dimensions::Dimension<HeterogeneousRateConstantGroup> 
00102                                      HeterogeneousRateConstantDimension;
00103 
00104 /* HeterogeneousRateConstant quantity */
00105 
00106 typedef Quantity<HeterogeneousRateConstantGroup,
00107   HeterogeneousRateConstantUnits::HeterogeneousRateConstantUnits,
00108     HeterogeneousRateConstantUnits::MetrePerSecond> 
00109                                     HeterogeneousRateConstantQuantities;
00110 
00111 typedef Variable<HeterogeneousRateConstantQuantities> 
00112                                               HeterogeneousRateConstant;
00113 typedef Constant<HeterogeneousRateConstantQuantities> 
00114                                       HeterogeneousRateConstantConstant;
00115 
00116 typedef VariableVector<HeterogeneousRateConstantQuantities> 
00117                                         HeterogeneousRateConstantVector;
00118 
00119 }
00120 
00121 #endif /* _HeterogeneousRateConstant_h */

Generated on Sun Jan 15 13:58:03 2006 for PhysicalQuantities by doxygen 1.3.6