Main Page | Class Hierarchy | Class List | File List

FaradayConstant.h

Go to the documentation of this file.
00001 
00008 /* Copyright (C) 2002 - 2006, Bernd Speiser */
00009 
00010 /* This file is part of Quantities.
00011 
00012 PhysicalQuantities is free software; you can redistribute it and/or
00013 modify it under the terms of the GNU General Public License
00014 as published by the Free Software Foundation; either version 2
00015 of the License, or (at your option) any later version.
00016 
00017 PhysicalQuantities is distributed in the hope that it will be useful,
00018 but WITHOUT ANY WARRANTY; without even the implied warranty of
00019 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00020 GNU General Public License for more details.
00021   
00022 You should have received a copy of the GNU General Public License
00023 along with this program; if not, write to the Free Software
00024 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
00025 02111-1307, USA.
00026 */
00027 
00028 #ifndef _FaradayConstant_h
00029 #define _FaradayConstant_h
00030 
00031 #include "Quantity/UniqueConstant.h"
00032 
00033 #include "PhysicalQuantities/AmountOfSubstance.h"
00034 #include "PhysicalQuantities/ElectricCharge.h"
00035 
00036 namespace quantity {
00037   namespace faradayConstant {
00038 
00039 /* FaradayConstant dimension */
00040 typedef BSUtilities::Rational<0> LE;
00041 typedef BSUtilities::Rational<0> M;
00042 typedef BSUtilities::Rational<1> TI;
00043 typedef BSUtilities::Rational<1> E;
00044 typedef BSUtilities::Rational<0> TE;
00045 typedef BSUtilities::Rational<-1> A;
00046 typedef BSUtilities::Rational<0> LU;
00047 
00048 typedef dimension::Dimension<LE, M, TI, E, TE, A, LU> Dimension;
00049 
00051 class Unit;
00052 
00053 /* the CoulombPerMole and prefixed variants */
00054 
00055 typedef LOKI_TYPELIST_2(electricCharge::Coulomb, 
00056                       electricCharge::MilliCoulomb) ElectricChargeList;
00057 
00058 typedef unit::ComposeElement<Unit, 
00059    ElectricChargeList, BSUtilities::Rational<1> > ElectricChargeElement;
00060 
00061 typedef LOKI_TYPELIST_2(amountOfSubstance::Mole, 
00062                    amountOfSubstance::MilliMole) AmountOfSubstanceList;
00063 
00064 typedef unit::ComposeElement<Unit, 
00065   AmountOfSubstanceList, BSUtilities::Rational<-1> > 
00066                                                AmountOfSubstanceElement;
00067 
00068 typedef 
00069   unit::ComposeBase<Unit, 
00070     LOKI_TYPELIST_2(ElectricChargeElement, AmountOfSubstanceElement)>
00071                                             FaradayConstantComposedUnit;
00072 
00073 typedef unit::Composed<FaradayConstantComposedUnit, 
00074   LOKI_TYPELIST_2(electricCharge::Coulomb, 
00075                               amountOfSubstance::Mole)> CoulombPerMole;
00076 typedef unit::Composed<FaradayConstantComposedUnit, 
00077   LOKI_TYPELIST_2(electricCharge::Coulomb, 
00078                     amountOfSubstance::MilliMole)> CoulombPerMilliMole;
00079 
00080 
00082 typedef LOKI_TYPELIST_2(CoulombPerMole, CoulombPerMilliMole) Units;
00083 
00084 /* FaradayConstant quantity */
00085 
00086 typedef Quantity<Dimension, Unit, Units, CoulombPerMole> Quantity;
00087 
00088   }
00089 
00090 typedef Loki::SingletonHolder<UniqueConstant
00091                          <faradayConstant::Quantity> > FaradayConstant;
00092 
00093 #define FARADAYCONSTANT FaradayConstant::Instance()
00094 
00095 }
00096 
00097 #endif /* _FaradayConstant_h */

Generated on Mon Feb 12 18:48:49 2007 for PhysicalQuantities by doxygen 1.3.6