1 // Boost.Geometry (aka GGL, Generic Geometry Library)
3 // Copyright (c) 2014, Oracle and/or its affiliates.
5 // Licensed under the Boost Software License version 1.0.
6 // http://www.boost.org/users/license.html
8 // Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
10 #ifndef BOOST_GEOMETRY_ALGORITHMS_DETAIL_TURNS_DEBUG_TURN_HPP
11 #define BOOST_GEOMETRY_ALGORITHMS_DETAIL_TURNS_DEBUG_TURN_HPP
13 #ifdef BOOST_GEOMETRY_DEBUG_TURNS
17 #include <boost/algorithm/string/predicate.hpp>
19 #include <boost/geometry/io/wkt/write.hpp>
20 #include <boost/geometry/algorithms/detail/overlay/debug_turn_info.hpp>
21 #endif // BOOST_GEOMETRY_DEBUG_TURNS
24 namespace boost { namespace geometry
27 #ifndef DOXYGEN_NO_DETAIL
28 namespace detail { namespace turns
32 #ifdef BOOST_GEOMETRY_DEBUG_TURNS
33 template <typename Turn, typename Operation>
34 inline void debug_turn(Turn const& turn, Operation op,
35 std::string const& header)
38 << " at " << op.seg_id
39 << " meth: " << method_char(turn.method)
40 << " op: " << operation_char(op.operation)
41 << " of: " << operation_char(turn.operations[0].operation)
42 << operation_char(turn.operations[1].operation)
43 << " " << geometry::wkt(turn.point)
46 if (boost::contains(header, "Finished"))
48 std::cout << std::endl;
52 template <typename Turn, typename Operation>
53 inline void debug_turn(Turn const& , Operation, const char*)
56 #endif // BOOST_GEOMETRY_DEBUG_TURNS
59 }} // namespace detail::turns
60 #endif // DOXYGEN_NO_DETAIL
62 }} // namespace boost:geometry
65 #endif // BOOST_GEOMETRY_ALGORITHMS_DETAIL_TURNS_DEBUG_TURN_HPP