|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r84827 - trunk/boost/geometry/index
From: adam.wulkiewicz_at_[hidden]
Date: 2013-06-18 12:31:34
Author: awulkiew
Date: 2013-06-18 12:31:34 EDT (Tue, 18 Jun 2013)
New Revision: 84827
URL: http://svn.boost.org/trac/boost/changeset/84827
Log:
[geometry][index]: added contains() and touches() predicates generators as experimental features.
Text files modified:
trunk/boost/geometry/index/predicates.hpp | 71 +++++++++++++++++++++++++++++----------
1 files changed, 52 insertions(+), 19 deletions(-)
Modified: trunk/boost/geometry/index/predicates.hpp
==============================================================================
--- trunk/boost/geometry/index/predicates.hpp Tue Jun 18 12:21:31 2013 (r84826)
+++ trunk/boost/geometry/index/predicates.hpp 2013-06-18 12:31:34 EDT (Tue, 18 Jun 2013) (r84827)
@@ -27,6 +27,35 @@
namespace boost { namespace geometry { namespace index {
+#ifdef BOOST_GEOMETRY_INDEX_DETAIL_EXPERIMENTAL
+
+/*!
+\brief Generate \c contains() predicate.
+
+Generate a predicate defining Value and Geometry relationship.
+Value will be returned by the query if <tt>bg::within(Geometry, Indexable)</tt>
+returns true.
+
+\par Example
+\verbatim
+bgi::query(spatial_index, bgi::contains(box), std::back_inserter(result));
+\endverbatim
+
+\ingroup predicates
+
+\tparam Geometry The Geometry type.
+
+\param g The Geometry object.
+*/
+template <typename Geometry> inline
+detail::spatial_predicate<Geometry, detail::within_tag, false, true>
+contains(Geometry const& g)
+{
+ return detail::spatial_predicate<Geometry, detail::within_tag, false, true>(g);
+}
+
+#endif // BOOST_GEOMETRY_INDEX_DETAIL_EXPERIMENTAL
+
/*!
\brief Generate \c covered_by() predicate.
@@ -129,25 +158,29 @@
return detail::spatial_predicate<Geometry, detail::overlaps_tag, false, false>(g);
}
-///*!
-//\brief Generate \c touches() predicate.
-//
-//Generate a predicate defining Value and Geometry relationship.
-//Value will be returned by the query if <tt>bg::touches(Indexable, Geometry)</tt>
-//returns true.
-//
-//\ingroup predicates
-//
-//\tparam Geometry The Geometry type.
-//
-//\param g The Geometry object.
-//*/
-//template <typename Geometry> inline
-//detail::spatial_predicate<Geometry, detail::touches_tag, false, false>
-//touches(Geometry const& g)
-//{
-// return detail::spatial_predicate<Geometry, detail::touches_tag, false, false>(g);
-//}
+#ifdef BOOST_GEOMETRY_INDEX_DETAIL_EXPERIMENTAL
+
+/*!
+\brief Generate \c touches() predicate.
+
+Generate a predicate defining Value and Geometry relationship.
+Value will be returned by the query if <tt>bg::touches(Indexable, Geometry)</tt>
+returns true.
+
+\ingroup predicates
+
+\tparam Geometry The Geometry type.
+
+\param g The Geometry object.
+*/
+template <typename Geometry> inline
+detail::spatial_predicate<Geometry, detail::touches_tag, false, false>
+touches(Geometry const& g)
+{
+ return detail::spatial_predicate<Geometry, detail::touches_tag, false, false>(g);
+}
+
+#endif // BOOST_GEOMETRY_INDEX_DETAIL_EXPERIMENTAL
/*!
\brief Generate \c within() predicate.
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk