bounds.hpp 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. // Boost.Geometry Index
  2. //
  3. // n-dimensional bounds
  4. //
  5. // Copyright (c) 2011-2013 Adam Wulkiewicz, Lodz, Poland.
  6. //
  7. // Use, modification and distribution is subject to the Boost Software License,
  8. // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
  9. // http://www.boost.org/LICENSE_1_0.txt)
  10. #ifndef BOOST_GEOMETRY_INDEX_DETAIL_ALGORITHMS_BOUNDS_HPP
  11. #define BOOST_GEOMETRY_INDEX_DETAIL_ALGORITHMS_BOUNDS_HPP
  12. namespace boost { namespace geometry { namespace index { namespace detail {
  13. namespace dispatch {
  14. template <typename Geometry,
  15. typename Bounds,
  16. typename TagGeometry = typename geometry::tag<Geometry>::type,
  17. typename TagBounds = typename geometry::tag<Bounds>::type>
  18. struct bounds
  19. {
  20. static inline void apply(Geometry const& g, Bounds & b)
  21. {
  22. geometry::convert(g, b);
  23. }
  24. };
  25. } // namespace dispatch
  26. template <typename Geometry, typename Bounds>
  27. inline void bounds(Geometry const& g, Bounds & b)
  28. {
  29. concept::check_concepts_and_equal_dimensions<Geometry const, Bounds>();
  30. dispatch::bounds<Geometry, Bounds>::apply(g, b);
  31. }
  32. }}}} // namespace boost::geometry::index::detail
  33. #endif // BOOST_GEOMETRY_INDEX_DETAIL_ALGORITHMS_BOUNDS_HPP