• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Boost.Geometry (aka GGL, Generic Geometry Library)
2 
3 // Copyright (c) 2008-2015 Bruno Lalande, Paris, France.
4 // Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
5 // Copyright (c) 2009-2015 Mateusz Loskot, London, UK.
6 
7 // This file was modified by Oracle on 2015.
8 // Modifications copyright (c) 2015, Oracle and/or its affiliates.
9 
10 // Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
11 
12 // Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
13 // (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
14 
15 // Use, modification and distribution is subject to the Boost Software License,
16 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
17 // http://www.boost.org/LICENSE_1_0.txt)
18 
19 
20 #ifndef BOOST_GEOMETRY_ALGORITHMS_NOT_IMPLEMENTED_HPP
21 #define BOOST_GEOMETRY_ALGORITHMS_NOT_IMPLEMENTED_HPP
22 
23 
24 #include <boost/mpl/assert.hpp>
25 #include <boost/mpl/identity.hpp>
26 #include <boost/geometry/core/tags.hpp>
27 
28 
29 namespace boost { namespace geometry
30 {
31 
32 
33 namespace info
34 {
35     struct UNRECOGNIZED_GEOMETRY_TYPE {};
36     struct POINT {};
37     struct LINESTRING {};
38     struct POLYGON {};
39     struct RING {};
40     struct BOX {};
41     struct SEGMENT {};
42     struct MULTI_POINT {};
43     struct MULTI_LINESTRING {};
44     struct MULTI_POLYGON {};
45     struct GEOMETRY_COLLECTION {};
46     template <size_t D> struct DIMENSION {};
47 }
48 
49 
50 namespace nyi
51 {
52 
53 
54 struct not_implemented_tag {};
55 
56 template
57 <
58     typename Term1,
59     typename Term2,
60     typename Term3
61 >
62 struct not_implemented_error
63 {
64 
65 #ifndef BOOST_GEOMETRY_IMPLEMENTATION_STATUS_BUILD
66 # define BOOST_GEOMETRY_IMPLEMENTATION_STATUS_BUILD false
67 #endif
68 
69     BOOST_MPL_ASSERT_MSG
70         (
71             BOOST_GEOMETRY_IMPLEMENTATION_STATUS_BUILD,
72             THIS_OPERATION_IS_NOT_OR_NOT_YET_IMPLEMENTED,
73             (
74                 types<Term1, Term2, Term3>
75             )
76         );
77 };
78 
79 template <typename Tag>
80 struct tag_to_term
81 {
82     typedef Tag type;
83 };
84 
85 template <> struct tag_to_term<geometry_not_recognized_tag> { typedef info::UNRECOGNIZED_GEOMETRY_TYPE type; };
86 template <> struct tag_to_term<point_tag>                   { typedef info::POINT type; };
87 template <> struct tag_to_term<linestring_tag>              { typedef info::LINESTRING type; };
88 template <> struct tag_to_term<polygon_tag>                 { typedef info::POLYGON type; };
89 template <> struct tag_to_term<ring_tag>                    { typedef info::RING type; };
90 template <> struct tag_to_term<box_tag>                     { typedef info::BOX type; };
91 template <> struct tag_to_term<segment_tag>                 { typedef info::SEGMENT type; };
92 template <> struct tag_to_term<multi_point_tag>             { typedef info::MULTI_POINT type; };
93 template <> struct tag_to_term<multi_linestring_tag>        { typedef info::MULTI_LINESTRING type; };
94 template <> struct tag_to_term<multi_polygon_tag>           { typedef info::MULTI_POLYGON type; };
95 template <> struct tag_to_term<geometry_collection_tag>     { typedef info::GEOMETRY_COLLECTION type; };
96 template <int D> struct tag_to_term<boost::mpl::int_<D> >   { typedef info::DIMENSION<D> type; };
97 
98 
99 }
100 
101 
102 template
103 <
104     typename Term1 = void,
105     typename Term2 = void,
106     typename Term3 = void
107 >
108 struct not_implemented
109     : nyi::not_implemented_tag,
110       nyi::not_implemented_error
111       <
112           typename boost::mpl::identity
113               <
114                   typename nyi::tag_to_term<Term1>::type
115               >::type,
116           typename boost::mpl::identity
117               <
118                   typename nyi::tag_to_term<Term2>::type
119               >::type,
120           typename boost::mpl::identity
121               <
122                   typename nyi::tag_to_term<Term3>::type
123               >::type
124       >
125 {};
126 
127 
128 }} // namespace boost::geometry
129 
130 
131 #endif // BOOST_GEOMETRY_ALGORITHMS_NOT_IMPLEMENTED_HPP
132