00001
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #ifndef _Force_h
00029 #define _Force_h
00030
00031
00032 #include "Quantities/Quantity/Variable.h"
00033 #include "Quantities/Quantity/Constant.h"
00034 #include "Quantities/Quantity/QuantityAggregates.h"
00035
00036 namespace quantity {
00037 namespace force {
00038
00040 class Class;
00041
00043 class Unit;
00044
00045
00046 class NewtonUnits;
00047 class DyneUnit;
00048 class KilogramForceUnit;
00049 class AtomicUnit;
00050
00052 typedef unit::Prefixable<Unit, NewtonUnits> Newtons;
00053
00055 typedef unit::Prefixed<Newtons> Newton;
00056
00058 typedef unit::NonPrefixable<Unit, DyneUnit> Dyne;
00059
00061 typedef unit::NonPrefixable<Unit, KilogramForceUnit> KilogramForce;
00062
00064 typedef unit::NonPrefixable<Unit, AtomicUnit> Atomic;
00065
00067 typedef Loki::Typelist<Newtons, Loki::Typelist<Dyne,
00068 Loki::Typelist<KilogramForce, Loki::Typelist<Atomic, Loki::NullType> > > >
00069 Units;
00070
00071
00072
00073 typedef Newton N;
00074 typedef Dyne dyn;
00075
00076
00077
00078 typedef Quantity<Class> Quantity;
00079
00080 class DerivedForce;
00081
00082 }
00083
00085 template<>
00086 struct QuantityTraits<force::Class>
00087 {
00088 typedef
00089 dimension::Dimension<BSUtilities::Rational<1>,
00090 BSUtilities::Rational<1>, BSUtilities::Rational<-2>,
00091 BSUtilities::Rational<0>, BSUtilities::Rational<0>,
00092 BSUtilities::Rational<0>, BSUtilities::Rational<0> > Dimension;
00093 typedef force::Unit UnitType;
00094 typedef force::Units UnitList;
00095 typedef force::Newton DefaultUnit;
00096
00097 typedef force::DerivedForce DefaultDerivedQuantityType;
00098
00099 static const std::string NameString ();
00100 static const std::string SymbolString ();
00101
00102 };
00103
00104
00105 template<>
00106 struct DerivedQuantityTraits<force::Class, force::DerivedForce>
00107 {
00108 static const bool OverwriteName = false;
00109 static const bool OverwriteSymbol = false;
00110
00111 static const std::string NameString ();
00112 static const std::string SymbolString ();
00113
00114 };
00115
00117 typedef Variable<force::Quantity> Force;
00118
00120 typedef Constant<force::Quantity> ForceConstant;
00121
00123 typedef VariableVector<QuantityVector<force::Class> > ForceVector;
00124 }
00125
00126 #endif