1 // Boost.Geometry Index
5 // Copyright (c) 2011-2013 Adam Wulkiewicz, Lodz, Poland.
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)
11 #ifndef BOOST_GEOMETRY_INDEX_ADAPTORS_QUERY_HPP
12 #define BOOST_GEOMETRY_INDEX_ADAPTORS_QUERY_HPP
15 \defgroup adaptors Adaptors (boost::geometry::index::adaptors::)
18 namespace boost { namespace geometry { namespace index {
24 template <typename Index>
29 NOT_IMPLEMENTED_FOR_THIS_INDEX,
32 typedef int* iterator;
33 typedef const int* const_iterator;
35 template <typename Predicates>
41 inline iterator begin() { return 0; }
42 inline iterator end() { return 0; }
43 inline const_iterator begin() const { return 0; }
44 inline const_iterator end() const { return 0; }
47 // TODO: awulkiew - consider removing reference from predicates
49 template<typename Predicates>
52 inline explicit query(Predicates const& pred)
56 Predicates const& predicates;
59 template<typename Index, typename Predicates>
60 index::adaptors::detail::query_range<Index>
63 index::adaptors::detail::query<Predicates> const& f)
65 return index::adaptors::detail::query_range<Index>(si, f.predicates);
71 \brief The query index adaptor generator.
75 \param pred Predicates.
77 template <typename Predicates>
78 detail::query<Predicates>
79 queried(Predicates const& pred)
81 return detail::query<Predicates>(pred);
84 } // namespace adaptors
86 }}} // namespace boost::geometry::index
88 #endif // BOOST_GEOMETRY_INDEX_ADAPTORS_QUERY_HPP