File indexing completed on 2025-01-18 09:35:12
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014 #ifndef BOOST_GEOMETRY_ALGORITHMS_DETAIL_OVERLAY_STREAM_INFO_HPP
0015 #define BOOST_GEOMETRY_ALGORITHMS_DETAIL_OVERLAY_STREAM_INFO_HPP
0016
0017
0018 #include <string>
0019
0020 #include <boost/geometry/algorithms/detail/overlay/turn_info.hpp>
0021
0022
0023 namespace boost { namespace geometry
0024 {
0025
0026 #ifndef DOXYGEN_NO_DETAIL
0027 namespace detail { namespace overlay
0028 {
0029
0030
0031 static inline std::string dir(int d)
0032 {
0033 return d == 0 ? "-" : (d == 1 ? "L" : d == -1 ? "R" : "#");
0034 }
0035 static inline std::string how_str(int h)
0036 {
0037 return h == 0 ? "-" : (h == 1 ? "A" : "D");
0038 }
0039
0040 template <typename P, typename SR, typename O, typename C>
0041 std::ostream& operator<<(std::ostream &os, turn_info<P, SR, O, C> const& info)
0042 {
0043 os << "\t"
0044 << " src " << info.seg_id.source_index
0045 << " seg " << info.seg_id.segment_index
0046 << " (// " << info.other_id.source_index
0047 << "." << info.other_id.segment_index << ")"
0048 << " how " << info.how
0049 << "[" << how_str(info.arrival)
0050 << " " << dir(info.direction)
0051 << (info.opposite ? " o" : "")
0052 << "]"
0053 << " sd "
0054 << dir(info.sides.template get<0,0>())
0055 << dir(info.sides.template get<0,1>())
0056 << dir(info.sides.template get<1,0>())
0057 << dir(info.sides.template get<1,1>())
0058 << " nxt seg " << info.travels_to_vertex_index
0059 << " , ip " << info.travels_to_ip_index
0060 << " , or " << info.next_ip_index
0061 << " frac " << info.fraction
0062 << info.visit_state;
0063 if (info.flagged)
0064 {
0065 os << " FLAGGED";
0066 }
0067 return os;
0068 }
0069
0070
0071
0072 }}
0073 #endif
0074
0075
0076 }}
0077
0078
0079 #endif