]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/geometry/include/boost/geometry/algorithms/detail/turns/debug_turn.hpp
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / boost / libs / geometry / include / boost / geometry / algorithms / detail / turns / debug_turn.hpp
1 // Boost.Geometry (aka GGL, Generic Geometry Library)
2
3 // Copyright (c) 2014, Oracle and/or its affiliates.
4
5 // Licensed under the Boost Software License version 1.0.
6 // http://www.boost.org/users/license.html
7
8 // Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
9
10 #ifndef BOOST_GEOMETRY_ALGORITHMS_DETAIL_TURNS_DEBUG_TURN_HPP
11 #define BOOST_GEOMETRY_ALGORITHMS_DETAIL_TURNS_DEBUG_TURN_HPP
12
13 #ifdef BOOST_GEOMETRY_DEBUG_TURNS
14 #include <iostream>
15 #include <string>
16
17 #include <boost/algorithm/string/predicate.hpp>
18
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
22
23
24 namespace boost { namespace geometry
25 {
26
27 #ifndef DOXYGEN_NO_DETAIL
28 namespace detail { namespace turns
29 {
30
31
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)
36 {
37 std::cout << 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)
44 << std::endl;
45
46 if (boost::contains(header, "Finished"))
47 {
48 std::cout << std::endl;
49 }
50 }
51 #else
52 template <typename Turn, typename Operation>
53 inline void debug_turn(Turn const& , Operation, const char*)
54 {
55 }
56 #endif // BOOST_GEOMETRY_DEBUG_TURNS
57
58
59 }} // namespace detail::turns
60 #endif // DOXYGEN_NO_DETAIL
61
62 }} // namespace boost:geometry
63
64
65 #endif // BOOST_GEOMETRY_ALGORITHMS_DETAIL_TURNS_DEBUG_TURN_HPP