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

Mass.cc

Go to the documentation of this file.
00001 
00005 /* Copyright (C) 2002-2004, Bernd Speiser */
00006 
00007 /* This file is part of PhysicalQuantities.
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 _Mass_cc
00026 #define _Mass_cc
00027 
00028 #include "Quantity/Variable.h"
00029 
00030 #include "PhysicalQuantities/Mass.h"
00031 
00032 namespace Quantities {
00033   namespace MassUnits {
00034 
00035 /* definition of Mass units */
00036 /* the gram and prefixed grams; the SI unit is the kilogramn */
00037 
00038 template<> const double Grams::StandardRatio = 0.001;
00039 template<> const std::string Grams::Basename = "gram";
00040 template<> const std::string Grams::Basesymbol = "g";
00041 template<> const bool Grams::SI = true;
00042 template<> const bool Grams::Exact = true;
00043 
00044 /* the electron mass */
00045 
00046 template<> const double ElectronMass::StandardRatio = 9.10939e-31;
00047 template<> const std::string ElectronMass::Namestring = "electron mass";
00048 template<> const std::string ElectronMass::Symbolstring = "m_e";
00049 template<> const bool ElectronMass::SI = false;
00050 template<> const bool ElectronMass::Exact = false;
00051 
00052 /* the Dalton */
00053 
00054 template<> const double Dalton::StandardRatio = 1.660540e-27;
00055 template<> const std::string Dalton::Namestring = "dalton";
00056 template<> const std::string Dalton::Symbolstring = "Da";
00057 template<> const bool Dalton::SI = false;
00058 template<> const bool Dalton::Exact = false;
00059 
00060 /* the u mass unit */
00061 
00062 template<> const double U::StandardRatio = 1.660540e-27;
00063 template<> const std::string U::Namestring = "u";
00064 template<> const std::string U::Symbolstring = "u";
00065 template<> const bool U::SI = false;
00066 template<> const bool U::Exact = false;
00067 
00068 /* the gamma */
00069 
00070 template<> const double Gamma::StandardRatio = 1.0e-9;
00071 template<> const std::string Gamma::Namestring = "gamma";
00072 template<> const std::string Gamma::Symbolstring = "gamma";
00073 template<> const bool Gamma::SI = false;
00074 template<> const bool Gamma::Exact = true;
00075 
00076 /* the tonne */
00077 
00078 template<> const double Tonnes::StandardRatio = 1000.;
00079 template<> const std::string Tonnes::Basename = "Tonne";
00080 template<> const std::string Tonnes::Basesymbol = "t";
00081 template<> const bool Tonnes::SI = false;
00082 template<> const bool Tonnes::Exact = true;
00083 
00084 /* the pound */
00085 
00086 template<> const double Pound::StandardRatio = 0.45359237;
00087 template<> const std::string Pound::Namestring = "pound";
00088 template<> const std::string Pound::Symbolstring = "lb";
00089 template<> const bool Pound::SI = false;
00090 template<> const bool Pound::Exact = true;
00091 
00092 /* the ounce */
00093 
00094 template<> const double Ounce::StandardRatio = 0.0283495;
00095 template<> const std::string Ounce::Namestring = "ounce";
00096 template<> const std::string Ounce::Symbolstring = "oz";
00097 template<> const bool Ounce::SI = false;
00098 template<> const bool Ounce::Exact = false;
00099 
00100 /* the troy ounce */
00101 
00102 template<> const double TroyOunce::StandardRatio = 0.0311035;
00103 template<> const std::string TroyOunce::Namestring = "troy ounce";
00104 template<> const std::string TroyOunce::Symbolstring = "oz (troy)";
00105 template<> const bool TroyOunce::SI = false;
00106 template<> const bool TroyOunce::Exact = false;
00107 
00108 /* the grain */
00109 
00110 template<> const double Grain::StandardRatio = 6.479891e-5;
00111 template<> const std::string Grain::Namestring = "grain";
00112 template<> const std::string Grain::Symbolstring = "gr";
00113 template<> const bool Grain::SI = false;
00114 template<> const bool Grain::Exact = true;
00115 
00116   }
00117 
00118 const std::string Name<MassQuantities>::String = "mass";
00119 const std::string Symbol<MassQuantities>::String = "m";
00120 
00121 }
00122 
00123 #endif /* _Mass_cc */

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