File indexing completed on 2025-01-18 09:35:28
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015 #ifndef BOOST_GEOMETRY_INDEX_ADAPTORS_QUERY_HPP
0016 #define BOOST_GEOMETRY_INDEX_ADAPTORS_QUERY_HPP
0017
0018 #include <boost/geometry/core/static_assert.hpp>
0019
0020
0021
0022
0023
0024 namespace boost { namespace geometry { namespace index {
0025
0026 namespace adaptors {
0027
0028 namespace detail {
0029
0030 template <typename Index>
0031 class query_range
0032 {
0033 BOOST_GEOMETRY_STATIC_ASSERT_FALSE(
0034 "Not implemented for this Index type.",
0035 Index);
0036
0037 typedef int* iterator;
0038 typedef const int* const_iterator;
0039
0040 template <typename Predicates>
0041 inline query_range(
0042 Index const&,
0043 Predicates const&)
0044 {}
0045
0046 inline iterator begin() { return 0; }
0047 inline iterator end() { return 0; }
0048 inline const_iterator begin() const { return 0; }
0049 inline const_iterator end() const { return 0; }
0050 };
0051
0052
0053
0054 template<typename Predicates>
0055 struct query
0056 {
0057 inline explicit query(Predicates const& pred)
0058 : predicates(pred)
0059 {}
0060
0061 Predicates const& predicates;
0062 };
0063
0064 template<typename Index, typename Predicates>
0065 index::adaptors::detail::query_range<Index>
0066 operator|(
0067 Index const& si,
0068 index::adaptors::detail::query<Predicates> const& f)
0069 {
0070 return index::adaptors::detail::query_range<Index>(si, f.predicates);
0071 }
0072
0073 }
0074
0075
0076
0077
0078
0079
0080
0081
0082 template <typename Predicates>
0083 detail::query<Predicates>
0084 queried(Predicates const& pred)
0085 {
0086 return detail::query<Predicates>(pred);
0087 }
0088
0089 }
0090
0091 }}}
0092
0093 #endif