Prefix.cc

Go to the documentation of this file.
00001 
00005 /* Copyright (C) 2002 - 2009, Bernd Speiser */
00006 /* This file is part of Quantity.
00007 
00008 Quantity is free software; you can redistribute it and/or
00009 modify it under the terms of the GNU General Public License
00010 as published by the Free Software Foundation; either version 2
00011 of the License, or (at your option) any later version.
00012 
00013 Quantity is distributed in the hope that it will be useful,
00014 but WITHOUT ANY WARRANTY; without even the implied warranty of
00015 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016 GNU General Public License for more details.
00017   
00018 You should have received a copy of the GNU General Public License
00019 along with this program; if not, write to the Free Software
00020 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
00021 02111-1307, USA.
00022 */
00023 
00024 #ifndef _Prefix_cc
00025 #define _Prefix_cc
00026 
00027 // Quantity includes
00028 #include "Quantity/Prefix.h"
00029 
00030 namespace unit {
00031 
00033 template<> const double No::Factor = 1.0;
00034 template<> const std::string No::Name = "";
00035 template<> const std::string No::Symbol = "";
00036 
00038 template<> const double Deci::Factor = 1.0e-1; 
00039 template<> const std::string Deci::Name = "deci"; 
00040 template<> const std::string Deci::Symbol = "d";
00041 
00043 template<> const double Centi::Factor = 1.0e-2; 
00044 template<> const std::string Centi::Name = "centi";
00045 template<> const std::string Centi::Symbol = "c";
00046 
00048 template<> const double Milli::Factor = 1.0e-3; 
00049 template<> const std::string Milli::Name = "milli";
00050 template<> const std::string Milli::Symbol = "m";
00051 
00053 template<> const double Micro::Factor = 1.0e-6; 
00054 template<> const std::string Micro::Name = "micro";
00055 template<> const std::string Micro::Symbol = "u"; 
00056 
00058 template<> const double Nano::Factor = 1.0e-9; 
00059 template<> const std::string Nano::Name = "nano"; 
00060 template<> const std::string Nano::Symbol = "n";
00061 
00063 template<> const double Pico::Factor = 1.0e-12;
00064 template<> const std::string Pico::Name = "pico"; 
00065 template<> const std::string Pico::Symbol = "p";
00066 
00068 template<> const double Femto::Factor = 1.0e-15;
00069 template<> const std::string Femto::Name = "femto";
00070 template<> const std::string Femto::Symbol = "f";
00071 
00073 template<> const double Atto::Factor = 1.0e-18;
00074 template<> const std::string Atto::Name = "atto";
00075 template<> const std::string Atto::Symbol = "a";
00076 
00078 template<> const double Zepto::Factor = 1.0e-21;
00079 template<> const std::string Zepto::Name = "zepto";
00080 template<> const std::string Zepto::Symbol = "z";
00081 
00083 template<> const double Yocto::Factor = 1.0e-24;
00084 template<> const std::string Yocto::Name = "yocto";
00085 template<> const std::string Yocto::Symbol = "y";
00086 
00088 template<> const double Deca::Factor = 1.0e1;
00089 template<> const std::string Deca::Name = "deca";
00090 template<> const std::string Deca::Symbol = "da";
00091 
00093 template<> const double Hecto::Factor = 1.0e2;
00094 template<> const std::string Hecto::Name = "hecto";
00095 template<> const std::string Hecto::Symbol = "h";
00096 
00098 template<> const double Kilo::Factor = 1.0e3;
00099 template<> const std::string Kilo::Name = "kilo";
00100 template<> const std::string Kilo::Symbol = "k";
00101 
00103 template<> const double Mega::Factor = 1.0e6;
00104 template<> const std::string Mega::Name = "Mega";
00105 template<> const std::string Mega::Symbol = "M";
00106 
00108 template<> const double Giga::Factor = 1.0e9;
00109 template<> const std::string Giga::Name = "Giga";
00110 template<> const std::string Giga::Symbol = "G";
00111 
00113 template<> const double Tera::Factor = 1.0e12;
00114 template<> const std::string Tera::Name = "Tera";
00115 template<> const std::string Tera::Symbol = "T";
00116 
00118 template<> const double Peta::Factor = 1.0e15;
00119 template<> const std::string Peta::Name = "Peta";
00120 template<> const std::string Peta::Symbol = "P";
00121 
00123 template<> const double Exa::Factor = 1.0e18;
00124 template<> const std::string Exa::Name = "Exa";
00125 template<> const std::string Exa::Symbol = "E";
00126 
00128 template<> const double Zetta::Factor = 1.0e21;
00129 template<> const std::string Zetta::Name = "Zetta";
00130 template<> const std::string Zetta::Symbol = "Z";
00131 
00133 template<> const double Yotta::Factor = 1.0e24;
00134 template<> const std::string Yotta::Name = "Yotta";
00135 template<> const std::string Yotta::Symbol = "Y";
00136 
00137 
00138 /* explicit instantiations of Prefix types */
00139 
00140 template class Prefix<NoPrefix>;
00141 
00142 template class Prefix<DeciPrefix>;
00143 
00144 template class Prefix<CentiPrefix>;
00145 
00146 template class Prefix<MilliPrefix>;
00147 
00148 template class Prefix<MicroPrefix>;
00149 
00150 template class Prefix<NanoPrefix>;
00151 
00152 template class Prefix<PicoPrefix>;
00153 
00154 template class Prefix<FemtoPrefix>;
00155 
00156 template class Prefix<AttoPrefix>;
00157 
00158 template class Prefix<ZeptoPrefix>;
00159 
00160 template class Prefix<YoctoPrefix>;
00161 
00162 template class Prefix<DecaPrefix>;
00163 
00164 template class Prefix<HectoPrefix>;
00165 
00166 template class Prefix<KiloPrefix>;
00167 
00168 template class Prefix<MegaPrefix>;
00169 
00170 template class Prefix<GigaPrefix>;
00171 
00172 template class Prefix<TeraPrefix>;
00173 
00174 template class Prefix<PetaPrefix>;
00175 
00176 template class Prefix<ExaPrefix>;
00177 
00178 template class Prefix<ZettaPrefix>;
00179 
00180 template class Prefix<YottaPrefix>;
00181 
00182 }
00183 
00184 #endif /* _Prefix_cc */

Generated on Mon Jul 27 15:55:45 2009 for Quantities by  doxygen 1.5.3