within.hpp 3.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. // Boost.Geometry (aka GGL, Generic Geometry Library)
  2. // Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
  3. // Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
  4. // Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
  5. // This file was modified by Oracle on 2017.
  6. // Modifications copyright (c) 2017, Oracle and/or its affiliates.
  7. // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
  8. // Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
  9. // (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
  10. // Use, modification and distribution is subject to the Boost Software License,
  11. // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
  12. // http://www.boost.org/LICENSE_1_0.txt)
  13. #ifndef BOOST_GEOMETRY_STRATEGIES_WITHIN_HPP
  14. #define BOOST_GEOMETRY_STRATEGIES_WITHIN_HPP
  15. #include <boost/mpl/assert.hpp>
  16. #include <boost/geometry/core/cs.hpp>
  17. #include <boost/geometry/core/point_type.hpp>
  18. #include <boost/geometry/core/tag.hpp>
  19. #include <boost/geometry/core/tags.hpp>
  20. #include <boost/geometry/core/tag_cast.hpp>
  21. namespace boost { namespace geometry
  22. {
  23. namespace strategy { namespace within
  24. {
  25. namespace services
  26. {
  27. /*!
  28. \brief Traits class binding a within determination strategy to a coordinate system
  29. \ingroup within
  30. \tparam GeometryContained geometry-type of input (possibly) contained type
  31. \tparam GeometryContaining geometry-type of input (possibly) containing type
  32. \tparam TagContained casted tag of (possibly) contained type
  33. \tparam TagContaining casted tag of (possibly) containing type
  34. \tparam CsTagContained tag of coordinate system of (possibly) contained type
  35. \tparam CsTagContaining tag of coordinate system of (possibly) containing type
  36. */
  37. template
  38. <
  39. typename GeometryContained,
  40. typename GeometryContaining,
  41. typename TagContained = typename tag<GeometryContained>::type,
  42. typename TagContaining = typename tag<GeometryContaining>::type,
  43. typename CastedTagContained = typename tag_cast
  44. <
  45. typename tag<GeometryContained>::type,
  46. pointlike_tag, linear_tag, polygonal_tag, areal_tag
  47. >::type,
  48. typename CastedTagContaining = typename tag_cast
  49. <
  50. typename tag<GeometryContaining>::type,
  51. pointlike_tag, linear_tag, polygonal_tag, areal_tag
  52. >::type,
  53. typename CsTagContained = typename tag_cast
  54. <
  55. typename cs_tag<typename point_type<GeometryContained>::type>::type,
  56. spherical_tag
  57. >::type,
  58. typename CsTagContaining = typename tag_cast
  59. <
  60. typename cs_tag<typename point_type<GeometryContaining>::type>::type,
  61. spherical_tag
  62. >::type
  63. >
  64. struct default_strategy
  65. {
  66. BOOST_MPL_ASSERT_MSG
  67. (
  68. false, NOT_IMPLEMENTED_FOR_THESE_TYPES
  69. , (types<GeometryContained, GeometryContaining>)
  70. );
  71. };
  72. } // namespace services
  73. }} // namespace strategy::within
  74. }} // namespace boost::geometry
  75. #endif // BOOST_GEOMETRY_STRATEGIES_WITHIN_HPP