view.hpp 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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. #ifndef BOOST_GEOMETRY_INDEX_DETAIL_RTREE_UTILITIES_VIEW_HPP
  15. #define BOOST_GEOMETRY_INDEX_DETAIL_RTREE_UTILITIES_VIEW_HPP
  16. namespace boost { namespace geometry { namespace index {
  17. namespace detail { namespace rtree { namespace utilities {
  18. template <typename Rtree>
  19. class view
  20. {
  21. public:
  22. typedef typename Rtree::members_holder members_holder;
  23. typedef typename Rtree::size_type size_type;
  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. view(Rtree const& rt) : m_rtree(rt) {}
  30. template <typename Visitor>
  31. void apply_visitor(Visitor & vis) const
  32. {
  33. m_rtree.apply_visitor(vis);
  34. }
  35. // This will most certainly be removed in the future
  36. translator_type translator() const
  37. {
  38. return m_rtree.translator();
  39. }
  40. // This will probably be removed in the future
  41. size_type depth() const
  42. {
  43. return m_rtree.depth();
  44. }
  45. private:
  46. view(view const&);
  47. view & operator=(view const&);
  48. Rtree const& m_rtree;
  49. };
  50. }}} // namespace detail::rtree::utilities
  51. }}} // namespace boost::geometry::index
  52. #endif // BOOST_GEOMETRY_INDEX_DETAIL_RTREE_UTILITIES_VIEW_HPP