Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // Boost.Geometry (aka GGL, Generic Geometry Library)
0002 
0003 // Copyright (c) 2014-2015, Oracle and/or its affiliates.
0004 
0005 // Contributed and/or modified by Menelaos Karavelas, 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_IS_VALID_DEBUG_PRINT_TURNS_HPP
0011 #define BOOST_GEOMETRY_ALGORITHMS_DETAIL_IS_VALID_DEBUG_PRINT_TURNS_HPP
0012 
0013 #ifdef BOOST_GEOMETRY_TEST_DEBUG
0014 #include <iostream>
0015 
0016 #include <boost/geometry/io/dsv/write.hpp>
0017 #include <boost/geometry/algorithms/detail/overlay/debug_turn_info.hpp>
0018 #endif
0019 
0020 
0021 namespace boost { namespace geometry
0022 {
0023 
0024 namespace detail { namespace is_valid
0025 {
0026 
0027 #ifdef BOOST_GEOMETRY_TEST_DEBUG
0028 template <typename Turn>
0029 inline void debug_print_turn(Turn const& turn)
0030 {
0031     std::cout << " ["
0032               << geometry::method_char(turn.method)
0033               << ","
0034               << geometry::operation_char(turn.operations[0].operation)
0035               << "/"
0036               << geometry::operation_char(turn.operations[1].operation)
0037               << " {"
0038               << turn.operations[0].seg_id.multi_index
0039               << ", "
0040               << turn.operations[1].seg_id.multi_index
0041               << "} {"
0042               << turn.operations[0].seg_id.ring_index
0043               << ", "
0044               << turn.operations[1].seg_id.ring_index
0045               << "} {"
0046               << turn.operations[0].seg_id.segment_index
0047               << ", "
0048               << turn.operations[1].seg_id.segment_index
0049               << "} "
0050               << geometry::dsv(turn.point)
0051               << "]";
0052 }
0053 
0054 template <typename TurnIterator>
0055 inline void debug_print_turns(TurnIterator first, TurnIterator beyond)
0056 {
0057     std::cout << "turns:";
0058     for (TurnIterator tit = first; tit != beyond; ++tit)
0059     {
0060         debug_print_turn(*tit);
0061     }
0062     std::cout << std::endl << std::endl;
0063 }
0064 #else
0065 template <typename Turn>
0066 inline void debug_print_turn(Turn const&)
0067 {}
0068 
0069 template <typename TurnIterator>
0070 inline void debug_print_turns(TurnIterator, TurnIterator)
0071 {}
0072 #endif // BOOST_GEOMETRY_TEST_DEBUG
0073 
0074 }} // namespace detail::is_valid
0075 
0076 }} // namespace boost::geometry
0077 
0078 #endif // BOOST_GEOMETRY_ALGORITHMS_DETAIL_IS_VALID_DEBUG_PRINT_TURNS_HPP