|
From: Matthias S. <mat...@us...> - 2007-04-13 04:53:49
|
Update of /cvsroot/boost-sandbox/boost-sandbox/boost/units In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv12373/boost/units Added Files: is_dimensionless.hpp is_dimensionless_quantity.hpp is_dimensionless_unit.hpp is_quantity.hpp is_quantity_of_dimension.hpp is_quantity_of_system.hpp is_unit.hpp is_unit_of_dimension.hpp is_unit_of_system.hpp Log Message: add granular headers for predicates --- NEW FILE: is_dimensionless_unit.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_IS_DIMENSIONLESS_UNIT_HPP #define BOOST_UNITS_IS_DIMENSIONLESS_UNIT_HPP #include <boost/units/is_unit_of_dimension.hpp> #include <boost/units/units_fwd.hpp> namespace boost { namespace units { /// check that a type is a dimensionless unit template<class T> struct is_dimensionless_unit : public is_unit_of_dimension<T,dimensionless_type> { }; } // namespace units } // namespace boost #endif // BOOST_UNITS_IS_DIMENSIONLESS_UNIT_HPP --- NEW FILE: is_quantity_of_system.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_IS_QUANTITY_OF_SYSTEM_HPP #define BOOST_UNITS_IS_QUANTITY_OF_SYSTEM_HPP #include <boost/units/mpl/bool.hpp> #include <boost/units/units_fwd.hpp> namespace boost { namespace units { /// check that a type is a quantity in a specified system template<class T,class System> struct is_quantity_of_system : public mpl::false_ { }; template<class Dim, class System, class Y> struct is_quantity_of_system< quantity< unit<Dim,System>,Y>,System > : public mpl::true_ { }; } // namespace units } // namespace boost #endif // BOOST_UNITS_IS_QUANTITY_OF_SYSTEM_HPP --- NEW FILE: is_dimensionless_quantity.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_IS_DIMENSIONLESS_QUANTITY_HPP #define BOOST_UNITS_IS_DIMENSIONLESS_QUANTITY_HPP #include <boost/units/is_quantity_of_dimension.hpp> #include <boost/units/units_fwd.hpp> namespace boost { namespace units { /// check that a type is a dimensionless quantity template<class T> struct is_dimensionless_quantity : public is_quantity_of_dimension<T,dimensionless_type> { }; } // namespace units } // namespace boost #endif // BOOST_UNITS_IS_DIMENSIONLESS_QUANTITY_HPP --- NEW FILE: is_unit_of_system.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_IS_UNIT_OF_SYSTEM_HPP #define BOOST_UNITS_IS_UNIT_OF_SYSTEM_HPP #include <boost/units/mpl/bool.hpp> #include <boost/units/units_fwd.hpp> namespace boost { namespace units { /// check that a type is a unit in a specified system template<class T,class System> struct is_unit_of_system : public mpl::false_ { }; template<class Dim,class System> struct is_unit_of_system< unit<Dim,System>,System > : public mpl::true_ { }; } // namespace units } // namespace boost #endif // BOOST_UNITS_IS_UNIT_OF_SYSTEM_HPP --- NEW FILE: is_unit.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_IS_UNIT_HPP #define BOOST_UNITS_IS_UNIT_HPP #include <boost/units/units_fwd.hpp> namespace boost { namespace units { /// check that a type is a unit template<class T> struct is_unit : public mpl::false_ { }; template<class Dim,class System> struct is_unit< unit<Dim,System> > : public mpl::true_ { }; } // namespace units } // namespace boost #endif // BOOST_UNITS_IS_UNIT_HPP --- NEW FILE: is_dimensionless.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_IS_DIMENSIONLESS_HPP #define BOOST_UNITS_IS_DIMENSIONLESS_HPP #include <boost/units/units_fwd.hpp> namespace boost { namespace units { template<class T> struct is_dimensionless : public mpl::false_ { }; /// check if a unit is dimensionless template<class System> struct is_dimensionless< unit<dimensionless_type,System> > : public mpl::true_ { }; /// check if a quantity is dimensionless template<class Unit,class Y> struct is_dimensionless< quantity<Unit,Y> > : public is_dimensionless<Unit> { }; } // namespace units } // namespace boost #endif // BOOST_UNITS_IS_DIMENSIONLESS_HPP --- NEW FILE: is_quantity.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_IS_QUANTITY_HPP #define BOOST_UNITS_IS_QUANTITY_HPP #include <boost/units/units_fwd.hpp> namespace boost { namespace units { /// check that a type is a quantity template<typename T> struct is_quantity : public mpl::false_ { }; template<class Unit, class Y> struct is_quantity< quantity<Unit,Y> > : public mpl::true_ { }; } // namespace units } // namespace boost #endif // BOOST_UNITS_IS_QUANTITY_HPP --- NEW FILE: is_quantity_of_dimension.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_IS_QUANTITY_OF_DIMENSION_HPP #define BOOST_UNITS_IS_QUANTITY_OF_DIMENSION_HPP #include <boost/units/mpl/bool.hpp> #include <boost/units/units_fwd.hpp> namespace boost { namespace units { /// check that a type is a quantity of the specified dimension template<class T,class Dim> struct is_quantity_of_dimension : public mpl::false_ { }; template<class Dim,class System,class Y> struct is_quantity_of_dimension< quantity< unit<Dim,System>,Y>,Dim > : public mpl::true_ { }; } // namespace units } // namespace boost #endif // BOOST_UNITS_IS_QUANTITY_OF_DIMENSION_HPP --- NEW FILE: is_unit_of_dimension.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_IS_UNIT_OF_DIMENSION_HPP #define BOOST_UNITS_IS_UNIT_OF_DIMENSION_HPP #include <boost/units/mpl/bool.hpp> #include <boost/units/units_fwd.hpp> namespace boost { namespace units { /// check that a type is a unit of the specified dimension template<class T,class Dim> struct is_unit_of_dimension : public mpl::false_ { }; template<class Dim,class System> struct is_unit_of_dimension< unit<Dim,System>,Dim > : public mpl::true_ { }; } // namespace units } // namespace boost #endif // BOOST_UNITS_IS_UNIT_OF_DIMENSION_HPP |