Main Page | Class Hierarchy | Class List | File List

Length.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 _Length_cc
00026 #define _Length_cc
00027 
00028 #include "Quantity/Variable.h"
00029 
00030 #include "PhysicalQuantities/Length.h"
00031 
00032 namespace quantity {
00033   namespace length {
00034 
00035 /* definition of Length units */
00036 /* the metre and prefixed metres */
00037 
00038 template<> const std::string Metres::Basename = "metre";
00039 template<> const std::string Metres::Basesymbol = "m";
00040 template<> const bool Metres::SI = true;
00041 
00042 /* the Bohr */
00043 
00044 template<> const std::string Bohr::Namestring  = "bohr";
00045 template<> const std::string Bohr::Symbolstring = "b";
00046 template<> const bool Bohr::SI = false;
00047 
00048 /* the Angstrom */
00049 
00050 template<> const std::string Angstrom::Namestring  = "angstrom";
00051 template<> const std::string Angstrom::Symbolstring = "A0";
00052 template<> const bool Angstrom::SI = false;
00053 
00054 /* the micron */
00055 
00056 template<> const std::string Micron::Namestring  = "micron";
00057 template<> const std::string Micron::Symbolstring = "mu";
00058 template<> const bool Micron::SI = false;
00059 
00060 /* the millimicron */
00061 
00062 template<> const std::string MilliMicron::Namestring  = "millimicron";
00063 template<> const std::string MilliMicron::Symbolstring = "mmu";
00064 template<> const bool MilliMicron::SI = false;
00065 
00066 /* the X */
00067 
00068 template<> const std::string X::Namestring  = "xunit";
00069 template<> const std::string X::Symbolstring = "X";
00070 template<> const bool X::SI = false;
00071 
00072 /* the Fermi */
00073 
00074 template<> const std::string Fermi::Namestring  = "fermi";
00075 template<> const std::string Fermi::Symbolstring = "f";
00076 template<> const bool Fermi::SI = false;
00077 
00078 /* the Inch */
00079 
00080 template<> const std::string Inch::Namestring  = "inch";
00081 template<> const std::string Inch::Symbolstring = "in";
00082 template<> const bool Inch::SI = false;
00083 
00084 /* the foot */
00085 
00086 template<> const std::string Foot::Namestring  = "foot";
00087 template<> const std::string Foot::Symbolstring = "ft";
00088 template<> const bool Foot::SI = false;
00089 
00090 /* the Yard */
00091 
00092 template<> const std::string Yard::Namestring  = "yard";
00093 template<> const std::string Yard::Symbolstring = "yd";
00094 template<> const bool Yard::SI = false;
00095 
00096 /* the Mile */
00097 
00098 template<> const std::string Mile::Namestring  = "mile";
00099 template<> const std::string Mile::Symbolstring = "mi";
00100 template<> const bool Mile::SI = false;
00101 
00102 /* the nautical Mile */
00103 
00104 template<> const std::string NauticalMile::Namestring  = "nauticalmile";
00105 template<> const std::string NauticalMile::Symbolstring = "";
00106 template<> const bool NauticalMile::SI = false;
00107 
00108 /* the astronomical unit */
00109 
00110 template<> const std::string Astronomical::Namestring  
00111                                                    = "astronomicalunit";
00112 template<> const std::string Astronomical::Symbolstring = "AU";
00113 template<> const bool Astronomical::SI = false;
00114 
00115 /* the Parsec */
00116 
00117 template<> const std::string Parsec::Namestring  = "parsec";
00118 template<> const std::string Parsec::Symbolstring = "pc";
00119 template<> const bool Parsec::SI = false;
00120 
00121 /* the Lightyear */
00122 
00123 template<> const std::string LightYear::Namestring  = "lightyear";
00124 template<> const std::string LightYear::Symbolstring = "l.y.";
00125 template<> const bool LightYear::SI = false;
00126 
00127 /* the Lightsecond */
00128 
00129 template<> const std::string LightSecond::Namestring  = "lightsecond";
00130 template<> const std::string LightSecond::Symbolstring = "";
00131 template<> const bool LightSecond::SI = false;
00132 
00133 template<> const double Standard<Metres>::ratio = 1.0;
00134 template<> const bool Standard<Metres>::exact = true;
00135 
00136 template<> const double Standard<Bohr>::ratio = 5.29177e-11;
00137 template<> const bool Standard<Bohr>::exact = false;
00138 
00139 template<> const double Standard<Angstrom>::ratio = 1.0e-10;
00140 template<> const bool Standard<Angstrom>::exact = true;
00141 
00142 template<> const double Standard<Micron>::ratio = 1.0e-6;
00143 template<> const bool Standard<Micron>::exact = true;
00144 
00145 template<> const double Standard<MilliMicron>::ratio = 1.0e-9;
00146 template<> const bool Standard<MilliMicron>::exact = true;
00147 
00148 template<> const double Standard<X>::ratio = 1.002e-13;
00149 template<> const bool Standard<X>::exact = false;
00150 
00151 template<> const double Standard<Fermi>::ratio = 1.0e-15;
00152 template<> const bool Standard<Fermi>::exact = true;
00153 
00154 template<> const double Standard<Inch>::ratio = 2.54e-2;
00155 template<> const bool Standard<Inch>::exact = true;
00156 
00157 template<> const double Standard<Foot>::ratio = 0.3048;
00158 template<> const bool Standard<Foot>::exact = true;
00159 
00160 template<> const double Standard<Yard>::ratio = 0.9144;
00161 template<> const bool Standard<Yard>::exact = true;
00162 
00163 template<> const double Standard<Mile>::ratio = 1609.344;
00164 template<> const bool Standard<Mile>::exact = true;
00165 
00166 template<> const double Standard<NauticalMile>::ratio = 1852.;
00167 template<> const bool Standard<NauticalMile>::exact = true;
00168 
00169 template<> const double Standard<Astronomical>::ratio = 1.49600e11;
00170 template<> const bool Standard<Astronomical>::exact = true;
00171 
00172 template<> const double Standard<Parsec>::ratio = 3.08568e16;
00173 template<> const bool Standard<Parsec>::exact = false;
00174 
00175 template<> const double Standard<LightYear>::ratio = 9.460528e15;
00176 template<> const bool Standard<LightYear>::exact = false;
00177 
00178 template<> const double Standard<LightSecond>::ratio = 299792458.;
00179 template<> const bool Standard<LightSecond>::exact = true;
00180 
00181   }
00182 
00183 template<> const std::string Name<length::Quantity>::String = "length";
00184 template<> const std::string Symbol<length::Quantity>::String = "l";
00185 
00186 }
00187 
00188 #endif /* _Length_h */

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