expand_box.hpp 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. // Boost.Geometry (aka GGL, Generic Geometry Library)
  2. // Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
  3. // Copyright (c) 2008-2015 Bruno Lalande, Paris, France.
  4. // Copyright (c) 2009-2015 Mateusz Loskot, London, UK.
  5. // Copyright (c) 2014-2015 Samuel Debionne, Grenoble, France.
  6. // This file was modified by Oracle on 2015, 2016, 2017.
  7. // Modifications copyright (c) 2015-2017, Oracle and/or its affiliates.
  8. // Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle
  9. // Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
  10. // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
  11. // Distributed under the Boost Software License, Version 1.0.
  12. // (See accompanying file LICENSE_1_0.txt or copy at
  13. // http://www.boost.org/LICENSE_1_0.txt)
  14. #ifndef BOOST_GEOMETRY_STRATEGY_CARTESIAN_EXPAND_BOX_HPP
  15. #define BOOST_GEOMETRY_STRATEGY_CARTESIAN_EXPAND_BOX_HPP
  16. #include <boost/geometry/core/tags.hpp>
  17. #include <boost/geometry/algorithms/detail/expand/indexed.hpp>
  18. #include <boost/geometry/strategy/expand.hpp>
  19. namespace boost { namespace geometry
  20. {
  21. namespace strategy { namespace expand
  22. {
  23. struct cartesian_box
  24. {
  25. template <typename BoxOut, typename BoxIn>
  26. static void apply(BoxOut & box_out, BoxIn const& box_in)
  27. {
  28. geometry::detail::expand::expand_indexed
  29. <
  30. 0, dimension<BoxIn>::value
  31. >::apply(box_out, box_in);
  32. }
  33. };
  34. #ifndef DOXYGEN_NO_STRATEGY_SPECIALIZATIONS
  35. namespace services
  36. {
  37. template <typename CalculationType>
  38. struct default_strategy<box_tag, cartesian_tag, CalculationType>
  39. {
  40. typedef cartesian_box type;
  41. };
  42. } // namespace services
  43. #endif // DOXYGEN_NO_STRATEGY_SPECIALIZATIONS
  44. }} // namespace strategy::expand
  45. }} // namespace boost::geometry
  46. #endif // BOOST_GEOMETRY_STRATEGY_CARTESIAN_EXPAND_BOX_HPP