00001
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #ifndef _AvogadroConstant_h
00029 #define _AvogadroConstant_h
00030
00031
00032 #include "Quantities/Quantity/UniqueConstant.h"
00033 #include "Quantities/PhysicalQuantities/AmountOfSubstance.h"
00034
00035 namespace quantity {
00036 namespace avogadroConstant {
00037
00039 class Class;
00040
00042 class Unit;
00043
00044
00045
00046
00048 typedef unit::Component<amountOfSubstance::Units, BSUtilities::Rational<-1> >
00049 AmountOfSubstanceElement;
00050
00051 typedef
00052 unit::ComposeBase<Unit, Loki::Typelist<AmountOfSubstanceElement,
00053 Loki::NullType> > AvogadroConstantComposedUnit;
00054
00055 typedef unit::Composed<AvogadroConstantComposedUnit,
00056 Loki::Typelist<amountOfSubstance::Mole, Loki::NullType> > OnePerMole;
00057 typedef unit::Composed<AvogadroConstantComposedUnit,
00058 Loki::Typelist<amountOfSubstance::MilliMole, Loki::NullType> >
00059 OnePerMilliMole;
00060
00062 typedef Loki::Typelist<AvogadroConstantComposedUnit, Loki::NullType> Units;
00063
00064
00065
00066 typedef Quantity<Class> Quantity;
00067
00068 class DerivedAvogadroConstant;
00069
00070 }
00071
00073 template<>
00074 struct QuantityTraits<avogadroConstant::Class>
00075 {
00076 typedef
00077 dimension::Dimension<BSUtilities::Rational<0>,
00078 BSUtilities::Rational<0>, BSUtilities::Rational<0>,
00079 BSUtilities::Rational<0>, BSUtilities::Rational<0>,
00080 BSUtilities::Rational<-1>, BSUtilities::Rational<0> >
00081 Dimension;
00082 typedef avogadroConstant::Unit UnitType;
00083 typedef avogadroConstant::Units UnitList;
00084 typedef avogadroConstant::OnePerMole DefaultUnit;
00085
00086 typedef avogadroConstant::DerivedAvogadroConstant
00087 DefaultDerivedQuantityType;
00088
00089 static const std::string NameString ();
00090 static const std::string SymbolString ();
00091
00092 };
00093
00094
00095 template<>
00096 struct DerivedQuantityTraits<avogadroConstant::Class,
00097 avogadroConstant::DerivedAvogadroConstant>
00098 {
00099 static const bool OverwriteName = false;
00100 static const bool OverwriteSymbol = false;
00101
00102 static const std::string NameString ();
00103 static const std::string SymbolString ();
00104
00105 };
00106
00108 typedef Loki::SingletonHolder<UniqueConstant
00109 <avogadroConstant::Quantity> > AvogadroConstant;
00110
00112 #define AVOGADROCONSTANT AvogadroConstant::Instance()
00113
00114 }
00115
00116 #endif