From: Matthias S. <mat...@us...> - 2007-04-13 06:08:53
|
Update of /cvsroot/boost-sandbox/boost-sandbox/boost/units/detail In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv11338/boost/units/detail Modified Files: dim_impl.hpp dimension_impl.hpp Log Message: changes to use granular headers Index: dimension_impl.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/boost/units/detail/dimension_impl.hpp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- dimension_impl.hpp 12 Apr 2007 00:39:12 -0000 1.2 +++ dimension_impl.hpp 13 Apr 2007 06:08:52 -0000 1.3 @@ -19,63 +19,66 @@ #include <boost/mpl/push_front.hpp> #include <boost/mpl/size.hpp> +#include <boost/units/config.hpp> +#include <boost/units/dimension_list.hpp> #include <boost/units/static_rational.hpp> +#include <boost/units/units_fwd.hpp> /// \file /// \brief Core class and metaprogramming utilities for compile-time dimensional analysis. /// /// \detailed -namespace boost { - -namespace units { - -struct dimensionless_type; - -} - -} - -#if BOOST_UNITS_HAS_BOOST_TYPEOF - -#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP() - -BOOST_TYPEOF_REGISTER_TYPE(boost::units::dimensionless_type) - -#endif - -namespace boost { - -namespace units { - -namespace detail { - -struct dimension_list_tag { }; - -} // namespace detail - -template<class Item, class Next> -struct dimension_list -{ - typedef detail::dimension_list_tag tag; - typedef dimension_list type; - typedef Item item; - typedef Next next; - typedef typename mpl::next<typename Next::size>::type size; -}; - -} - -} - -#if BOOST_UNITS_HAS_BOOST_TYPEOF - -#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP() - -BOOST_TYPEOF_REGISTER_TEMPLATE(boost::units::dimension_list, 2) - -#endif +//namespace boost { +// +//namespace units { +// +//struct dimensionless_type; +// +//} +// +//} +// +//#if BOOST_UNITS_HAS_BOOST_TYPEOF +// +//#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP() +// +//BOOST_TYPEOF_REGISTER_TYPE(boost::units::dimensionless_type) +// +//#endif +//namespace boost { +// +//namespace units { +// +//namespace detail { +// +//struct dimension_list_tag { }; +// +//} // namespace detail +// +//template<class Item, class Next> +//struct dimension_list +//{ +// typedef detail::dimension_list_tag tag; +// typedef dimension_list type; +// typedef Item item; +// typedef Next next; +// typedef typename mpl::next<typename Next::size>::type size; +//}; +// +//} +// +//} +// +//#if BOOST_UNITS_HAS_BOOST_TYPEOF +// +//#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP() +// +//BOOST_TYPEOF_REGISTER_TEMPLATE(boost::units::dimension_list, 2) +// +//#endif +// namespace boost { namespace units { Index: dim_impl.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/boost/units/detail/dim_impl.hpp,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- dim_impl.hpp 13 Apr 2007 04:56:14 -0000 1.3 +++ dim_impl.hpp 13 Apr 2007 06:08:52 -0000 1.4 @@ -14,52 +14,52 @@ #include <boost/mpl/bool_fwd.hpp> #include <boost/mpl/less.hpp> -#include <boost/units/static_rational.hpp> +#include <boost/units/units_fwd.hpp> /// \file /// \brief Class encapsulating a dimension tag/value pair -namespace boost { - -namespace units { - -namespace detail { - -struct dim_tag { }; - -} - -/// \brief Dimension tag/exponent pair for a single fundamental dimension. -/// -/// \detailed -/// The dim class represents a single dimension tag/dimension exponent pair. -/// That is, @c dim<tag_type,value_type> is a pair where @c tag_type represents the -/// fundamental dimension being represented and @c value_type represents the -/// exponent of that fundamental dimension as a @c static_rational or other type -/// providing the required compile-time arithmetic operations. @c tag_type must -/// provide an ordinal value to allow sorting of lists of dims at compile-time. -/// This can be easily accomplished by inheriting from @c ordinal<N>. Otherwise, -/// @c tag_type may be any type. -template<typename T,typename V> -struct dim -{ - typedef dim type; - typedef detail::dim_tag tag; - typedef T tag_type; - typedef V value_type; -}; - -} - -} - -#if BOOST_UNITS_HAS_BOOST_TYPEOF - -#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP() - -BOOST_TYPEOF_REGISTER_TEMPLATE(boost::units::dim, 2) - -#endif +//namespace boost { +// +//namespace units { +// +//namespace detail { +// +//struct dim_tag { }; +// +//} // namespace detail +// +///// \brief Dimension tag/exponent pair for a single fundamental dimension. +///// +///// \detailed +///// The dim class represents a single dimension tag/dimension exponent pair. +///// That is, @c dim<tag_type,value_type> is a pair where @c tag_type represents the +///// fundamental dimension being represented and @c value_type represents the +///// exponent of that fundamental dimension as a @c static_rational or other type +///// providing the required compile-time arithmetic operations. @c tag_type must +///// provide an ordinal value to allow sorting of lists of dims at compile-time. +///// This can be easily accomplished by inheriting from @c ordinal<N>. Otherwise, +///// @c tag_type may be any type. +//template<typename T,typename V> +//struct dim +//{ +// typedef dim type; +// typedef detail::dim_tag tag; +// typedef T tag_type; +// typedef V value_type; +//}; +// +//} // namespace units +// +//} // namespace boost +// +//#if BOOST_UNITS_HAS_BOOST_TYPEOF +// +//#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP() +// +//BOOST_TYPEOF_REGISTER_TEMPLATE(boost::units::dim, 2) +// +//#endif namespace boost { |