00001
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef _Prefix_h
00025 #define _Prefix_h
00026
00027
00028 #include <string>
00029
00030
00031 #include "loki/NullType.h"
00032 #include "loki/Typelist.h"
00033
00034 namespace unit {
00035
00037
00043 template<class P> class Prefix
00044 {
00045 public:
00046
00048
00053 static const double Factor;
00054
00056
00059 static const std::string Name;
00060
00062
00065 static const std::string Symbol;
00066
00067 };
00068
00070
00072 class NoPrefix;
00073
00074 typedef Prefix<NoPrefix> No;
00075
00077
00079 class DeciPrefix;
00080
00081 typedef Prefix<DeciPrefix> Deci;
00082
00084
00086 class DeciPrefix;
00087 class CentiPrefix;
00088
00089 typedef Prefix<CentiPrefix> Centi;
00090
00092
00094 class MilliPrefix;
00095
00096 typedef Prefix<MilliPrefix> Milli;
00097
00099
00101 class MicroPrefix;
00102
00103 typedef Prefix<MicroPrefix> Micro;
00104
00106
00108 class NanoPrefix;
00109
00110 typedef Prefix<NanoPrefix> Nano;
00111
00113
00115 class PicoPrefix;
00116
00117 typedef Prefix<PicoPrefix> Pico;
00118
00120
00122 class FemtoPrefix;
00123
00124 typedef Prefix<FemtoPrefix> Femto;
00125
00127
00129 class AttoPrefix;
00130
00131 typedef Prefix<AttoPrefix> Atto;
00132
00134
00136 class ZeptoPrefix;
00137
00138 typedef Prefix<ZeptoPrefix> Zepto;
00139
00141
00143 class YoctoPrefix;
00144
00145 typedef Prefix<YoctoPrefix> Yocto;
00146
00148
00150 class DecaPrefix;
00151
00152 typedef Prefix<DecaPrefix> Deca;
00153
00155
00157 class HectoPrefix;
00158
00159 typedef Prefix<HectoPrefix> Hecto;
00160
00162
00164 class KiloPrefix;
00165
00166 typedef Prefix<KiloPrefix> Kilo;
00167
00169
00171 class MegaPrefix;
00172
00173 typedef Prefix<MegaPrefix> Mega;
00174
00176
00178 class GigaPrefix;
00179
00180 typedef Prefix<GigaPrefix> Giga;
00181
00183
00185 class TeraPrefix;
00186
00187 typedef Prefix<TeraPrefix> Tera;
00188
00190
00192 class PetaPrefix;
00193
00194 typedef Prefix<PetaPrefix> Peta;
00195
00197
00199 class ExaPrefix;
00200
00201 typedef Prefix<ExaPrefix> Exa;
00202
00204
00206 class ZettaPrefix;
00207
00208 typedef Prefix<ZettaPrefix> Zetta;
00209
00211
00213 class YottaPrefix;
00214
00215 typedef Prefix<YottaPrefix> Yotta;
00216
00218
00220 typedef Loki::Typelist<Yotta, Loki::Typelist<Zetta,
00221 Loki::Typelist<Exa, Loki::Typelist<Peta, Loki::Typelist<Tera,
00222 Loki::Typelist<Giga, Loki::Typelist<Mega, Loki::Typelist<Kilo,
00223 Loki::Typelist<Hecto, Loki::Typelist<Deca, Loki::Typelist<No,
00224 Loki::Typelist<Deci, Loki::Typelist<Centi, Loki::Typelist<Milli,
00225 Loki::Typelist<Micro, Loki::Typelist<Nano, Loki::Typelist<Pico,
00226 Loki::Typelist<Femto, Loki::Typelist<Atto, Loki::Typelist<Zepto,
00227 Loki::Typelist<Yocto, Loki::NullType> > >
00228 > > > > > > > > > > > > > > > > > > Prefixes;
00229
00230
00231 }
00232
00233 #endif