00001 00005 /* Copyright (C) 2002 - 2009, 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 // Quantity includes 00029 #include "PhysicalQuantities/Length.h" 00030 00031 namespace quantity { 00032 namespace length { 00033 00034 /* definition of Length units */ 00035 /* the metre and prefixed metres */ 00036 00037 template<> const std::string Metres::Basename = "metre"; 00038 template<> const std::string Metres::Basesymbol = "m"; 00039 template<> const bool Metres::SI = true; 00040 00041 /* the Bohr */ 00042 00043 template<> const std::string Bohr::Namestring = "bohr"; 00044 template<> const std::string Bohr::Symbolstring = "b"; 00045 template<> const bool Bohr::SI = false; 00046 00047 /* the Angstrom */ 00048 00049 template<> const std::string Angstrom::Namestring = "angstrom"; 00050 template<> const std::string Angstrom::Symbolstring = "A0"; 00051 template<> const bool Angstrom::SI = false; 00052 00053 /* the micron */ 00054 00055 template<> const std::string Micron::Namestring = "micron"; 00056 template<> const std::string Micron::Symbolstring = "mu"; 00057 template<> const bool Micron::SI = false; 00058 00059 /* the millimicron */ 00060 00061 template<> const std::string MilliMicron::Namestring = "millimicron"; 00062 template<> const std::string MilliMicron::Symbolstring = "mmu"; 00063 template<> const bool MilliMicron::SI = false; 00064 00065 /* the X */ 00066 00067 template<> const std::string X::Namestring = "xunit"; 00068 template<> const std::string X::Symbolstring = "X"; 00069 template<> const bool X::SI = false; 00070 00071 /* the Fermi */ 00072 00073 template<> const std::string Fermi::Namestring = "fermi"; 00074 template<> const std::string Fermi::Symbolstring = "f"; 00075 template<> const bool Fermi::SI = false; 00076 00077 /* the Inch */ 00078 00079 template<> const std::string Inch::Namestring = "inch"; 00080 template<> const std::string Inch::Symbolstring = "in"; 00081 template<> const bool Inch::SI = false; 00082 00083 /* the foot */ 00084 00085 template<> const std::string Foot::Namestring = "foot"; 00086 template<> const std::string Foot::Symbolstring = "ft"; 00087 template<> const bool Foot::SI = false; 00088 00089 /* the Yard */ 00090 00091 template<> const std::string Yard::Namestring = "yard"; 00092 template<> const std::string Yard::Symbolstring = "yd"; 00093 template<> const bool Yard::SI = false; 00094 00095 /* the Mile */ 00096 00097 template<> const std::string Mile::Namestring = "mile"; 00098 template<> const std::string Mile::Symbolstring = "mi"; 00099 template<> const bool Mile::SI = false; 00100 00101 /* the nautical Mile */ 00102 00103 template<> const std::string NauticalMile::Namestring = "nauticalmile"; 00104 template<> const std::string NauticalMile::Symbolstring = ""; 00105 template<> const bool NauticalMile::SI = false; 00106 00107 /* the astronomical unit */ 00108 00109 template<> const std::string Astronomical::Namestring 00110 = "astronomicalunit"; 00111 template<> const std::string Astronomical::Symbolstring = "AU"; 00112 template<> const bool Astronomical::SI = false; 00113 00114 /* the Parsec */ 00115 00116 template<> const std::string Parsec::Namestring = "parsec"; 00117 template<> const std::string Parsec::Symbolstring = "pc"; 00118 template<> const bool Parsec::SI = false; 00119 00120 /* the Lightyear */ 00121 00122 template<> const std::string LightYear::Namestring = "lightyear"; 00123 template<> const std::string LightYear::Symbolstring = "l.y."; 00124 template<> const bool LightYear::SI = false; 00125 00126 /* the Lightsecond */ 00127 00128 template<> const std::string LightSecond::Namestring = "lightsecond"; 00129 template<> const std::string LightSecond::Symbolstring = ""; 00130 template<> const bool LightSecond::SI = false; 00131 00132 } 00133 00134 const std::string QuantityTraits<length::Class>::NameString = "length"; 00135 const std::string QuantityTraits<length::Class>::SymbolString = "l"; 00136 00137 } 00138 00139 #endif /* _Length_h */