Main Page | Class Hierarchy | Class List | File List

Acceleration.h

Go to the documentation of this file.
00001 
00005 /* Copyright (C) 2002 - 2006, Bernd Speiser */
00006 /* This file is part of Quantities.
00007 
00008 PhysicalQuantities 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 PhysicalQuantities 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 _Acceleration_h
00025 #define _Acceleration_h
00026 
00027 #include "Quantity/Variable.h"
00028 #include "Quantity/Constant.h"
00029 #include "Quantity/QuantityCluster.h"
00030 
00031 #include "PhysicalQuantities/Length.h"
00032 #include "PhysicalQuantities/Time.h"
00033 
00034 namespace quantity {
00035   namespace acceleration {
00036 
00038 typedef BSUtilities::Rational<1> LE;
00040 typedef BSUtilities::Rational<0> M; 
00042 typedef BSUtilities::Rational<-2> TI;
00044 typedef BSUtilities::Rational<0> E;
00046 typedef BSUtilities::Rational<0> TE;
00048 typedef BSUtilities::Rational<0> A;
00050 typedef BSUtilities::Rational<0> LU;
00051 
00052 typedef dimension::Dimension<LE, M, TI, E, TE, A, LU> Dimension;
00053 
00055 class Unit;
00056 
00058 class GalUnit;
00060 class StandardAccelerationOfFreeFallUnit;
00061 
00062 
00063 /* the MetrePerSquareSecond and prefixed variants */
00064 
00065 typedef LOKI_TYPELIST_3(length::Metre, length::CentiMetre,
00066                                         length::MilliMetre) LengthList;
00067 
00070 typedef unit::ComposeElement<Unit, LengthList, 
00071                                BSUtilities::Rational<1> > LengthElement;
00072 
00073 typedef LOKI_TYPELIST_3(time::Second, time::MilliSecond, 
00074                                            time::MicroSecond) TimeList;
00075 
00077 typedef unit::ComposeElement<Unit, TimeList, 
00078                                 BSUtilities::Rational<-2> > TimeElement;
00079 
00080 typedef 
00081   unit::ComposeBase<Unit, LOKI_TYPELIST_2(LengthElement, TimeElement)>
00082                                                AccelerationComposedUnit;
00083 
00084 typedef unit::Composed<AccelerationComposedUnit, 
00085      LOKI_TYPELIST_2(length::Metre, time::Second)> MetrePerSquareSecond;
00086 typedef unit::Composed<AccelerationComposedUnit, 
00087   LOKI_TYPELIST_2(length::CentiMetre, time::Second)> 
00088                                               CentiMetrePerSquareSecond;
00089 typedef unit::Composed<AccelerationComposedUnit, 
00090   LOKI_TYPELIST_2(length::Metre, time::MilliSecond)> 
00091                                               MetrePerSquareMilliSecond;
00092 
00093 /* declaration of other Acceleration units */
00094 /* the Gal */
00095 
00096 typedef unit::NonPrefixable<Unit, GalUnit> Gal;
00097 
00098 /* the acceleration of free fall */
00099 
00100 typedef unit::NonPrefixable<Unit, 
00101      StandardAccelerationOfFreeFallUnit> StandardAccelerationOfFreeFall;
00102 
00104 typedef LOKI_TYPELIST_5(MetrePerSquareSecond, 
00105   CentiMetrePerSquareSecond, MetrePerSquareMilliSecond, Gal, 
00106                                   StandardAccelerationOfFreeFall) Units;
00107 
00108 /* Acceleration quantity */
00109 
00110 typedef Quantity<Dimension, Unit, Units, MetrePerSquareSecond> Quantity;
00111 
00112   }
00113 
00115 typedef Variable<acceleration::Quantity> Acceleration;
00117 typedef Constant<acceleration::Quantity> AccelerationConstant;
00118 
00119 typedef VariableVector<acceleration::Quantity> AccelerationVector;
00120 
00121 }
00122 
00123 #endif /* _Acceleration_h */

Generated on Sun Jan 15 14:05:26 2006 for PhysicalQuantities by doxygen 1.3.6