00001 00007 /* Copyright (C) 2004 - 2011, Bernd Speiser */ 00008 00009 /* This file is part of Quantities. 00010 00011 PhysicalQuantities is free software; you can redistribute it and/or 00012 modify it under the terms of the GNU General Public License 00013 as published by the Free Software Foundation; either version 2 00014 of the License, or (at your option) any later version. 00015 00016 PhysicalQuantities is distributed in the hope that it will be useful, 00017 but WITHOUT ANY WARRANTY; without even the implied warranty of 00018 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00019 GNU General Public License for more details. 00020 00021 You should have received a copy of the GNU General Public License 00022 along with this program; if not, write to the Free Software 00023 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 00024 02111-1307, USA. 00025 */ 00026 00027 #ifndef _CelsiusTemperature_h 00028 #define _CelsiusTemperature_h 00029 00030 // Quantity includes 00031 #include "Quantities/Quantity/Variable.h" 00032 #include "Quantities/Quantity/Constant.h" 00033 #include "Quantities/Quantity/QuantityAggregates.h" 00034 00035 namespace quantity { 00036 namespace celsiusTemperature { 00037 00039 class Class; 00040 00042 class Unit; 00043 00044 /* declaration of CelsiusTemperature units */ 00045 class DegreeCelsiusUnit; 00046 00048 typedef unit::NonPrefixable<Unit, DegreeCelsiusUnit> DegreeCelsius; 00049 00051 typedef Loki::Typelist<DegreeCelsius, Loki::NullType> Units; 00052 00053 /* CelsiusTemperature quantity */ 00054 00055 typedef Quantity<Class> Quantity; 00056 00057 class DerivedCelsiusTemperature; 00058 00059 } // end namespace celsiusTemperature 00060 00062 template<> 00063 struct QuantityTraits<celsiusTemperature::Class> 00064 { 00065 typedef 00066 dimension::Dimension<BSUtilities::Rational<0>, 00067 BSUtilities::Rational<0>, BSUtilities::Rational<0>, 00068 BSUtilities::Rational<0>, BSUtilities::Rational<1>, 00069 BSUtilities::Rational<0>, BSUtilities::Rational<0> > Dimension; 00070 typedef celsiusTemperature::Unit UnitType; 00071 typedef celsiusTemperature::Units UnitList; 00072 typedef celsiusTemperature::DegreeCelsius DefaultUnit; 00073 00074 typedef celsiusTemperature::DerivedCelsiusTemperature 00075 DefaultDerivedQuantityType; 00076 00077 static const std::string NameString (); 00078 static const std::string SymbolString (); 00079 00080 }; 00081 00082 // the derived quantity traits template for DegreeCelsius CelsiusTemperature 00083 template<> 00084 struct DerivedQuantityTraits<celsiusTemperature::Class, 00085 celsiusTemperature::DerivedCelsiusTemperature> 00086 { 00087 static const bool OverwriteName = false; 00088 static const bool OverwriteSymbol = false; 00089 00090 static const std::string NameString (); 00091 static const std::string SymbolString (); 00092 00093 }; 00094 00095 00097 typedef Variable<celsiusTemperature::Quantity> CelsiusTemperature; 00098 00100 typedef Constant<celsiusTemperature::Quantity> CelsiusTemperatureConstant; 00101 00103 typedef VariableVector<QuantityVector<celsiusTemperature::Class> > 00104 CelsiusTemperatureVector; 00105 00106 } // end namespace quantity 00107 00108 #endif /* _CelsiusTemperature_h */