comparison DEPENDENCIES/generic/include/boost/geometry/strategies/distance.hpp @ 16:2665513ce2d3

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