From b246ac1865d8dee19eb01a866c69c31c011ee23f Mon Sep 17 00:00:00 2001 From: khizmax Date: Sat, 13 Feb 2016 17:48:27 +0300 Subject: [PATCH] Docfix --- cds/container/impl/lazy_kvlist.h | 14 ++++++++------ cds/container/impl/lazy_list.h | 14 ++++++++------ cds/container/impl/michael_kvlist.h | 14 ++++++++------ cds/container/impl/michael_list.h | 14 ++++++++------ cds/container/lazy_list_rcu.h | 11 +++++++---- cds/container/michael_list_rcu.h | 11 +++++++---- 6 files changed, 46 insertions(+), 32 deletions(-) diff --git a/cds/container/impl/lazy_kvlist.h b/cds/container/impl/lazy_kvlist.h index 71401a2c..a8a96dab 100644 --- a/cds/container/impl/lazy_kvlist.h +++ b/cds/container/impl/lazy_kvlist.h @@ -291,8 +291,7 @@ namespace cds { namespace container { - Iterator ensures thread-safety even if you delete the item that iterator points to. However, in case of concurrent deleting operations it is no guarantee that you iterate all item in the list. - Therefore, the use of iterators in concurrent environment is not good idea. Use the iterator on the concurrent container - for debug purpose only. + @warning Use this iterator on the concurrent container for debugging purpose only. The iterator interface to access item data: - operator -> - returns a pointer to \ref value_type for iterator @@ -310,6 +309,8 @@ namespace cds { namespace container { */ typedef iterator_type const_iterator; + ///@name Forward iterators (only for debugging purpose) + //@{ /// Returns a forward iterator addressing the first element in a list /** For empty list \code begin() == end() \endcode @@ -335,32 +336,33 @@ namespace cds { namespace container { } /// Returns a forward const iterator addressing the first element in a list - //@{ const_iterator begin() const { const_iterator it( head() ); ++it; // skip dummy head return it; } + + /// Returns a forward const iterator addressing the first element in a list const_iterator cbegin() const { const_iterator it( head() ); ++it; // skip dummy head return it; } - //@} /// Returns an const iterator that addresses the location succeeding the last element in a list - //@{ const_iterator end() const { return const_iterator( tail()); } + + /// Returns an const iterator that addresses the location succeeding the last element in a list const_iterator cend() const { return const_iterator( tail()); } - //@} + //@} public: /// Default constructor diff --git a/cds/container/impl/lazy_list.h b/cds/container/impl/lazy_list.h index 589b2f85..a765e420 100644 --- a/cds/container/impl/lazy_list.h +++ b/cds/container/impl/lazy_list.h @@ -286,8 +286,7 @@ namespace cds { namespace container { - Iterator ensures thread-safety even if you delete the item that iterator points to. However, in case of concurrent deleting operations it is no guarantee that you iterate all item in the list. - Therefore, the use of iterators in concurrent environment is not good idea. Use the iterator on the concurrent container - for debug purpose only. + @warning Use this iterator on the concurrent container for debugging purpose only. */ typedef iterator_type iterator; @@ -297,6 +296,8 @@ namespace cds { namespace container { */ typedef iterator_type const_iterator; + ///@name Forward iterators (only for debugging purpose) + //@{ /// Returns a forward iterator addressing the first element in a list /** For empty list \code begin() == end() \endcode @@ -321,32 +322,33 @@ namespace cds { namespace container { } /// Returns a forward const iterator addressing the first element in a list - //@{ const_iterator begin() const { const_iterator it( head() ); ++it ; // skip dummy head node return it; } + + /// Returns a forward const iterator addressing the first element in a list const_iterator cbegin() const { const_iterator it( head() ); ++it ; // skip dummy head node return it; } - //@} /// Returns an const iterator that addresses the location succeeding the last element in a list - //@{ const_iterator end() const { return const_iterator( tail() ); } + + /// Returns an const iterator that addresses the location succeeding the last element in a list const_iterator cend() const { return const_iterator( tail() ); } - //@} + //@} public: /// Default constructor diff --git a/cds/container/impl/michael_kvlist.h b/cds/container/impl/michael_kvlist.h index dc512278..dd4fa428 100644 --- a/cds/container/impl/michael_kvlist.h +++ b/cds/container/impl/michael_kvlist.h @@ -280,8 +280,7 @@ namespace cds { namespace container { - Iterator ensures thread-safety even if you delete the item that iterator points to. However, in case of concurrent deleting operations it is no guarantee that you iterate all item in the list. - Therefore, the use of iterators in concurrent environment is not good idea. Use the iterator on the concurrent container - for debug purpose only. + @warning Use this iterator on the concurrent container for debugging purpose only. The iterator interface to access item data: - operator -> - returns a pointer to \ref value_type for iterator @@ -299,6 +298,8 @@ namespace cds { namespace container { */ typedef iterator_type const_iterator; + ///@name Forward iterators (only for debugging purpose) + //@{ /// Returns a forward iterator addressing the first element in a list /** For empty list \code begin() == end() \endcode @@ -322,28 +323,29 @@ namespace cds { namespace container { } /// Returns a forward const iterator addressing the first element in a list - //@{ const_iterator begin() const { return const_iterator( head() ); } + + /// Returns a forward const iterator addressing the first element in a list const_iterator cbegin() const { return const_iterator( head() ); } - //@} /// Returns an const iterator that addresses the location succeeding the last element in a list - //@{ const_iterator end() const { return const_iterator(); } + + /// Returns an const iterator that addresses the location succeeding the last element in a list const_iterator cend() const { return const_iterator(); } - //@} + //@} public: /// Default constructor diff --git a/cds/container/impl/michael_list.h b/cds/container/impl/michael_list.h index 15af0162..77471545 100644 --- a/cds/container/impl/michael_list.h +++ b/cds/container/impl/michael_list.h @@ -268,8 +268,7 @@ namespace cds { namespace container { - Iterator ensures thread-safety even if you delete the item that iterator points to. However, in case of concurrent deleting operations it is no guarantee that you iterate all item in the list. - Therefore, the use of iterators in concurrent environment is not good idea. Use the iterator on the concurrent container - for debug purpose only. + @warning Use this iterator on the concurrent container for debugging purpose only. */ typedef iterator_type iterator; @@ -279,6 +278,8 @@ namespace cds { namespace container { */ typedef iterator_type const_iterator; + ///@name Forward iterators (only for debugging purpose) + //@{ /// Returns a forward iterator addressing the first element in a list /** For empty list \code begin() == end() \endcode @@ -302,28 +303,29 @@ namespace cds { namespace container { } /// Returns a forward const iterator addressing the first element in a list - //@{ const_iterator begin() const { return const_iterator( head() ); } + + /// Returns a forward const iterator addressing the first element in a list const_iterator cbegin() const { return const_iterator( head() ); } - //@} /// Returns an const iterator that addresses the location succeeding the last element in a list - //@{ const_iterator end() const { return const_iterator(); } + + /// Returns an const iterator that addresses the location succeeding the last element in a list const_iterator cend() const { return const_iterator(); } - //@} + //@} public: /// Default constructor diff --git a/cds/container/lazy_list_rcu.h b/cds/container/lazy_list_rcu.h index 2bad4f5e..1f49fbdd 100644 --- a/cds/container/lazy_list_rcu.h +++ b/cds/container/lazy_list_rcu.h @@ -290,6 +290,8 @@ namespace cds { namespace container { */ typedef iterator_type const_iterator; + ///@name Forward iterators (only for debugging purpose) + //@{ /// Returns a forward iterator addressing the first element in a list /** For empty list \code begin() == end() \endcode @@ -314,32 +316,33 @@ namespace cds { namespace container { } /// Returns a forward const iterator addressing the first element in a list - //@{ const_iterator begin() const { const_iterator it( head() ); ++it ; // skip dummy head node return it; } + + /// Returns a forward const iterator addressing the first element in a list const_iterator cbegin() const { const_iterator it( head() ); ++it ; // skip dummy head node return it; } - //@} /// Returns an const iterator that addresses the location succeeding the last element in a list - //@{ const_iterator end() const { return const_iterator( tail() ); } + + /// Returns an const iterator that addresses the location succeeding the last element in a list const_iterator cend() const { return const_iterator( tail() ); } - //@} + //@} public: /// Default constructor diff --git a/cds/container/michael_list_rcu.h b/cds/container/michael_list_rcu.h index cfece032..82aa2ca7 100644 --- a/cds/container/michael_list_rcu.h +++ b/cds/container/michael_list_rcu.h @@ -303,6 +303,8 @@ namespace cds { namespace container { /// Const forward iterator typedef iterator_type const_iterator; + ///@name Forward iterators (only for debugging purpose) + //@{ /// Returns a forward iterator addressing the first element in a list /** For empty list \code begin() == end() \endcode @@ -326,28 +328,29 @@ namespace cds { namespace container { } /// Returns a forward const iterator addressing the first element in a list - //@{ const_iterator begin() const { return const_iterator( head() ); } + + /// Returns a forward const iterator addressing the first element in a list const_iterator cbegin() const { return const_iterator( head() ); } - //@} /// Returns an const iterator that addresses the location succeeding the last element in a list - //@{ const_iterator end() const { return const_iterator(); } + + /// Returns an const iterator that addresses the location succeeding the last element in a list const_iterator cend() const { return const_iterator(); } - //@} + //@} public: /// Default constructor -- 2.34.1