Main Page | Class Hierarchy | Class List | File List

Mass.cc

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

Generated on Mon Feb 12 18:44:06 2007 for PhysicalQuantities by doxygen 1.3.6