Chris@16
|
1 // Boost.Geometry (aka GGL, Generic Geometry Library)
|
Chris@16
|
2
|
Chris@16
|
3 // Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
|
Chris@16
|
4 // Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
|
Chris@16
|
5 // Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
|
Chris@16
|
6
|
Chris@16
|
7 // Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
|
Chris@16
|
8 // (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
|
Chris@16
|
9
|
Chris@16
|
10 // Use, modification and distribution is subject to the Boost Software License,
|
Chris@16
|
11 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
Chris@16
|
12 // http://www.boost.org/LICENSE_1_0.txt)
|
Chris@16
|
13
|
Chris@16
|
14 #ifndef BOOST_GEOMETRY_ITERATORS_BASE_HPP
|
Chris@16
|
15 #define BOOST_GEOMETRY_ITERATORS_BASE_HPP
|
Chris@16
|
16
|
Chris@16
|
17 #include <boost/iterator.hpp>
|
Chris@16
|
18 #include <boost/iterator/iterator_adaptor.hpp>
|
Chris@16
|
19 #include <boost/iterator/iterator_categories.hpp>
|
Chris@16
|
20 #include <boost/mpl/if.hpp>
|
Chris@16
|
21
|
Chris@16
|
22 #ifndef DOXYGEN_NO_DETAIL
|
Chris@16
|
23 namespace boost { namespace geometry { namespace detail { namespace iterators
|
Chris@16
|
24 {
|
Chris@16
|
25
|
Chris@16
|
26 template
|
Chris@16
|
27 <
|
Chris@16
|
28 typename DerivedClass,
|
Chris@16
|
29 typename Iterator,
|
Chris@16
|
30 typename TraversalFlag = boost::bidirectional_traversal_tag
|
Chris@16
|
31 >
|
Chris@16
|
32 struct iterator_base
|
Chris@16
|
33 : public boost::iterator_adaptor
|
Chris@16
|
34 <
|
Chris@16
|
35 DerivedClass,
|
Chris@16
|
36 Iterator,
|
Chris@16
|
37 boost::use_default,
|
Chris@16
|
38 typename boost::mpl::if_
|
Chris@16
|
39 <
|
Chris@16
|
40 boost::is_convertible
|
Chris@16
|
41 <
|
Chris@16
|
42 typename boost::iterator_traversal<Iterator>::type,
|
Chris@16
|
43 boost::random_access_traversal_tag
|
Chris@16
|
44 >,
|
Chris@16
|
45 TraversalFlag,
|
Chris@16
|
46 boost::use_default
|
Chris@16
|
47 >::type
|
Chris@16
|
48 >
|
Chris@16
|
49 {
|
Chris@16
|
50 // Define operator cast to Iterator to be able to write things like Iterator it = myit++
|
Chris@16
|
51 inline operator Iterator() const
|
Chris@16
|
52 {
|
Chris@16
|
53 return this->base();
|
Chris@16
|
54 }
|
Chris@16
|
55
|
Chris@16
|
56 /*inline bool operator==(Iterator const& other) const
|
Chris@16
|
57 {
|
Chris@16
|
58 return this->base() == other;
|
Chris@16
|
59 }
|
Chris@16
|
60 inline bool operator!=(Iterator const& other) const
|
Chris@16
|
61 {
|
Chris@16
|
62 return ! operator==(other);
|
Chris@16
|
63 }*/
|
Chris@16
|
64 };
|
Chris@16
|
65
|
Chris@16
|
66 }}}} // namespace boost::geometry::detail::iterators
|
Chris@16
|
67 #endif
|
Chris@16
|
68
|
Chris@16
|
69
|
Chris@16
|
70 #endif // BOOST_GEOMETRY_ITERATORS_BASE_HPP
|