Chris@16
|
1 // Boost.Geometry (aka GGL, Generic Geometry Library)
|
Chris@16
|
2
|
Chris@101
|
3 // Copyright (c) 2007-2014 Barend Gehrels, Amsterdam, the Netherlands.
|
Chris@101
|
4 // Copyright (c) 2008-2014 Bruno Lalande, Paris, France.
|
Chris@101
|
5 // Copyright (c) 2009-2014 Mateusz Loskot, London, UK.
|
Chris@101
|
6
|
Chris@101
|
7 // This file was modified by Oracle on 2014.
|
Chris@101
|
8 // Modifications copyright (c) 2014, Oracle and/or its affiliates.
|
Chris@101
|
9
|
Chris@101
|
10 // Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
|
Chris@16
|
11
|
Chris@16
|
12 // Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
|
Chris@16
|
13 // (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
|
Chris@16
|
14
|
Chris@16
|
15 // Use, modification and distribution is subject to the Boost Software License,
|
Chris@16
|
16 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
Chris@16
|
17 // http://www.boost.org/LICENSE_1_0.txt)
|
Chris@16
|
18
|
Chris@16
|
19 #ifndef BOOST_GEOMETRY_STRATEGIES_DISTANCE_HPP
|
Chris@16
|
20 #define BOOST_GEOMETRY_STRATEGIES_DISTANCE_HPP
|
Chris@16
|
21
|
Chris@16
|
22
|
Chris@16
|
23 #include <boost/mpl/assert.hpp>
|
Chris@16
|
24
|
Chris@16
|
25 #include <boost/geometry/core/cs.hpp>
|
Chris@16
|
26 #include <boost/geometry/strategies/tags.hpp>
|
Chris@16
|
27
|
Chris@16
|
28
|
Chris@16
|
29 namespace boost { namespace geometry
|
Chris@16
|
30 {
|
Chris@16
|
31
|
Chris@16
|
32
|
Chris@16
|
33 namespace strategy { namespace distance { namespace services
|
Chris@16
|
34 {
|
Chris@16
|
35
|
Chris@16
|
36
|
Chris@16
|
37 template <typename Strategy> struct tag {};
|
Chris@16
|
38
|
Chris@16
|
39 template <typename Strategy, typename P1, typename P2>
|
Chris@16
|
40 struct return_type
|
Chris@16
|
41 {
|
Chris@16
|
42 BOOST_MPL_ASSERT_MSG
|
Chris@16
|
43 (
|
Chris@16
|
44 false, NOT_IMPLEMENTED_FOR_THIS_STRATEGY, (types<Strategy, P1, P2>)
|
Chris@16
|
45 );
|
Chris@16
|
46 };
|
Chris@16
|
47
|
Chris@16
|
48
|
Chris@16
|
49 template <typename Strategy> struct comparable_type
|
Chris@16
|
50 {
|
Chris@16
|
51 BOOST_MPL_ASSERT_MSG
|
Chris@16
|
52 (
|
Chris@16
|
53 false, NOT_IMPLEMENTED_FOR_THIS_STRATEGY, (types<Strategy>)
|
Chris@16
|
54 );
|
Chris@16
|
55 };
|
Chris@16
|
56
|
Chris@16
|
57 template <typename Strategy> struct get_comparable
|
Chris@16
|
58 {
|
Chris@16
|
59 BOOST_MPL_ASSERT_MSG
|
Chris@16
|
60 (
|
Chris@16
|
61 false, NOT_IMPLEMENTED_FOR_THIS_STRATEGY, (types<Strategy>)
|
Chris@16
|
62 );
|
Chris@16
|
63 };
|
Chris@16
|
64
|
Chris@16
|
65 template <typename Strategy, typename P1, typename P2>
|
Chris@16
|
66 struct result_from_distance {};
|
Chris@16
|
67
|
Chris@16
|
68
|
Chris@16
|
69
|
Chris@16
|
70
|
Chris@16
|
71 // Default strategy
|
Chris@16
|
72
|
Chris@16
|
73
|
Chris@16
|
74 /*!
|
Chris@16
|
75 \brief Traits class binding a default strategy for distance
|
Chris@16
|
76 to one (or possibly two) coordinate system(s)
|
Chris@16
|
77 \ingroup distance
|
Chris@101
|
78 \tparam GeometryTag1 tag (point/segment/box) for which this strategy is the default
|
Chris@101
|
79 \tparam GeometryTag2 tag (point/segment/box) for which this strategy is the default
|
Chris@16
|
80 \tparam Point1 first point-type
|
Chris@16
|
81 \tparam Point2 second point-type
|
Chris@16
|
82 \tparam CsTag1 tag of coordinate system of first point type
|
Chris@16
|
83 \tparam CsTag2 tag of coordinate system of second point type
|
Chris@16
|
84 */
|
Chris@16
|
85 template
|
Chris@16
|
86 <
|
Chris@101
|
87 typename GeometryTag1,
|
Chris@101
|
88 typename GeometryTag2,
|
Chris@16
|
89 typename Point1,
|
Chris@16
|
90 typename Point2 = Point1,
|
Chris@16
|
91 typename CsTag1 = typename cs_tag<Point1>::type,
|
Chris@16
|
92 typename CsTag2 = typename cs_tag<Point2>::type,
|
Chris@16
|
93 typename UnderlyingStrategy = void
|
Chris@16
|
94 >
|
Chris@16
|
95 struct default_strategy
|
Chris@16
|
96 {
|
Chris@16
|
97 BOOST_MPL_ASSERT_MSG
|
Chris@16
|
98 (
|
Chris@16
|
99 false, NOT_IMPLEMENTED_FOR_THIS_POINT_TYPE_COMBINATION
|
Chris@16
|
100 , (types<Point1, Point2, CsTag1, CsTag2>)
|
Chris@16
|
101 );
|
Chris@16
|
102 };
|
Chris@16
|
103
|
Chris@16
|
104
|
Chris@16
|
105 }}} // namespace strategy::distance::services
|
Chris@16
|
106
|
Chris@16
|
107
|
Chris@16
|
108 }} // namespace boost::geometry
|
Chris@16
|
109
|
Chris@16
|
110 #endif // BOOST_GEOMETRY_STRATEGIES_DISTANCE_HPP
|