Chris@16: // Boost.Units - A C++ library for zero-overhead dimensional analysis and Chris@16: // unit/quantity manipulation and conversion Chris@16: // Chris@16: // Copyright (C) 2003-2008 Matthias Christian Schabel Chris@16: // Copyright (C) 2007-2008 Steven Watanabe Chris@16: // Chris@16: // Distributed under the Boost Software License, Version 1.0. (See Chris@16: // accompanying file LICENSE_1_0.txt or copy at Chris@16: // http://www.boost.org/LICENSE_1_0.txt) Chris@16: Chris@16: #ifndef BOOST_UNITS_SI_PREFIXES_HPP Chris@16: #define BOOST_UNITS_SI_PREFIXES_HPP Chris@16: Chris@16: #include Chris@16: Chris@16: #include Chris@16: #include Chris@16: Chris@16: namespace boost { Chris@16: Chris@16: namespace units { Chris@16: Chris@16: namespace si { Chris@16: Chris@16: #define BOOST_UNITS_METRIC_PREFIX(exponent, name) \ Chris@16: typedef make_scaled_unit > >::type name ## _type;\ Chris@16: BOOST_UNITS_STATIC_CONSTANT(name, name ## _type) Chris@16: Chris@16: BOOST_UNITS_METRIC_PREFIX(-24, yocto); Chris@16: BOOST_UNITS_METRIC_PREFIX(-21, zepto); Chris@16: BOOST_UNITS_METRIC_PREFIX(-18, atto); Chris@16: BOOST_UNITS_METRIC_PREFIX(-15, femto); Chris@16: BOOST_UNITS_METRIC_PREFIX(-12, pico); Chris@16: BOOST_UNITS_METRIC_PREFIX(-9, nano); Chris@16: BOOST_UNITS_METRIC_PREFIX(-6, micro); Chris@16: BOOST_UNITS_METRIC_PREFIX(-3, milli); Chris@16: BOOST_UNITS_METRIC_PREFIX(-2, centi); Chris@16: BOOST_UNITS_METRIC_PREFIX(-1, deci); Chris@16: BOOST_UNITS_METRIC_PREFIX(1, deka); Chris@16: BOOST_UNITS_METRIC_PREFIX(2, hecto); Chris@16: BOOST_UNITS_METRIC_PREFIX(3, kilo); Chris@16: BOOST_UNITS_METRIC_PREFIX(6, mega); Chris@16: BOOST_UNITS_METRIC_PREFIX(9, giga); Chris@16: BOOST_UNITS_METRIC_PREFIX(12, tera); Chris@16: BOOST_UNITS_METRIC_PREFIX(15, peta); Chris@16: BOOST_UNITS_METRIC_PREFIX(18, exa); Chris@16: BOOST_UNITS_METRIC_PREFIX(21, zetta); Chris@16: BOOST_UNITS_METRIC_PREFIX(24, yotta); Chris@16: Chris@16: /*BOOST_UNITS_STATIC_CONSTANT(yocto,long double) = (1e-24); ///< metric prefix for 1.0e-24 Chris@16: BOOST_UNITS_STATIC_CONSTANT(zepto,long double) = (1e-21); ///< metric prefix for 1.0e-21 Chris@16: BOOST_UNITS_STATIC_CONSTANT(atto,long double) = (1e-18); ///< metric prefix for 1.0e-18 Chris@16: BOOST_UNITS_STATIC_CONSTANT(femto,long double) = (1e-15); ///< metric prefix for 1.0e-15 Chris@16: BOOST_UNITS_STATIC_CONSTANT(pico,long double) = (1e-12); ///< metric prefix for 1.0e-12 Chris@16: BOOST_UNITS_STATIC_CONSTANT(nano,long double) = (1e-9); ///< metric prefix for 1.0e-9 Chris@16: BOOST_UNITS_STATIC_CONSTANT(micro,long double) = (1e-6); ///< metric prefix for 1.0e-6 Chris@16: BOOST_UNITS_STATIC_CONSTANT(milli,long double) = (1e-3); ///< metric prefix for 1.0e-3 Chris@16: BOOST_UNITS_STATIC_CONSTANT(centi,long double) = (1e-2); ///< metric prefix for 1.0e-2 Chris@16: BOOST_UNITS_STATIC_CONSTANT(deci,long double) = (1e-1); ///< metric prefix for 1.0e-1 Chris@16: BOOST_UNITS_STATIC_CONSTANT(deka,long double) = (1e1); ///< metric prefix for 1.0e+1 Chris@16: BOOST_UNITS_STATIC_CONSTANT(hecto,long double) = (1e2); ///< metric prefix for 1.0e+2 Chris@16: BOOST_UNITS_STATIC_CONSTANT(kilo,long double) = (1e3); ///< metric prefix for 1.0e+3 Chris@16: BOOST_UNITS_STATIC_CONSTANT(mega,long double) = (1e6); ///< metric prefix for 1.0e+6 Chris@16: BOOST_UNITS_STATIC_CONSTANT(giga,long double) = (1e9); ///< metric prefix for 1.0e+9 Chris@16: BOOST_UNITS_STATIC_CONSTANT(tera,long double) = (1e12); ///< metric prefix for 1.0e+12 Chris@16: BOOST_UNITS_STATIC_CONSTANT(peta,long double) = (1e15); ///< metric prefix for 1.0e+15 Chris@16: BOOST_UNITS_STATIC_CONSTANT(exa,long double) = (1e18); ///< metric prefix for 1.0e+18 Chris@16: BOOST_UNITS_STATIC_CONSTANT(zetta,long double) = (1e21); ///< metric prefix for 1.0e+21 Chris@16: BOOST_UNITS_STATIC_CONSTANT(yotta,long double) = (1e24); ///< metric prefix for 1.0e+24 */ Chris@16: Chris@16: } // namespace si Chris@16: Chris@16: } // namespace units Chris@16: Chris@16: } // namespace boost Chris@16: Chris@16: #endif // BOOST_UNITS_SI_PREFIXES_HPP