Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // Boost.Geometry (aka GGL, Generic Geometry Library)
0002 
0003 // Copyright (c) 2007-2014 Barend Gehrels, Amsterdam, the Netherlands.
0004 // Copyright (c) 2008-2014 Bruno Lalande, Paris, France.
0005 // Copyright (c) 2009-2014 Mateusz Loskot, London, UK.
0006 // Copyright (c) 2013-2014 Adam Wulkiewicz, Lodz, Poland.
0007 
0008 // This file was modified by Oracle on 2013-2020.
0009 // Modifications copyright (c) 2013-2020, Oracle and/or its affiliates.
0010 // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
0011 // Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
0012 
0013 // Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
0014 // (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
0015 
0016 // Use, modification and distribution is subject to the Boost Software License,
0017 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
0018 // http://www.boost.org/LICENSE_1_0.txt)
0019 
0020 #ifndef BOOST_GEOMETRY_ALGORITHMS_POLICIES_DISJOINT_INTERRUPT_POLICY_HPP
0021 #define BOOST_GEOMETRY_ALGORITHMS_POLICIES_DISJOINT_INTERRUPT_POLICY_HPP
0022 
0023 #include <boost/range/size.hpp>
0024 
0025 
0026 namespace boost { namespace geometry
0027 {
0028 
0029 
0030 #ifndef DOXYGEN_NO_DETAIL
0031 namespace detail { namespace disjoint
0032 {
0033 
0034 
0035 struct disjoint_interrupt_policy
0036 {
0037     static bool const enabled = true;
0038     bool has_intersections;
0039 
0040     inline disjoint_interrupt_policy()
0041         : has_intersections(false)
0042     {}
0043 
0044     template <typename Range>
0045     inline bool apply(Range const& range)
0046     {
0047         // If there is any IP in the range, it is NOT disjoint
0048         if (boost::size(range) > 0)
0049         {
0050             has_intersections = true;
0051             return true;
0052         }
0053         return false;
0054     }
0055 };
0056 
0057 
0058 
0059 }} // namespace detail::disjoint
0060 #endif // DOXYGEN_NO_DETAIL
0061 
0062 
0063 }} // namespace boost::geometry
0064 
0065 
0066 #endif // BOOST_GEOMETRY_ALGORITHMS_POLICIES_DISJOINT_INTERRUPT_POLICY_HPP