Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members

Frequency.h

Go to the documentation of this file.
00001 
00005 /* Copyright (C) 2002-2004, Bernd Speiser */
00006 
00007 /* This file is part of Quantities.
00008 
00009 PhysicalQuantities is free software; you can redistribute it and/or
00010 modify it under the terms of the GNU General Public License
00011 as published by the Free Software Foundation; either version 2
00012 of the License, or (at your option) any later version.
00013 
00014 PhysicalQuantities is distributed in the hope that it will be useful,
00015 but WITHOUT ANY WARRANTY; without even the implied warranty of
00016 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017 GNU General Public License for more details.
00018   
00019 You should have received a copy of the GNU General Public License
00020 along with this program; if not, write to the Free Software
00021 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
00022 02111-1307, USA.
00023 */
00024 
00025 #ifndef _Frequency_h
00026 #define _Frequency_h
00027 
00028 #include "Quantity/Variable.h"
00029 #include "Quantity/Constant.h"
00030 #include "Quantity/QuantityCluster.h"
00031 
00032 namespace Quantities {
00033 
00034 /* Frequency dimension */
00035 typedef BSUtilities::Rational<0> Frequency_LE;
00036 typedef BSUtilities::Rational<0> Frequency_M;
00037 typedef BSUtilities::Rational<-1> Frequency_TI;
00038 typedef BSUtilities::Rational<0> Frequency_E;
00039 typedef BSUtilities::Rational<0> Frequency_TE;
00040 typedef BSUtilities::Rational<0> Frequency_A;
00041 typedef BSUtilities::Rational<0> Frequency_LU;
00042 class FrequencyGroup
00043   {
00044     public:
00045       typedef TYPELIST_7(Frequency_LE, Frequency_M, Frequency_TI, 
00046                          Frequency_E, Frequency_TE, Frequency_A, 
00047                          Frequency_LU) DimTL;
00048   };
00049 
00050   namespace FrequencyUnits {
00051 
00052 /* declaration of Frequency unit base class */
00053 typedef Units::Unit<FrequencyGroup> FrequencyUnit;
00054 
00055 /* declaration of Frequency units */
00056 class HertzUnits;
00057 
00058 /* the Hertz and prefixed Hertz units*/
00059 
00060 typedef Units::Prefixable<FrequencyGroup, HertzUnits> Hertzs;
00061 
00062 typedef Units::Prefixed<Hertzs> Hertz;
00063 typedef Units::Prefixed<Hertzs, Units::Milli> MilliHertz;
00064 typedef Units::Prefixed<Hertzs, Units::Kilo> KiloHertz;
00065 typedef Units::Prefixed<Hertzs, Units::Mega> MegaHertz;
00066 typedef Units::Prefixed<Hertzs, Units::Giga> GigaHertz;
00067 
00068 typedef Hertzs::Units FrequencyUnits;
00069 
00070 /* declare some abbreviated time units */
00071 
00072 typedef Hertz Hz;
00073 typedef MilliHertz mHz;
00074 typedef MegaHertz MHz;
00075 typedef GigaHertz GHz;
00076 
00077   }
00078 
00079 /* declaration of Frequency dimension */
00080 
00081 typedef Dimensions::Dimension<FrequencyGroup> FrequencyDimension;
00082 
00083 /* Frequency Quantity */
00084 
00085 typedef Quantity<FrequencyGroup, FrequencyUnits::FrequencyUnits,
00086                              FrequencyUnits::Hertz> FrequencyQuantities;
00087 
00088 typedef Variable<FrequencyQuantities> Frequency;
00089 typedef Constant<FrequencyQuantities> FrequencyConstant;
00090 
00091 typedef VariableVector<FrequencyQuantities> FrequencyVector;
00092 
00093 }
00094 
00095 #endif /* _Frequency_h */

Generated on Sun Jan 15 13:58:03 2006 for PhysicalQuantities by doxygen 1.3.6