Imported Upstream version 1.64.0
[platform/upstream/boost.git] / boost / geometry / algorithms / detail / overlay / get_turn_info_ll.hpp
index 6bb3a74..58fd4bb 100644 (file)
@@ -1,19 +1,22 @@
 // Boost.Geometry (aka GGL, Generic Geometry Library)
 
 // Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2017 Adam Wulkiewicz, Lodz, Poland.
 
-// This file was modified by Oracle on 2013, 2014, 2015.
-// Modifications copyright (c) 2013-2015 Oracle and/or its affiliates.
+// This file was modified by Oracle on 2013, 2014, 2015, 2017.
+// Modifications copyright (c) 2013-2017 Oracle and/or its affiliates.
+
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
 
 // Use, modification and distribution is subject to the Boost Software License,
 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
 // http://www.boost.org/LICENSE_1_0.txt)
 
-// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
-
 #ifndef BOOST_GEOMETRY_ALGORITHMS_DETAIL_OVERLAY_GET_TURN_INFO_LL_HPP
 #define BOOST_GEOMETRY_ALGORITHMS_DETAIL_OVERLAY_GET_TURN_INFO_LL_HPP
 
+#include <boost/throw_exception.hpp>
+
 #include <boost/geometry/core/assert.hpp>
 
 #include <boost/geometry/algorithms/detail/overlay/get_turn_info.hpp>
@@ -36,6 +39,7 @@ struct get_turn_info_linear_linear
         typename Point1,
         typename Point2,
         typename TurnInfo,
+        typename IntersectionStrategy,
         typename RobustPolicy,
         typename OutputIterator
     >
@@ -45,13 +49,19 @@ struct get_turn_info_linear_linear
                 bool is_p_first, bool is_p_last,
                 bool is_q_first, bool is_q_last,
                 TurnInfo const& tp_model,
+                IntersectionStrategy const& strategy,
                 RobustPolicy const& robust_policy,
                 OutputIterator out)
     {
-        typedef intersection_info<Point1, Point2, typename TurnInfo::point_type, RobustPolicy>
-            inters_info;
+        typedef intersection_info
+            <
+                Point1, Point2,
+                typename TurnInfo::point_type,
+                IntersectionStrategy,
+                RobustPolicy
+            > inters_info;
 
-        inters_info inters(pi, pj, pk, qi, qj, qk, robust_policy);
+        inters_info inters(pi, pj, pk, qi, qj, qk, strategy, robust_policy);
 
         char const method = inters.d_info().how;
 
@@ -103,9 +113,11 @@ struct get_turn_info_linear_linear
                             <
                                 typename inters_info::cs_tag,
                                 typename inters_info::robust_point2_type,
-                                typename inters_info::robust_point1_type
+                                typename inters_info::robust_point1_type,
+                                typename inters_info::side_strategy_type
                             > swapped_side_calc(inters.rqi(), inters.rqj(), inters.rqk(),
-                                                inters.rpi(), inters.rpj(), inters.rpk());
+                                                inters.rpi(), inters.rpj(), inters.rpk(),
+                                                inters.get_side_strategy());
 
                         policy::template apply<1>(qi, qj, qk, pi, pj, pk,
                                                   tp, inters.i_info(), inters.d_info(),
@@ -463,7 +475,7 @@ struct get_turn_info_linear_linear
                 std::cout << "TURN: Unknown method: " << method << std::endl;
 #endif
 #if ! defined(BOOST_GEOMETRY_OVERLAY_NO_THROW)
-                throw turn_info_exception(method);
+                BOOST_THROW_EXCEPTION(turn_info_exception(method));
 #endif
             }
             break;