]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | // Boost.Geometry Index |
2 | // | |
3 | // Rtree utilities view | |
4 | // | |
5 | // Copyright (c) 2011-2013 Adam Wulkiewicz, Lodz, Poland. | |
6 | // | |
7 | // Use, modification and distribution is subject to the Boost Software License, | |
8 | // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at | |
9 | // http://www.boost.org/LICENSE_1_0.txt) | |
10 | ||
11 | #ifndef BOOST_GEOMETRY_INDEX_DETAIL_RTREE_UTILITIES_VIEW_HPP | |
12 | #define BOOST_GEOMETRY_INDEX_DETAIL_RTREE_UTILITIES_VIEW_HPP | |
13 | ||
14 | namespace boost { namespace geometry { namespace index { | |
15 | ||
16 | namespace detail { namespace rtree { namespace utilities { | |
17 | ||
18 | template <typename Rtree> | |
19 | class view | |
20 | { | |
21 | public: | |
22 | typedef typename Rtree::size_type size_type; | |
23 | ||
24 | typedef typename Rtree::translator_type translator_type; | |
25 | typedef typename Rtree::value_type value_type; | |
26 | typedef typename Rtree::options_type options_type; | |
27 | typedef typename Rtree::box_type box_type; | |
28 | typedef typename Rtree::allocators_type allocators_type; | |
29 | ||
30 | view(Rtree const& rt) : m_rtree(rt) {} | |
31 | ||
32 | template <typename Visitor> | |
33 | void apply_visitor(Visitor & vis) const | |
34 | { | |
35 | m_rtree.apply_visitor(vis); | |
36 | } | |
37 | ||
38 | // This will most certainly be removed in the future | |
39 | translator_type translator() const | |
40 | { | |
41 | return m_rtree.translator(); | |
42 | } | |
43 | ||
44 | // This will probably be removed in the future | |
45 | size_type depth() const | |
46 | { | |
47 | return m_rtree.depth(); | |
48 | } | |
49 | ||
50 | private: | |
51 | view(view const&); | |
52 | view & operator=(view const&); | |
53 | ||
54 | Rtree const& m_rtree; | |
55 | }; | |
56 | ||
57 | }}} // namespace detail::rtree::utilities | |
58 | ||
59 | }}} // namespace boost::geometry::index | |
60 | ||
61 | #endif // BOOST_GEOMETRY_INDEX_DETAIL_RTREE_UTILITIES_VIEW_HPP |