00001
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef _Area_h
00026 #define _Area_h
00027
00028 #include "Quantity/Variable.h"
00029 #include "Quantity/Constant.h"
00030 #include "Quantity/QuantityCluster.h"
00031
00032 #include "PhysicalQuantities/Length.h"
00033
00034 namespace Quantities {
00035
00036
00037 typedef BSUtilities::Rational<2> Area_LE;
00038 typedef BSUtilities::Rational<0> Area_M;
00039 typedef BSUtilities::Rational<0> Area_TI;
00040 typedef BSUtilities::Rational<0> Area_E;
00041 typedef BSUtilities::Rational<0> Area_TE;
00042 typedef BSUtilities::Rational<0> Area_A;
00043 typedef BSUtilities::Rational<0> Area_LU;
00044 class AreaGroup
00045 {
00046 public:
00047 typedef TYPELIST_7(Area_LE, Area_M, Area_TI, Area_E,
00048 Area_TE, Area_A, Area_LU) DimTL;
00049 };
00050
00052 namespace AreaUnits {
00053
00054
00055 typedef Units::Unit<AreaGroup> AreaUnit;
00056
00057
00058 class SquareMetreUnits;
00059 class BarnUnit;
00060 class AcreUnit;
00061 class AreUnit;
00062 class HectareUnit;
00063
00064
00065
00066 typedef TYPELIST_3(LengthUnits::Metre, LengthUnits::CentiMetre,
00067 LengthUnits::MilliMetre) LengthList;
00068
00069 typedef Units::CompoundElement<AreaGroup, LengthList,
00070 BSUtilities::Rational<2> > LengthElement;
00071 typedef TYPELIST_1(LengthElement) AreaCompositeList;
00072 typedef
00073 Units::Compound<AreaGroup, AreaCompositeList> AreaCompositeUnits;
00074
00075 typedef
00076 Units::Composed<AreaCompositeUnits, TYPELIST_1(LengthUnits::Metre)>
00077 SquareMetre;
00078
00079 typedef Units::Composed<AreaCompositeUnits,
00080 TYPELIST_1(LengthUnits::MilliMetre)> SquareMilliMetre;
00081
00082
00083
00084 typedef Units::NonPrefixable<AreaGroup, BarnUnit> Barn;
00085
00086
00087
00088 typedef Units::NonPrefixable<AreaGroup, AcreUnit> Acre;
00089
00090
00091
00092 typedef Units::NonPrefixable<AreaGroup, AreUnit> Are;
00093
00094
00095
00096 typedef Units::NonPrefixable<AreaGroup, HectareUnit> Hectare;
00097
00099 typedef TYPELIST_6(SquareMetre, SquareMilliMetre,
00100 Barn, Acre, Are, Hectare) AreaUnits;
00101
00102 }
00103
00104
00105
00106 typedef Dimensions::Dimension<AreaGroup> AreaDimension;
00107
00108
00109
00110 typedef Quantity<AreaGroup, AreaUnits::AreaUnits,
00111 AreaUnits::SquareMetre> AreaQuantities;
00112
00113 typedef Variable<AreaQuantities> Area;
00114 typedef Constant<AreaQuantities> AreaConstant;
00115
00116 typedef VariableVector<AreaQuantities> AreaVector;
00117
00118 }
00119
00120 #endif