Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // Boost.Geometry (aka GGL, Generic Geometry Library)
0002 
0003 // Copyright (c) 2014, Oracle and/or its affiliates.
0004 
0005 // Licensed under the Boost Software License version 1.0.
0006 // http://www.boost.org/users/license.html
0007 
0008 // Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
0009 
0010 #ifndef BOOST_GEOMETRY_ALGORITHMS_DETAIL_TURNS_DEBUG_TURN_HPP
0011 #define BOOST_GEOMETRY_ALGORITHMS_DETAIL_TURNS_DEBUG_TURN_HPP
0012 
0013 #ifdef BOOST_GEOMETRY_DEBUG_TURNS
0014 #include <iostream>
0015 #include <string>
0016 
0017 #include <boost/algorithm/string/predicate.hpp>
0018 
0019 #include <boost/geometry/io/wkt/write.hpp>
0020 #include <boost/geometry/algorithms/detail/overlay/debug_turn_info.hpp>
0021 #endif // BOOST_GEOMETRY_DEBUG_TURNS
0022 
0023 
0024 namespace boost { namespace geometry
0025 {
0026 
0027 #ifndef DOXYGEN_NO_DETAIL
0028 namespace detail { namespace turns
0029 {
0030 
0031 
0032 #ifdef BOOST_GEOMETRY_DEBUG_TURNS
0033 template <typename Turn, typename Operation>
0034 inline void debug_turn(Turn const& turn, Operation op,
0035                        std::string const& header)
0036 {
0037     std::cout << header
0038         << " at " << op.seg_id
0039         << " meth: " << method_char(turn.method)
0040         << " op: " << operation_char(op.operation)
0041         << " of: " << operation_char(turn.operations[0].operation)
0042         << operation_char(turn.operations[1].operation)
0043         << " " << geometry::wkt(turn.point)
0044         << std::endl;
0045 
0046     if (boost::contains(header, "Finished"))
0047     {
0048         std::cout << std::endl;
0049     }
0050 }
0051 #else
0052 template <typename Turn, typename Operation>
0053 inline void debug_turn(Turn const& , Operation, const char*)
0054 {
0055 }
0056 #endif // BOOST_GEOMETRY_DEBUG_TURNS
0057 
0058 
0059 }} // namespace detail::turns
0060 #endif // DOXYGEN_NO_DETAIL
0061 
0062 }} // namespace boost:geometry
0063 
0064 
0065 #endif // BOOST_GEOMETRY_ALGORITHMS_DETAIL_TURNS_DEBUG_TURN_HPP