Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-08-21 08:45:54

0001 // Boost.Geometry
0002 
0003 // Copyright (c) 2025 Barend Gehrels, Amsterdam, the Netherlands.
0004 
0005 // Use, modification and distribution is subject to the Boost Software License,
0006 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
0007 // http://www.boost.org/LICENSE_1_0.txt)
0008 
0009 #ifndef BOOST_GEOMETRY_ALGORITHMS_DETAIL_OVERLAY_TURN_OPERATION_ID_HPP
0010 #define BOOST_GEOMETRY_ALGORITHMS_DETAIL_OVERLAY_TURN_OPERATION_ID_HPP
0011 
0012 #include <cstddef>
0013 #include <ostream>
0014 #include <tuple>
0015 
0016 namespace boost { namespace geometry
0017 {
0018 
0019 #ifndef DOXYGEN_NO_DETAIL
0020 namespace detail { namespace overlay
0021 {
0022 
0023 struct turn_operation_id
0024 {
0025     std::size_t turn_index{0};
0026     int operation_index{0};
0027 
0028     bool operator<(turn_operation_id const& other) const
0029     {
0030         return std::tie(turn_index, operation_index) < std::tie(other.turn_index, other.operation_index);
0031     }
0032 
0033     bool operator==(turn_operation_id const& other) const
0034     {
0035         return std::tie(turn_index, operation_index) == std::tie(other.turn_index, other.operation_index);
0036     }
0037 
0038     bool operator!=(turn_operation_id const& other) const
0039     {
0040         return ! operator==(other);
0041     }
0042 
0043     friend std::ostream& operator<<(std::ostream& os, turn_operation_id const& toi)
0044     {
0045         os << toi.turn_index << "[" << toi.operation_index << "]";
0046         return os;
0047     }
0048 };    
0049 
0050 }} // namespace detail::overlay
0051 #endif // DOXYGEN_NO_DETAIL
0052 
0053 }} // namespace boost::geometry
0054 
0055 #endif // BOOST_GEOMETRY_ALGORITHMS_DETAIL_OVERLAY_TURN_OPERATION_ID_HPP