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

AmountOfSubstance.h

Go to the documentation of this file.
00001 
00007 /* Copyright (C) 2002-2004, Bernd Speiser */
00008 
00009 /* This file is part of Quantities.
00010 
00011 PhysicalQuantities is free software; you can redistribute it and/or
00012 modify it under the terms of the GNU General Public License
00013 as published by the Free Software Foundation; either version 2
00014 of the License, or (at your option) any later version.
00015 
00016 PhysicalQuantities is distributed in the hope that it will be useful,
00017 but WITHOUT ANY WARRANTY; without even the implied warranty of
00018 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00019 GNU General Public License for more details.
00020   
00021 You should have received a copy of the GNU General Public License
00022 along with this program; if not, write to the Free Software
00023 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
00024 02111-1307, USA.
00025 */
00026 
00027 #ifndef _AmountOfSubstance_h
00028 #define _AmountOfSubstance_h
00029 
00030 #include "Quantity/Variable.h"
00031 #include "Quantity/Constant.h"
00032 #include "Quantity/QuantityCluster.h"
00033 
00034 namespace Quantities {
00035 
00036 /* AmountOfSubstance dimension */
00037 typedef BSUtilities::Rational<0> AmountOfSubstance_LE;
00038 typedef BSUtilities::Rational<0> AmountOfSubstance_M;
00039 typedef BSUtilities::Rational<0> AmountOfSubstance_TI;
00040 typedef BSUtilities::Rational<0> AmountOfSubstance_E;
00041 typedef BSUtilities::Rational<0> AmountOfSubstance_TE;
00042 typedef BSUtilities::Rational<1> AmountOfSubstance_A;
00043 typedef BSUtilities::Rational<0> AmountOfSubstance_LU;
00044 class AmountOfSubstanceGroup
00045   {
00046     public:
00047       typedef TYPELIST_7(AmountOfSubstance_LE, AmountOfSubstance_M, 
00048                          AmountOfSubstance_TI, AmountOfSubstance_E,
00049                          AmountOfSubstance_TE, AmountOfSubstance_A, 
00050                                             AmountOfSubstance_LU) DimTL;
00051   };
00052 
00053   namespace AmountOfSubstanceUnits {
00054 
00055 /* declaration of AmountOfSubstance unit base class */
00056 
00057 typedef Units::Unit<AmountOfSubstanceGroup> AmountOfSubstanceUnit;
00058 
00059 /* declaration of AmountOfSubstance units */
00060 class MoleUnits;
00061 
00062 /* the mole and prefixed moles */
00063 
00064 typedef Units::Prefixable<AmountOfSubstanceGroup, MoleUnits> Moles;
00065 
00066 typedef Units::Prefixed<Moles> Mole;
00067 typedef Units::Prefixed<Moles, Units::Milli> MilliMole;
00068 
00069 typedef Moles::Units AmountOfSubstanceUnits;
00070 
00071 /* declare some abbreviated AmountOfSubstance  units */
00072 
00073 typedef Mole mol;
00074 typedef MilliMole mmol;
00075 
00076   }
00077 
00078 /* declaration of AmountOfSubstance dimension */
00079 
00080 typedef Dimensions::Dimension<AmountOfSubstanceGroup> 
00081                                              AmountOfSubstanceDimension;
00082 
00083 /* AmountOfSubstance Quantity */
00084 
00085 typedef Quantity<AmountOfSubstanceGroup, 
00086   AmountOfSubstanceUnits::AmountOfSubstanceUnits,
00087               AmountOfSubstanceUnits::Mole> AmountOfSubstanceQuantities;
00088 
00089 typedef Variable<AmountOfSubstanceQuantities> AmountOfSubstance;
00090 typedef Constant<AmountOfSubstanceQuantities> AmountOfSubstanceConstant;
00091 
00092 typedef VariableVector<AmountOfSubstanceQuantities> 
00093                                                 AmountOfSubstanceVector;
00094 
00095 }
00096 
00097 #endif /* _AmountOfSubstance_h */

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