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

UnitPrefix.cc

Go to the documentation of this file.
00001 
00005 /* Copyright (C) 2002-2004, 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 _UnitPrefix_cc
00025 #define _UnitPrefix_cc
00026 
00027 #include "Quantity/UnitPrefix.h"
00028 
00029 namespace Units {
00030 
00032 template<> const double No::factor = 1.0;
00033 template<> const std::string No::Name = "";
00034 template<> const std::string No::Symbol = "";
00035 
00037 template<> const double Deci::factor = 1.0e-1; 
00038 template<> const std::string Deci::Name = "deci"; 
00039 template<> const std::string Deci::Symbol = "d";
00040 
00042 template<> const double Centi::factor = 1.0e-2; 
00043 template<> const std::string Centi::Name = "centi";
00044 template<> const std::string Centi::Symbol = "c";
00045 
00047 template<> const double Milli::factor = 1.0e-3; 
00048 template<> const std::string Milli::Name = "milli";
00049 template<> const std::string Milli::Symbol = "m";
00050 
00052 template<> const double Micro::factor = 1.0e-6; 
00053 template<> const std::string Micro::Name = "micro";
00054 template<> const std::string Micro::Symbol = "mu"; 
00055 
00057 template<> const double Nano::factor = 1.0e-9; 
00058 template<> const std::string Nano::Name = "nano"; 
00059 template<> const std::string Nano::Symbol = "n";
00060 
00062 template<> const double Pico::factor = 1.0e-12;
00063 template<> const std::string Pico::Name = "pico"; 
00064 template<> const std::string Pico::Symbol = "p";
00065 
00067 template<> const double Femto::factor = 1.0e-15;
00068 template<> const std::string Femto::Name = "femto";
00069 template<> const std::string Femto::Symbol = "f";
00070 
00072 template<> const double Atto::factor = 1.0e-18;
00073 template<> const std::string Atto::Name = "atto";
00074 template<> const std::string Atto::Symbol = "a";
00075 
00077 template<> const double Zepto::factor = 1.0e-21;
00078 template<> const std::string Zepto::Name = "zepto";
00079 template<> const std::string Zepto::Symbol = "z";
00080 
00082 template<> const double Yocto::factor = 1.0e-24;
00083 template<> const std::string Yocto::Name = "yocto";
00084 template<> const std::string Yocto::Symbol = "y";
00085 
00087 template<> const double Deca::factor = 1.0e1;
00088 template<> const std::string Deca::Name = "deca";
00089 template<> const std::string Deca::Symbol = "da";
00090 
00092 template<> const double Hecto::factor = 1.0e2;
00093 template<> const std::string Hecto::Name = "hecto";
00094 template<> const std::string Hecto::Symbol = "h";
00095 
00097 template<> const double Kilo::factor = 1.0e3;
00098 template<> const std::string Kilo::Name = "kilo";
00099 template<> const std::string Kilo::Symbol = "k";
00100 
00102 template<> const double Mega::factor = 1.0e6;
00103 template<> const std::string Mega::Name = "Mega";
00104 template<> const std::string Mega::Symbol = "M";
00105 
00107 template<> const double Giga::factor = 1.0e9;
00108 template<> const std::string Giga::Name = "Giga";
00109 template<> const std::string Giga::Symbol = "G";
00110 
00112 template<> const double Tera::factor = 1.0e12;
00113 template<> const std::string Tera::Name = "Tera";
00114 template<> const std::string Tera::Symbol = "T";
00115 
00117 template<> const double Peta::factor = 1.0e15;
00118 template<> const std::string Peta::Name = "Peta";
00119 template<> const std::string Peta::Symbol = "P";
00120 
00122 template<> const double Exa::factor = 1.0e18;
00123 template<> const std::string Exa::Name = "Exa";
00124 template<> const std::string Exa::Symbol = "E";
00125 
00127 template<> const double Zetta::factor = 1.0e21;
00128 template<> const std::string Zetta::Name = "Zetta";
00129 template<> const std::string Zetta::Symbol = "Z";
00130 
00132 template<> const double Yotta::factor = 1.0e24;
00133 template<> const std::string Yotta::Name = "Yotta";
00134 template<> const std::string Yotta::Symbol = "Y";
00135 
00136 
00137 /* explicit instantiations of Prefix types */
00138 
00139 template No;
00140 
00141 template Deci;
00142 
00143 template Centi;
00144 
00145 template Milli;
00146 
00147 template Micro;
00148 
00149 template Nano;
00150 
00151 template Pico;
00152 
00153 template Femto;
00154 
00155 template Atto;
00156 
00157 template Zepto;
00158 
00159 template Yocto;
00160 
00161 template Deca;
00162 
00163 template Hecto;
00164 
00165 template Kilo;
00166 
00167 template Mega;
00168 
00169 template Giga;
00170 
00171 template Tera;
00172 
00173 template Peta;
00174 
00175 template Exa;
00176 
00177 template Zetta;
00178 
00179 template Yotta;
00180 
00181 }
00182 
00183 #endif /* _UnitPrefix_cc */

Generated on Sun Jan 15 13:58:00 2006 for Quantity by doxygen 1.3.6