00001 00007 /* Copyright (C) 2002 - 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 _LuminousIntensity_h 00028 #define _LuminousIntensity_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 luminousIntensity { 00037 00039 class Class; 00040 00042 class Unit; 00043 00044 /* declaration of LuminousIntensity units */ 00045 class CandelaUnits; 00046 00048 typedef unit::Prefixable<Unit, CandelaUnits> Candelas; 00049 00051 typedef unit::Prefixed<Candelas> Candela; 00052 00054 typedef Loki::Typelist<Candelas, Loki::NullType> Units; 00055 00056 /* declare some abbreviated luminous intensity units */ 00057 00058 typedef Candela cd; 00059 00060 /* LuminousIntensity quantity */ 00061 00062 typedef Quantity<Class> Quantity; 00063 00064 class DerivedLuminousIntensity; 00065 00066 } // end namespace luminousIntensity 00067 00069 template<> 00070 struct QuantityTraits<luminousIntensity::Class> 00071 { 00072 typedef 00073 dimension::Dimension<BSUtilities::Rational<0>, 00074 BSUtilities::Rational<0>, BSUtilities::Rational<0>, 00075 BSUtilities::Rational<0>, BSUtilities::Rational<0>, 00076 BSUtilities::Rational<0>, BSUtilities::Rational<1> > Dimension; 00077 typedef luminousIntensity::Unit UnitType; 00078 typedef luminousIntensity::Units UnitList; 00079 typedef luminousIntensity::Candela DefaultUnit; 00080 00081 typedef luminousIntensity::DerivedLuminousIntensity DefaultDerivedQuantityType; 00082 00083 static const std::string NameString (); 00084 static const std::string SymbolString (); 00085 }; 00086 00087 // the derived quantity traits template for Candela LuminousIntensity 00088 template<> 00089 struct DerivedQuantityTraits<luminousIntensity::Class, luminousIntensity::DerivedLuminousIntensity> 00090 { 00091 static const bool OverwriteName = false; 00092 static const bool OverwriteSymbol = false; 00093 00094 static const std::string NameString (); 00095 static const std::string SymbolString (); 00096 00097 }; 00098 00100 typedef Variable<luminousIntensity::Quantity> LuminousIntensity; 00101 00103 typedef Constant<luminousIntensity::Quantity> LuminousIntensityConstant; 00104 00106 typedef VariableVector<QuantityVector<luminousIntensity::Class> > 00107 LuminousIntensityVector; 00108 00109 } // end namespace quantity 00110 00111 #endif /* _LuminousIntensity_h */