9
3

view.hpp 1.6 KB

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