box.hpp 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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, 2018.
  7. // Modifications copyright (c) 2015-2018, 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_ALGORITHMS_DETAIL_EXPAND_BOX_HPP
  15. #define BOOST_GEOMETRY_ALGORITHMS_DETAIL_EXPAND_BOX_HPP
  16. #include <boost/geometry/algorithms/dispatch/expand.hpp>
  17. #include <boost/geometry/core/tags.hpp>
  18. // For backward compatibility
  19. #include <boost/geometry/strategies/cartesian/expand_box.hpp>
  20. #include <boost/geometry/strategies/spherical/expand_box.hpp>
  21. namespace boost { namespace geometry
  22. {
  23. #ifndef DOXYGEN_NO_DISPATCH
  24. namespace dispatch
  25. {
  26. // Box + box -> new box containing two input boxes
  27. template
  28. <
  29. typename BoxOut, typename BoxIn
  30. >
  31. struct expand
  32. <
  33. BoxOut, BoxIn,
  34. box_tag, box_tag
  35. >
  36. {
  37. template <typename Strategy>
  38. static inline void apply(BoxOut& box_out,
  39. BoxIn const& box_in,
  40. Strategy const& )
  41. {
  42. Strategy::apply(box_out, box_in);
  43. }
  44. };
  45. } // namespace dispatch
  46. #endif // DOXYGEN_NO_DISPATCH
  47. }} // namespace boost::geometry
  48. #endif // BOOST_GEOMETRY_ALGORITHMS_DETAIL_EXPAND_INDEXED_HPP