00001
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #ifndef _Length_h
00028 #define _Length_h
00029
00030 #include "Quantity/Variable.h"
00031 #include "Quantity/Constant.h"
00032 #include "Quantity/QuantityCluster.h"
00033
00034 namespace Quantities {
00035
00036
00037 typedef BSUtilities::Rational<1> Length_LE;
00038 typedef BSUtilities::Rational<0> Length_M;
00039 typedef BSUtilities::Rational<0> Length_TI;
00040 typedef BSUtilities::Rational<0> Length_E;
00041 typedef BSUtilities::Rational<0> Length_TE;
00042 typedef BSUtilities::Rational<0> Length_A;
00043 typedef BSUtilities::Rational<0> Length_LU;
00044 class LengthGroup
00045 {
00046 public:
00047 typedef TYPELIST_7(Length_LE, Length_M, Length_TI, Length_E,
00048 Length_TE, Length_A, Length_LU) DimTL;
00049 };
00050
00051
00052 namespace LengthUnits {
00053
00054
00055 typedef Units::Unit<LengthGroup> LengthUnit;
00056
00057
00058 class MetreUnits;
00059 class BohrUnit;
00060 class AngstromUnit;
00061 class MicronUnit;
00062 class MilliMicronUnit;
00063 class XUnit;
00064 class FermiUnit;
00065 class InchUnit;
00066 class FootUnit;
00067 class YardUnit;
00068 class MileUnit;
00069 class NauticalMileUnit;
00070 class AstronomicalUnit;
00071 class ParsecUnit;
00072 class LightYearUnit;
00073 class LightSecondUnit;
00074
00075
00076
00077 typedef Units::Prefixable<LengthGroup, MetreUnits> Metres;
00078
00079 typedef Units::Prefixed<Metres> Metre;
00080 typedef Units::Prefixed<Metres, Units::Deci> DeciMetre;
00081 typedef Units::Prefixed<Metres, Units::Centi> CentiMetre;
00082 typedef Units::Prefixed<Metres, Units::Milli> MilliMetre;
00083 typedef Units::Prefixed<Metres, Units::Micro> MicroMetre;
00084 typedef Units::Prefixed<Metres, Units::Nano> NanoMetre;
00085 typedef Units::Prefixed<Metres, Units::Pico> PicoMetre;
00086 typedef Units::Prefixed<Metres, Units::Kilo> KiloMetre;
00087
00088
00089
00090 typedef Units::NonPrefixable<LengthGroup, BohrUnit> Bohr;
00091
00092
00093
00094 typedef Units::NonPrefixable<LengthGroup, AngstromUnit> Angstrom;
00095
00096
00097
00098 typedef Units::NonPrefixable<LengthGroup, MicronUnit> Micron;
00099
00100
00101
00102 typedef Units::NonPrefixable<LengthGroup, MilliMicronUnit> MilliMicron;
00103
00104
00105
00106 typedef Units::NonPrefixable<LengthGroup, XUnit> X;
00107
00108
00109
00110 typedef Units::NonPrefixable<LengthGroup, FermiUnit> Fermi;
00111
00112
00113
00114 typedef Units::NonPrefixable<LengthGroup, InchUnit> Inch;
00115
00116
00117
00118 typedef Units::NonPrefixable<LengthGroup, FootUnit> Foot;
00119
00120
00121
00122 typedef Units::NonPrefixable<LengthGroup, YardUnit> Yard;
00123
00124
00125
00126 typedef Units::NonPrefixable<LengthGroup, MileUnit> Mile;
00127
00128
00129
00130 typedef Units::NonPrefixable<LengthGroup, NauticalMileUnit> NauticalMile;
00131
00132
00133
00134 typedef Units::NonPrefixable<LengthGroup, AstronomicalUnit> Astronomical;
00135
00136
00137
00138 typedef Units::NonPrefixable<LengthGroup, ParsecUnit> Parsec;
00139
00140
00141
00142 typedef Units::NonPrefixable<LengthGroup, LightYearUnit> LightYear;
00143
00144
00145
00146 typedef Units::NonPrefixable<LengthGroup, LightSecondUnit> LightSecond;
00147
00149 typedef Loki::TL::Append<Metres::Units,
00150 TYPELIST_15(Bohr, Angstrom, Micron, MilliMicron, X, Fermi, Inch,
00151 Foot, Yard, Mile, NauticalMile, Astronomical, Parsec,
00152 LightYear, LightSecond)>::Result LengthUnits;
00153
00154
00155
00156 typedef Metre m;
00157 typedef MilliMetre mm;
00158 typedef KiloMetre km;
00159 typedef CentiMetre cm;
00160
00161 }
00162
00163
00164
00165 typedef Dimensions::Dimension<LengthGroup> LengthDimension;
00166
00167
00168
00169 typedef Quantity<LengthGroup, LengthUnits::LengthUnits,
00170 LengthUnits::Metre> LengthQuantities;
00171
00172 typedef Variable<LengthQuantities> Length;
00173 typedef Constant<LengthQuantities> LengthConstant;
00174
00175 typedef VariableVector<LengthQuantities> LengthVector;
00176
00177 }
00178
00179 #endif