summaryrefslogtreecommitdiff
path: root/sw/inc/ring.hxx
diff options
context:
space:
mode:
authorBjoern Michaelsen <bjoern.michaelsen@canonical.com>2014-12-03 10:46:30 +0100
committerBjoern Michaelsen <bjoern.michaelsen@canonical.com>2014-12-04 01:09:27 +0100
commitdfecc24308b53080115238b32d2493a04da36a44 (patch)
treebaf8436aee7417836650b619e913da8e320f4454 /sw/inc/ring.hxx
parente557f63e62e45a895679dd6ef57a83038054f40e (diff)
more docs
Change-Id: I4e97e8991269abff4a20ae7574ef4b86b799c2ce
Diffstat (limited to 'sw/inc/ring.hxx')
-rw-r--r--sw/inc/ring.hxx13
1 files changed, 12 insertions, 1 deletions
diff --git a/sw/inc/ring.hxx b/sw/inc/ring.hxx
index 826de1454ec3..53b271d36124 100644
--- a/sw/inc/ring.hxx
+++ b/sw/inc/ring.hxx
@@ -57,7 +57,7 @@ namespace sw
* item pDestRing
* @param pDestRing the container to merge this container with
*/
- void MoveRingTo( T* pDestRing );
+ void MoveRingTo( T* pDestRing )
{
std::swap(*(&pPrev->pNext), *(&pDestRing->pPrev->pNext));
std::swap(*(&pPrev), *(&pDestRing->pPrev));
@@ -133,10 +133,14 @@ namespace sw
}
template <class T> class RingIterator;
+ /**
+ * helper class that provides STL-style container iteration to the ring
+ */
template <class T>
class RingContainer SAL_FINAL
{
private:
+ /** the item in the ring where iteration starts */
T* m_pStart;
public:
@@ -187,7 +191,14 @@ namespace sw
{ return m_pCurrent == other.m_pCurrent && m_pStart == m_pStart; }
T& dereference() const
{ return m_pCurrent ? *m_pCurrent : * m_pStart; }
+ /**
+ * This is:
+ * - pointing to the current item in the iteration in general
+ * - nullptr if on the first item (begin())
+ * - m_pStart when beyond the last item (end())
+ */
T* m_pCurrent;
+ /** the first item of the iteration */
T* m_pStart;
};