]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/boost/geometry/index/detail/rtree/adaptors.hpp
bump version to 18.2.4-pve3
[ceph.git] / ceph / src / boost / boost / geometry / index / detail / rtree / adaptors.hpp
CommitLineData
7c673cae
FG
1// Boost.Geometry Index
2//
3// R-tree queries range adaptors
4//
5// Copyright (c) 2011-2013 Adam Wulkiewicz, Lodz, Poland.
6//
1e59de90
TL
7// This file was modified by Oracle on 2021.
8// Modifications copyright (c) 2021 Oracle and/or its affiliates.
9// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
10//
7c673cae
FG
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_ADAPTORS_HPP
16#define BOOST_GEOMETRY_INDEX_DETAIL_RTREE_ADAPTORS_HPP
17
1e59de90 18#include <vector>
7c673cae
FG
19
20#include <boost/geometry/index/adaptors/query.hpp>
21
22namespace boost { namespace geometry { namespace index {
23
1e59de90 24// Forward declaration
7c673cae
FG
25template <typename Value, typename Options, typename IndexableGetter, typename EqualTo, typename Allocator>
26class rtree;
27
28namespace adaptors { namespace detail {
29
30template <typename Value, typename Options, typename IndexableGetter, typename EqualTo, typename Allocator>
31class query_range< index::rtree<Value, Options, IndexableGetter, EqualTo, Allocator> >
32{
33public:
34 typedef std::vector<Value> result_type;
35 typedef typename result_type::iterator iterator;
36 typedef typename result_type::const_iterator const_iterator;
37
38 template <typename Predicates> inline
39 query_range(index::rtree<Value, Options, IndexableGetter, EqualTo, Allocator> const& rtree,
40 Predicates const& pred)
41 {
42 rtree.query(pred, std::back_inserter(m_result));
43 }
44
45 inline iterator begin() { return m_result.begin(); }
46 inline iterator end() { return m_result.end(); }
47 inline const_iterator begin() const { return m_result.begin(); }
48 inline const_iterator end() const { return m_result.end(); }
49
50private:
51 result_type m_result;
52};
53
54}} // namespace adaptors::detail
55
56}}} // namespace boost::geometry::index
57
58#endif // BOOST_GEOMETRY_INDEX_DETAIL_RTREE_ADAPTORS_HPP