point.hpp 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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-2020.
  7. // Modifications copyright (c) 2015-2020, 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. // Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
  12. // (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
  13. // Distributed under the Boost Software License, Version 1.0.
  14. // (See accompanying file LICENSE_1_0.txt or copy at
  15. // http://www.boost.org/LICENSE_1_0.txt)
  16. #ifndef BOOST_GEOMETRY_ALGORITHMS_DETAIL_EXPAND_POINT_HPP
  17. #define BOOST_GEOMETRY_ALGORITHMS_DETAIL_EXPAND_POINT_HPP
  18. #include <boost/geometry/algorithms/dispatch/expand.hpp>
  19. #include <boost/geometry/core/tags.hpp>
  20. namespace boost { namespace geometry
  21. {
  22. #ifndef DOXYGEN_NO_DISPATCH
  23. namespace dispatch
  24. {
  25. // Box + point -> new box containing also point
  26. template
  27. <
  28. typename BoxOut, typename Point
  29. >
  30. struct expand
  31. <
  32. BoxOut, Point,
  33. box_tag, point_tag
  34. >
  35. {
  36. template <typename Strategy>
  37. static inline void apply(BoxOut& box,
  38. Point const& point,
  39. Strategy const& strategy)
  40. {
  41. // strategy.expand(box, point).apply(box, point);
  42. using strategy_t = decltype(strategy.expand(box, point));
  43. strategy_t::apply(box, point);
  44. }
  45. };
  46. } // namespace dispatch
  47. #endif // DOXYGEN_NO_DISPATCH
  48. }} // namespace boost::geometry
  49. #endif // BOOST_GEOMETRY_ALGORITHMS_DETAIL_EXPAND_POINT_HPP