|
From: Matthias S. <mat...@us...> - 2007-04-03 17:11:41
|
Update of /cvsroot/boost-sandbox/boost-sandbox/boost/units/systems/si In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv9831 Modified Files: acceleration.hpp base.hpp mass_density.hpp Added Files: absorbed_dose.hpp activity.hpp dose_equivalent.hpp illuminance.hpp luminous_flux.hpp luminous_intensity.hpp plane_angle.hpp solid_angle.hpp surface_density.hpp Log Message: more SI units according to official SI documents --- NEW FILE: solid_angle.hpp --- // mcs::units - A C++ library for zero-overhead dimensional analysis and // unit/quantity manipulation and conversion // // Copyright (C) 2003-2007 Matthias Christian Schabel // Copyright (C) 2007 Steven Watanabe // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_UNITS_SI_SOLID_ANGLE_HPP #define BOOST_UNITS_SI_SOLID_ANGLE_HPP #include <boost/units/systems/si/base.hpp> namespace boost { namespace units { namespace SI { typedef unit<solid_angle_type,SI::system> solid_angle; BOOST_UNITS_STATIC_CONSTANT(steradian,solid_angle); BOOST_UNITS_STATIC_CONSTANT(steradians,solid_angle); } // namespace SI } // namespace units } // namespace boost #endif // BOOST_UNITS_SI_SOLID_ANGLE_HPP --- NEW FILE: surface_density.hpp --- // mcs::units - A C++ library for zero-overhead dimensional analysis and // unit/quantity manipulation and conversion // // Copyright (C) 2003-2007 Matthias Christian Schabel // Copyright (C) 2007 Steven Watanabe // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_UNITS_SI_SURFACE_DENSITY_HPP #define BOOST_UNITS_SI_SURFACE_DENSITY_HPP #include <boost/units/systems/si/base.hpp> namespace boost { namespace units { namespace SI { typedef unit<surface_density_type,SI::system> surface_density; BOOST_UNITS_STATIC_CONSTANT(kilogram_per_square_meter,surface_density); BOOST_UNITS_STATIC_CONSTANT(kilograms_per_square_meter,surface_density); BOOST_UNITS_STATIC_CONSTANT(kilogramme_per_square_metre,surface_density); BOOST_UNITS_STATIC_CONSTANT(kilogrammes_per_square_metre,surface_density); } // namespace SI } // namespace units } // namespace boost #endif // BOOST_UNITS_SI_SURFACE_DENSITY_HPP Index: mass_density.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/boost/units/systems/si/mass_density.hpp,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- mass_density.hpp 16 Mar 2007 18:12:46 -0000 1.1.1.1 +++ mass_density.hpp 3 Apr 2007 17:11:40 -0000 1.2 @@ -21,6 +21,11 @@ typedef unit<mass_density_type,SI::system> mass_density; +BOOST_UNITS_STATIC_CONSTANT(kilogram_per_cubic_meter,mass_density); +BOOST_UNITS_STATIC_CONSTANT(kilograms_per_cubic_meter,mass_density); +BOOST_UNITS_STATIC_CONSTANT(kilogramme_per_cubic_metre,mass_density); +BOOST_UNITS_STATIC_CONSTANT(kilogrammes_per_cubic_metre,mass_density); + } // namespace SI } // namespace units --- NEW FILE: dose_equivalent.hpp --- // mcs::units - A C++ library for zero-overhead dimensional analysis and // unit/quantity manipulation and conversion // // Copyright (C) 2003-2007 Matthias Christian Schabel // Copyright (C) 2007 Steven Watanabe // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_UNITS_SI_DOSE_EQUIVALENT_HPP #define BOOST_UNITS_SI_DOSE_EQUIVALENT_HPP #include <boost/units/systems/si/base.hpp> namespace boost { namespace units { namespace SI { typedef unit<dose_equivalent_type,SI::system> dose_equivalent; BOOST_UNITS_STATIC_CONSTANT(sievert,dose_equivalent); BOOST_UNITS_STATIC_CONSTANT(sieverts,dose_equivalent); } // namespace SI } // namespace units } // namespace boost #endif // BOOST_UNITS_SI_DOSE_EQUIVALENT_HPP --- NEW FILE: luminous_intensity.hpp --- // mcs::units - A C++ library for zero-overhead dimensional analysis and // unit/quantity manipulation and conversion // // Copyright (C) 2003-2007 Matthias Christian Schabel // Copyright (C) 2007 Steven Watanabe // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_UNITS_SI_LUMINOUS_INTENSITY_HPP #define BOOST_UNITS_SI_LUMINOUS_INTENSITY_HPP #include <boost/units/systems/si/base.hpp> namespace boost { namespace units { namespace SI { typedef unit<luminous_intensity_type,SI::system> luminous_intensity; BOOST_UNITS_STATIC_CONSTANT(candela,luminous_intensity); BOOST_UNITS_STATIC_CONSTANT(candelas,luminous_intensity); } // namespace SI } // namespace units } // namespace boost #endif // BOOST_UNITS_SI_LUMINOUS_INTENSITY_HPP --- NEW FILE: illuminance.hpp --- // mcs::units - A C++ library for zero-overhead dimensional analysis and // unit/quantity manipulation and conversion // // Copyright (C) 2003-2007 Matthias Christian Schabel // Copyright (C) 2007 Steven Watanabe // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_UNITS_SI_ILLUMINANCE_HPP #define BOOST_UNITS_SI_ILLUMINANCE_HPP #include <boost/units/systems/si/base.hpp> namespace boost { namespace units { namespace SI { typedef unit<illuminance_type,SI::system> illuminance; BOOST_UNITS_STATIC_CONSTANT(lux,illuminance); } // namespace SI } // namespace units } // namespace boost #endif // BOOST_UNITS_SI_ILLUMINANCE_HPP --- NEW FILE: absorbed_dose.hpp --- // mcs::units - A C++ library for zero-overhead dimensional analysis and // unit/quantity manipulation and conversion // // Copyright (C) 2003-2007 Matthias Christian Schabel // Copyright (C) 2007 Steven Watanabe // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_UNITS_SI_ABSORBED_DOSE_HPP #define BOOST_UNITS_SI_ABSORBED_DOSE_HPP #include <boost/units/systems/si/base.hpp> namespace boost { namespace units { namespace SI { typedef unit<absorbed_dose_type,SI::system> absorbed_dose; BOOST_UNITS_STATIC_CONSTANT(gray,absorbed_dose); BOOST_UNITS_STATIC_CONSTANT(grays,absorbed_dose); } // namespace SI } // namespace units } // namespace boost #endif // BOOST_UNITS_SI_ABSORBED_DOSE_HPP --- NEW FILE: activity.hpp --- // mcs::units - A C++ library for zero-overhead dimensional analysis and // unit/quantity manipulation and conversion // // Copyright (C) 2003-2007 Matthias Christian Schabel // Copyright (C) 2007 Steven Watanabe // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_UNITS_SI_ACTIVITY_HPP #define BOOST_UNITS_SI_ACTIVITY_HPP #include <boost/units/systems/si/base.hpp> namespace boost { namespace units { namespace SI { typedef unit<activity_type,SI::system> activity; BOOST_UNITS_STATIC_CONSTANT(becquerel,activity); BOOST_UNITS_STATIC_CONSTANT(becquerels,activity); } // namespace SI } // namespace units } // namespace boost #endif // BOOST_UNITS_SI_ACTIVITY_HPP Index: acceleration.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/boost/units/systems/si/acceleration.hpp,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- acceleration.hpp 16 Mar 2007 18:12:45 -0000 1.1.1.1 +++ acceleration.hpp 3 Apr 2007 17:11:39 -0000 1.2 @@ -21,6 +21,11 @@ typedef unit<acceleration_type,SI::system> acceleration; +BOOST_UNITS_STATIC_CONSTANT(meter_per_second_squared,acceleration); +BOOST_UNITS_STATIC_CONSTANT(meters_per_second_squared,acceleration); +BOOST_UNITS_STATIC_CONSTANT(metre_per_second_squared,acceleration); +BOOST_UNITS_STATIC_CONSTANT(metres_per_second_squared,acceleration); + } // namespace SI } // namespace units --- NEW FILE: plane_angle.hpp --- // mcs::units - A C++ library for zero-overhead dimensional analysis and // unit/quantity manipulation and conversion // // Copyright (C) 2003-2007 Matthias Christian Schabel // Copyright (C) 2007 Steven Watanabe // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_UNITS_SI_PLANE_ANGLE_HPP #define BOOST_UNITS_SI_PLANE_ANGLE_HPP #include <boost/units/systems/si/base.hpp> namespace boost { namespace units { namespace SI { typedef unit<plane_angle_type,SI::system> plane_angle; BOOST_UNITS_STATIC_CONSTANT(radian,plane_angle); BOOST_UNITS_STATIC_CONSTANT(radians,plane_angle); } // namespace SI } // namespace units } // namespace boost #endif // BOOST_UNITS_SI_PLANE_ANGLE_HPP Index: base.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/boost/units/systems/si/base.hpp,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- base.hpp 31 Mar 2007 01:17:17 -0000 1.4 +++ base.hpp 3 Apr 2007 17:11:40 -0000 1.5 @@ -96,6 +96,13 @@ static std::string name() { return "mole"; } static std::string symbol() { return "mol"; } }; + +template<> +struct base_unit_info<luminous_intensity_tag,SI::system_tag> +{ + static std::string name() { return "candela"; } + static std::string symbol() { return "cd"; } +}; } // namespace units --- NEW FILE: luminous_flux.hpp --- // mcs::units - A C++ library for zero-overhead dimensional analysis and // unit/quantity manipulation and conversion // // Copyright (C) 2003-2007 Matthias Christian Schabel // Copyright (C) 2007 Steven Watanabe // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_UNITS_SI_LUMINOUS_FLUX_HPP #define BOOST_UNITS_SI_LUMINOUS_FLUX_HPP #include <boost/units/systems/si/base.hpp> namespace boost { namespace units { namespace SI { typedef unit<luminous_flux_type,SI::system> luminous_flux; BOOST_UNITS_STATIC_CONSTANT(lumen,luminous_flux); BOOST_UNITS_STATIC_CONSTANT(lumens,luminous_flux); } // namespace SI } // namespace units } // namespace boost #endif // BOOST_UNITS_SI_LUMINOUS_FLUX_HPP |