Chris@16
|
1 // Boost.Geometry (aka GGL, Generic Geometry Library)
|
Chris@16
|
2
|
Chris@101
|
3 // Copyright (c) 2008-2015 Bruno Lalande, Paris, France.
|
Chris@101
|
4 // Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
|
Chris@101
|
5 // Copyright (c) 2009-2015 Mateusz Loskot, London, UK.
|
Chris@101
|
6
|
Chris@101
|
7 // This file was modified by Oracle on 2015.
|
Chris@101
|
8 // Modifications copyright (c) 2015, 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
|
Chris@16
|
20 #ifndef BOOST_GEOMETRY_ALGORITHMS_NOT_IMPLEMENTED_HPP
|
Chris@16
|
21 #define BOOST_GEOMETRY_ALGORITHMS_NOT_IMPLEMENTED_HPP
|
Chris@16
|
22
|
Chris@16
|
23
|
Chris@16
|
24 #include <boost/mpl/assert.hpp>
|
Chris@101
|
25 #include <boost/mpl/identity.hpp>
|
Chris@16
|
26 #include <boost/geometry/core/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 info
|
Chris@16
|
34 {
|
Chris@16
|
35 struct UNRECOGNIZED_GEOMETRY_TYPE {};
|
Chris@16
|
36 struct POINT {};
|
Chris@16
|
37 struct LINESTRING {};
|
Chris@16
|
38 struct POLYGON {};
|
Chris@16
|
39 struct RING {};
|
Chris@16
|
40 struct BOX {};
|
Chris@16
|
41 struct SEGMENT {};
|
Chris@16
|
42 struct MULTI_POINT {};
|
Chris@16
|
43 struct MULTI_LINESTRING {};
|
Chris@16
|
44 struct MULTI_POLYGON {};
|
Chris@16
|
45 struct GEOMETRY_COLLECTION {};
|
Chris@16
|
46 template <size_t D> struct DIMENSION {};
|
Chris@16
|
47 }
|
Chris@16
|
48
|
Chris@16
|
49
|
Chris@16
|
50 namespace nyi
|
Chris@16
|
51 {
|
Chris@16
|
52
|
Chris@16
|
53
|
Chris@16
|
54 struct not_implemented_tag {};
|
Chris@16
|
55
|
Chris@16
|
56 template
|
Chris@16
|
57 <
|
Chris@16
|
58 typename Term1,
|
Chris@16
|
59 typename Term2,
|
Chris@16
|
60 typename Term3
|
Chris@16
|
61 >
|
Chris@16
|
62 struct not_implemented_error
|
Chris@16
|
63 {
|
Chris@16
|
64
|
Chris@16
|
65 #ifndef BOOST_GEOMETRY_IMPLEMENTATION_STATUS_BUILD
|
Chris@16
|
66 # define BOOST_GEOMETRY_IMPLEMENTATION_STATUS_BUILD false
|
Chris@16
|
67 #endif
|
Chris@16
|
68
|
Chris@16
|
69 BOOST_MPL_ASSERT_MSG
|
Chris@16
|
70 (
|
Chris@16
|
71 BOOST_GEOMETRY_IMPLEMENTATION_STATUS_BUILD,
|
Chris@16
|
72 THIS_OPERATION_IS_NOT_OR_NOT_YET_IMPLEMENTED,
|
Chris@16
|
73 (
|
Chris@16
|
74 types<Term1, Term2, Term3>
|
Chris@16
|
75 )
|
Chris@16
|
76 );
|
Chris@16
|
77 };
|
Chris@16
|
78
|
Chris@16
|
79 template <typename Tag>
|
Chris@16
|
80 struct tag_to_term
|
Chris@16
|
81 {
|
Chris@16
|
82 typedef Tag type;
|
Chris@16
|
83 };
|
Chris@16
|
84
|
Chris@16
|
85 template <> struct tag_to_term<geometry_not_recognized_tag> { typedef info::UNRECOGNIZED_GEOMETRY_TYPE type; };
|
Chris@16
|
86 template <> struct tag_to_term<point_tag> { typedef info::POINT type; };
|
Chris@16
|
87 template <> struct tag_to_term<linestring_tag> { typedef info::LINESTRING type; };
|
Chris@16
|
88 template <> struct tag_to_term<polygon_tag> { typedef info::POLYGON type; };
|
Chris@16
|
89 template <> struct tag_to_term<ring_tag> { typedef info::RING type; };
|
Chris@16
|
90 template <> struct tag_to_term<box_tag> { typedef info::BOX type; };
|
Chris@16
|
91 template <> struct tag_to_term<segment_tag> { typedef info::SEGMENT type; };
|
Chris@16
|
92 template <> struct tag_to_term<multi_point_tag> { typedef info::MULTI_POINT type; };
|
Chris@16
|
93 template <> struct tag_to_term<multi_linestring_tag> { typedef info::MULTI_LINESTRING type; };
|
Chris@16
|
94 template <> struct tag_to_term<multi_polygon_tag> { typedef info::MULTI_POLYGON type; };
|
Chris@16
|
95 template <> struct tag_to_term<geometry_collection_tag> { typedef info::GEOMETRY_COLLECTION type; };
|
Chris@101
|
96 template <int D> struct tag_to_term<boost::mpl::int_<D> > { typedef info::DIMENSION<D> type; };
|
Chris@16
|
97
|
Chris@16
|
98
|
Chris@16
|
99 }
|
Chris@16
|
100
|
Chris@16
|
101
|
Chris@16
|
102 template
|
Chris@16
|
103 <
|
Chris@16
|
104 typename Term1 = void,
|
Chris@16
|
105 typename Term2 = void,
|
Chris@16
|
106 typename Term3 = void
|
Chris@16
|
107 >
|
Chris@16
|
108 struct not_implemented
|
Chris@16
|
109 : nyi::not_implemented_tag,
|
Chris@16
|
110 nyi::not_implemented_error
|
Chris@16
|
111 <
|
Chris@101
|
112 typename boost::mpl::identity
|
Chris@101
|
113 <
|
Chris@101
|
114 typename nyi::tag_to_term<Term1>::type
|
Chris@101
|
115 >::type,
|
Chris@101
|
116 typename boost::mpl::identity
|
Chris@101
|
117 <
|
Chris@101
|
118 typename nyi::tag_to_term<Term2>::type
|
Chris@101
|
119 >::type,
|
Chris@101
|
120 typename boost::mpl::identity
|
Chris@101
|
121 <
|
Chris@101
|
122 typename nyi::tag_to_term<Term3>::type
|
Chris@101
|
123 >::type
|
Chris@16
|
124 >
|
Chris@16
|
125 {};
|
Chris@16
|
126
|
Chris@16
|
127
|
Chris@16
|
128 }} // namespace boost::geometry
|
Chris@16
|
129
|
Chris@16
|
130
|
Chris@16
|
131 #endif // BOOST_GEOMETRY_ALGORITHMS_NOT_IMPLEMENTED_HPP
|