// Boost.Units - A C++ library for zero-overhead dimensional analysis and // unit/quantity manipulation and conversion // // Copyright (C) 2003-2008 Matthias Christian Schabel // Copyright (C) 2008 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_ABSTRACT_HPP #define BOOST_UNITS_ABSTRACT_HPP #include #include #include #include #include #include #include #include #include #include #include #include #include #include namespace boost { namespace units { namespace abstract { struct length_unit_tag : base_unit { }; struct mass_unit_tag : base_unit { }; struct time_unit_tag : base_unit { }; struct current_unit_tag : base_unit { }; struct temperature_unit_tag : base_unit { }; struct amount_unit_tag : base_unit { }; struct luminous_intensity_unit_tag : base_unit { }; struct plane_angle_unit_tag : base_unit { }; struct solid_angle_unit_tag : base_unit { }; typedef make_system< length_unit_tag, mass_unit_tag, time_unit_tag, current_unit_tag, temperature_unit_tag, amount_unit_tag, luminous_intensity_unit_tag, plane_angle_unit_tag, solid_angle_unit_tag >::type system; typedef unit length; ///< abstract unit of length typedef unit mass; ///< abstract unit of mass typedef unit time; ///< abstract unit of time typedef unit current; ///< abstract unit of current typedef unit temperature; ///< abstract unit of temperature typedef unit amount; ///< abstract unit of amount typedef unit luminous_intensity; ///< abstract unit of luminous intensity typedef unit plane_angle; ///< abstract unit of plane angle typedef unit solid_angle; ///< abstract unit of solid angle } // namespace abstract template<> struct base_unit_info { static std::string name() { return "[Length]"; } static std::string symbol() { return "[L]"; } }; template<> struct base_unit_info { static std::string name() { return "[Mass]"; } static std::string symbol() { return "[M]"; } }; template<> struct base_unit_info { static std::string name() { return "[Time]"; } static std::string symbol() { return "[T]"; } }; template<> struct base_unit_info { static std::string name() { return "[Electric Current]"; } static std::string symbol() { return "[I]"; } }; template<> struct base_unit_info { static std::string name() { return "[Temperature]"; } static std::string symbol() { return "[Theta]"; } }; template<> struct base_unit_info { static std::string name() { return "[Amount]"; } static std::string symbol() { return "[N]"; } }; template<> struct base_unit_info { static std::string name() { return "[Luminous Intensity]"; } static std::string symbol() { return "[J]"; } }; template<> struct base_unit_info { static std::string name() { return "[Plane Angle]"; } static std::string symbol() { return "[QP]"; } }; template<> struct base_unit_info { static std::string name() { return "[Solid Angle]"; } static std::string symbol() { return "[QS]"; } }; } // namespace units } // namespace boost #endif // BOOST_UNITS_ABSTRACT_HPP