|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r83731 - trunk/boost/geometry/index
From: adam.wulkiewicz_at_[hidden]
Date: 2013-04-02 20:21:05
Author: awulkiew
Date: 2013-04-02 20:21:04 EDT (Tue, 02 Apr 2013)
New Revision: 83731
URL: http://svn.boost.org/trac/boost/changeset/83731
Log:
rtree: members of equal_to and indexable documented.
Text files modified:
trunk/boost/geometry/index/equal_to.hpp | 45 +++++++++++++++++++++++++++++++++++++++
trunk/boost/geometry/index/indexable.hpp | 41 +++++++++++++++++++++++++++++++++++
2 files changed, 84 insertions(+), 2 deletions(-)
Modified: trunk/boost/geometry/index/equal_to.hpp
==============================================================================
--- trunk/boost/geometry/index/equal_to.hpp (original)
+++ trunk/boost/geometry/index/equal_to.hpp 2013-04-02 20:21:04 EDT (Tue, 02 Apr 2013)
@@ -71,7 +71,16 @@
template <typename Value>
struct equal_to
{
+ /*! \brief The type of result returned by function object. */
typedef bool result_type;
+
+ /*!
+ \brief Compare values. If Value is a Geometry geometry::equals() function is used.
+
+ \param l First value.
+ \param r Second value.
+ \return true if values are equal.
+ */
bool operator()(Value const& l, Value const& r) const
{
return detail::equals<Value, typename geometry::traits::tag<Value>::type>::apply(l ,r);
@@ -90,7 +99,16 @@
template <typename T1, typename T2>
struct equal_to< std::pair<T1, T2> >
{
+ /*! \brief The type of result returned by function object. */
typedef bool result_type;
+
+ /*!
+ \brief Compare values. If pair<> Value member is a Geometry geometry::equals() function is used.
+
+ \param l First value.
+ \param r Second value.
+ \return true if values are equal.
+ */
bool operator()(std::pair<T1, T2> const& l, std::pair<T1, T2> const& r) const
{
typedef detail::equals<T1, typename geometry::traits::tag<T1>::type> equals1;
@@ -104,7 +122,7 @@
\brief The function object comparing Values.
This specialization compares values of type boost::tuple<...>.
-It compares values stored in tuple in range [0, length<tuple<...>>::value).
+It compares all members of the tuple from the first one to the last one.
*/
template <typename T0, typename T1, typename T2, typename T3, typename T4,
typename T5, typename T6, typename T7, typename T8, typename T9>
@@ -112,7 +130,16 @@
{
typedef boost::tuple<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9> value_type;
+ /*! \brief The type of result returned by function object. */
typedef bool result_type;
+
+ /*!
+ \brief Compare values. If tuple<> Value member is a Geometry geometry::equals() function is used.
+
+ \param l First value.
+ \param r Second value.
+ \return true if values are equal.
+ */
bool operator()(value_type const& l, value_type const& r) const
{
return detail::tuple_equals<
@@ -157,12 +184,28 @@
} // namespace detail
+/*!
+\brief The function object comparing Values.
+
+This specialization compares values of type std::tuple<Args...>.
+It's defined if the compiler supports tuples and variadic templates.
+It compares all members of the tuple from the first one to the last one.
+*/
template <typename ...Args>
struct equal_to< std::tuple<Args...> >
{
typedef std::tuple<Args...> value_type;
+ /*! \brief The type of result returned by function object. */
typedef bool result_type;
+
+ /*!
+ \brief Compare values. If tuple<> Value member is a Geometry geometry::equals() function is used.
+
+ \param l First value.
+ \param r Second value.
+ \return true if values are equal.
+ */
bool operator()(value_type const& l, value_type const& r) const
{
return detail::std_tuple_equals<
Modified: trunk/boost/geometry/index/indexable.hpp
==============================================================================
--- trunk/boost/geometry/index/indexable.hpp (original)
+++ trunk/boost/geometry/index/indexable.hpp 2013-04-02 20:21:04 EDT (Tue, 02 Apr 2013)
@@ -49,8 +49,15 @@
NOT_VALID_INDEXABLE_TYPE,
(Value)
);
-
+ /*! \brief The type of result returned by function object. */
typedef Value const& result_type;
+
+ /*!
+ \brief Return indexable extracted from the value.
+
+ \param v The value.
+ \return The indexable.
+ */
result_type operator()(Value const& v) const
{
return v;
@@ -74,7 +81,15 @@
(Indexable)
);
+ /*! \brief The type of result returned by function object. */
typedef Indexable const& result_type;
+
+ /*!
+ \brief Return indexable extracted from the value.
+
+ \param v The value.
+ \return The indexable.
+ */
result_type operator()(std::pair<Indexable, T2> const& v) const
{
return v.first;
@@ -100,7 +115,15 @@
(Indexable)
);
+ /*! \brief The type of result returned by function object. */
typedef Indexable const& result_type;
+
+ /*!
+ \brief Return indexable extracted from the value.
+
+ \param v The value.
+ \return The indexable.
+ */
result_type operator()(value_type const& v) const
{
return boost::get<0>(v);
@@ -115,6 +138,14 @@
namespace boost { namespace geometry { namespace index {
+/*!
+\brief The function object extracting Indexable from Value.
+
+This specialization translates from std::tuple<Indexable, Args...>.
+It's defined if the compiler supports tuples and variadic templates.
+
+\tparam Indexable The Indexable type.
+*/
template <typename Indexable, typename ...Args>
struct indexable< std::tuple<Indexable, Args...> >
{
@@ -126,7 +157,15 @@
(Indexable)
);
+ /*! \brief The type of result returned by function object. */
typedef Indexable const& result_type;
+
+ /*!
+ \brief Return indexable extracted from the value.
+
+ \param v The value.
+ \return The indexable.
+ */
result_type operator()(value_type const& v) const
{
return std::get<0>(v);
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