]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | // Boost.Geometry (aka GGL, Generic Geometry Library) |
2 | ||
3 | // Copyright (c) 2014, Oracle and/or its affiliates. | |
4 | ||
5 | // Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle | |
6 | ||
7 | // Licensed under the Boost Software License version 1.0. | |
8 | // http://www.boost.org/users/license.html | |
9 | ||
10 | #ifndef BOOST_GEOMETRY_ITERATORS_DETAIL_POINT_ITERATOR_INNER_RANGE_TYPE_HPP | |
11 | #define BOOST_GEOMETRY_ITERATORS_DETAIL_POINT_ITERATOR_INNER_RANGE_TYPE_HPP | |
12 | ||
13 | #include <boost/range.hpp> | |
14 | #include <boost/type_traits/is_const.hpp> | |
15 | #include <boost/mpl/if.hpp> | |
16 | ||
17 | #include <boost/geometry/core/ring_type.hpp> | |
18 | #include <boost/geometry/core/tag.hpp> | |
19 | #include <boost/geometry/core/tags.hpp> | |
20 | ||
21 | ||
22 | namespace boost { namespace geometry | |
23 | { | |
24 | ||
25 | ||
26 | #ifndef DOXYGEN_NO_DETAIL | |
27 | namespace detail { namespace point_iterator | |
28 | { | |
29 | ||
30 | ||
31 | template | |
32 | < | |
33 | typename Geometry, | |
34 | typename Tag = typename tag<Geometry>::type | |
35 | > | |
36 | struct inner_range_type | |
37 | { | |
38 | typedef typename boost::mpl::if_c | |
39 | < | |
40 | !boost::is_const<Geometry>::type::value, | |
41 | typename boost::range_value<Geometry>::type, | |
42 | typename boost::range_value<Geometry>::type const | |
43 | >::type type; | |
44 | }; | |
45 | ||
46 | ||
47 | template <typename Polygon> | |
48 | struct inner_range_type<Polygon, polygon_tag> | |
49 | { | |
50 | typedef typename boost::mpl::if_c | |
51 | < | |
52 | !boost::is_const<Polygon>::type::value, | |
53 | typename geometry::ring_type<Polygon>::type, | |
54 | typename geometry::ring_type<Polygon>::type const | |
55 | >::type type; | |
56 | }; | |
57 | ||
58 | ||
59 | }} // namespace detail::point_iterator | |
60 | #endif // DOXYGEN_NO_DETAIL | |
61 | ||
62 | ||
63 | }} // namespace boost::geometry | |
64 | ||
65 | ||
66 | #endif // BOOST_GEOMETRY_ITERATORS_DETAIL_POINT_ITERATOR_INNER_RANGE_TYPE_HPP |