Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:35:13

0001 // Boost.Geometry
0002 
0003 // Copyright (c) 2022, Oracle and/or its affiliates.
0004 
0005 // Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle
0006 
0007 // Licensed under the Boost Software License version 1.0.
0008 // http://www.boost.org/users/license.html
0009 
0010 #ifndef BOOST_GEOMETRY_ALGORITHMS_DETAIL_RELATE_BOX_AREAL_HPP
0011 #define BOOST_GEOMETRY_ALGORITHMS_DETAIL_RELATE_BOX_AREAL_HPP
0012 
0013 #include <boost/geometry/algorithms/detail/relate/areal_areal.hpp>
0014 #include <boost/geometry/views/box_view.hpp>
0015 
0016 namespace boost { namespace geometry
0017 {
0018 
0019 #ifndef DOXYGEN_NO_DETAIL
0020 namespace detail { namespace relate {
0021 
0022 
0023 // The implementation of an algorithm calculating relate() for B/A
0024 template <typename Box, typename Areal>
0025 struct box_areal
0026 {
0027     static const bool interruption_enabled = true;
0028 
0029     template <typename Result, typename Strategy>
0030     static inline void apply(Box const& box, Areal const& areal,
0031                              Result& result,
0032                              Strategy const& strategy)
0033     {
0034         using is_cartesian = std::is_same
0035             <
0036                 typename Strategy::cs_tag,
0037                 cartesian_tag
0038             >;
0039         apply(box, areal, result, strategy, is_cartesian());
0040     }
0041 
0042     template <typename Result, typename Strategy>
0043     static inline void apply(Box const& box, Areal const& areal,
0044                              Result& result,
0045                              Strategy const& strategy,
0046                              std::true_type /*is_cartesian*/)
0047     {
0048         using box_view = boost::geometry::box_view<Box>;
0049         box_view view(box);
0050         areal_areal<box_view, Areal>::apply(view, areal, result, strategy);
0051     }
0052 
0053     template <typename Result, typename Strategy>
0054     static inline void apply(Box const& /* box */, Areal const& /* areal */,
0055                              Result& /* result */,
0056                              Strategy const& /* strategy */,
0057                              std::false_type /*is_cartesian*/)
0058     {
0059         BOOST_GEOMETRY_STATIC_ASSERT_FALSE(
0060             "Not implemented for this coordinate system.",
0061             typename Strategy::cs_tag());
0062     }
0063 };
0064 
0065 }} // namespace detail::relate
0066 #endif // DOXYGEN_NO_DETAIL
0067 
0068 }} // namespace boost::geometry
0069 
0070 #endif // BOOST_GEOMETRY_ALGORITHMS_DETAIL_RELATE_BOX_AREAL_HPP