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