Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-09-17 08:30:34

0001 // Boost.Geometry (aka GGL, Generic Geometry Library)
0002 
0003 // Copyright (c) 2007-2025 Barend Gehrels, Amsterdam, the Netherlands.
0004 // Copyright (c) 2023-2024 Adam Wulkiewicz, Lodz, Poland.
0005 
0006 // This file was modified by Oracle on 2017-2024.
0007 // Modifications copyright (c) 2017-2024 Oracle and/or its affiliates.
0008 // Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle
0009 // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
0010 
0011 // Use, modification and distribution is subject to the Boost Software License,
0012 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
0013 // http://www.boost.org/LICENSE_1_0.txt)
0014 
0015 #ifndef BOOST_GEOMETRY_ALGORITHMS_DETAIL_OVERLAY_DEBUG_TRAVERSE_HPP
0016 #define BOOST_GEOMETRY_ALGORITHMS_DETAIL_OVERLAY_DEBUG_TRAVERSE_HPP
0017 
0018 #include <boost/geometry/algorithms/detail/overlay/turn_info.hpp>
0019 
0020 #if defined(BOOST_GEOMETRY_DEBUG_INTERSECTION) \
0021     || defined(BOOST_GEOMETRY_OVERLAY_REPORT_WKT) \
0022     || defined(BOOST_GEOMETRY_DEBUG_TRAVERSE)
0023 #  include <string>
0024 #  include <boost/geometry/algorithms/detail/overlay/debug_turn_info.hpp>
0025 #  include <boost/geometry/io/wkt/wkt.hpp>
0026 #endif
0027 
0028 namespace boost { namespace geometry
0029 {
0030 
0031 #ifndef DOXYGEN_NO_DETAIL
0032 namespace detail { namespace overlay
0033 {
0034 
0035 template <typename Turn, typename Operation>
0036 #ifdef BOOST_GEOMETRY_DEBUG_TRAVERSE
0037 inline void debug_traverse(Turn const& turn, Operation op,
0038                 std::string const& header, bool condition = true)
0039 {
0040     if (! condition)
0041     {
0042         return;
0043     }
0044     std::cout << " " << header
0045         << " at " << op.seg_id
0046         << " meth: " << method_char(turn.method)
0047         << " op: " << operation_char(op.operation)
0048         << " of:  " << operation_char(turn.operations[0].operation)
0049         << operation_char(turn.operations[1].operation)
0050         << " " << geometry::wkt(turn.point)
0051         << std::endl;
0052 
0053     if (boost::contains(header, "Finished"))
0054     {
0055         std::cout << std::endl;
0056     }
0057 }
0058 #else
0059 inline void debug_traverse(Turn const& , Operation, const char*, bool = true)
0060 {
0061 }
0062 #endif
0063 
0064 }} // namespace detail::overlay
0065 #endif // DOXYGEN_NO_DETAIL
0066 
0067 }} // namespace boost::geometry
0068 
0069 #endif // BOOST_GEOMETRY_ALGORITHMS_DETAIL_OVERLAY_DEBUG_TRAVERSE_HPP