00001
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #ifndef _Frequency_h
00028 #define _Frequency_h
00029
00030
00031 #include "Quantities/Quantity/Variable.h"
00032 #include "Quantities/Quantity/Constant.h"
00033 #include "Quantities/Quantity/QuantityAggregates.h"
00034
00035 namespace quantity {
00036 namespace frequency {
00037
00039 class Class;
00040
00042 class Unit;
00043
00044
00045 class HertzUnits;
00046
00048 typedef unit::Prefixable<Unit, HertzUnits> Hertzs;
00049
00051 typedef unit::Prefixed<Hertzs> Hertz;
00052
00054 typedef unit::Prefixed<Hertzs, unit::Milli> MilliHertz;
00055
00057 typedef unit::Prefixed<Hertzs, unit::Kilo> KiloHertz;
00058
00060 typedef unit::Prefixed<Hertzs, unit::Mega> MegaHertz;
00061
00063 typedef unit::Prefixed<Hertzs, unit::Giga> GigaHertz;
00064
00066 typedef Loki::Typelist<Hertzs, Loki::NullType> Units;
00067
00068
00069 typedef Hertz Hz;
00070 typedef MilliHertz mHz;
00071 typedef MegaHertz MHz;
00072 typedef GigaHertz GHz;
00073
00074
00075
00076 typedef Quantity<Class> Quantity;
00077
00078 class DerivedFrequency;
00079
00080 }
00081
00083 template<>
00084 struct QuantityTraits<frequency::Class>
00085 {
00086 typedef
00087 dimension::Dimension<BSUtilities::Rational<0>,
00088 BSUtilities::Rational<0>, BSUtilities::Rational<-1>,
00089 BSUtilities::Rational<0>, BSUtilities::Rational<0>,
00090 BSUtilities::Rational<0>, BSUtilities::Rational<0> > Dimension;
00091 typedef frequency::Unit UnitType;
00092 typedef frequency::Units UnitList;
00093 typedef frequency::Hertz DefaultUnit;
00094
00095 typedef frequency::DerivedFrequency DefaultDerivedQuantityType;
00096
00097 static const std::string NameString ();
00098 static const std::string SymbolString ();
00099
00100
00101 };
00102
00103
00104 template<>
00105 struct DerivedQuantityTraits<frequency::Class, frequency::DerivedFrequency>
00106 {
00107 static const bool OverwriteName = false;
00108 static const bool OverwriteSymbol = false;
00109
00110 static const std::string NameString ();
00111 static const std::string SymbolString ();
00112
00113 };
00114
00116 typedef Variable<frequency::Quantity> Frequency;
00117
00119 typedef Constant<frequency::Quantity> FrequencyConstant;
00120
00122 typedef VariableVector<QuantityVector<frequency::Class> > FrequencyVector;
00123
00124 }
00125
00126 #endif