00001
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #ifndef _Empty_h
00028 #define _Empty_h
00029
00030
00031 #include "Quantity/Variable.h"
00032 #include "Quantity/Constant.h"
00033 #include "Quantity/QuantityCluster.h"
00034
00035 namespace quantity {
00037 namespace empty {
00038
00040 class Class;
00041
00043 class Unit;
00044
00045
00046 class EmptyUnit;
00047
00049 typedef unit::NonPrefixable<Unit, EmptyUnit> Unity;
00050
00052 typedef LOKI_TYPELIST_1(Unity) Units;
00053
00054
00055
00056 typedef Quantity<Class> Quantity;
00057
00058 class DerivedEmpty;
00059
00060 }
00061
00062
00064
00066 template<typename ST>
00067 struct Standard<empty::Unity, ST>
00068 {
00069 static const ST ratio;
00070 static const bool exact;
00071 };
00072
00074 template<typename ST> const ST Standard<empty::Unity, ST>::ratio = 1.0;
00075
00077 template<typename ST> const bool Standard<empty::Unity, ST>::exact = true;
00078
00080 template<>
00081 struct QuantityTraits<empty::Class>
00082 {
00083 typedef
00084 dimension::Dimension<BSUtilities::Rational<0>,
00085 BSUtilities::Rational<0>, BSUtilities::Rational<0>,
00086 BSUtilities::Rational<0>, BSUtilities::Rational<0>,
00087 BSUtilities::Rational<0>, BSUtilities::Rational<0> > Dimension;
00088 typedef empty::Unit UnitType;
00089 typedef empty::Units UnitList;
00090 typedef empty::Unity DefaultUnit;
00091
00092 typedef empty::DerivedEmpty DefaultDerivedQuantityType;
00093
00094 static const std::string NameString;
00095 static const std::string SymbolString;
00096
00097 };
00098
00099
00100 template<>
00101 struct DerivedQuantityTraits<empty::Class, empty::DerivedEmpty>
00102 {
00103 static const bool OverwriteName = false;
00104 static const bool OverwriteSymbol = false;
00105
00106 static const std::string NameString;
00107 static const std::string SymbolString;
00108
00109 };
00110
00112 typedef Variable<empty::Quantity> Empty;
00113
00115 typedef Constant<empty::Quantity> EmptyConstant;
00116
00118 typedef QuantityVector<Variable, empty::Quantity> EmptyVector;
00119
00120 }
00121
00122 #endif