diff options
author | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2014-12-01 03:36:23 +0100 |
---|---|---|
committer | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2014-12-02 00:33:19 +0100 |
commit | 0e6221e51f8572552021873aa4d6624365607ede (patch) | |
tree | ae0b30a4426abcfc842194aa796e2f46a44e4332 /sw/inc/ring.hxx | |
parent | 4a5928ee4ca55d22a0fa122886ecc7d6a55e9247 (diff) |
some more iteration
Change-Id: I5ca9b79b2992b8499beec04ebe86d82ae14b0ee2
Diffstat (limited to 'sw/inc/ring.hxx')
-rw-r--r-- | sw/inc/ring.hxx | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/sw/inc/ring.hxx b/sw/inc/ring.hxx index cec52844857c..4dc03308bdfe 100644 --- a/sw/inc/ring.hxx +++ b/sw/inc/ring.hxx @@ -29,8 +29,6 @@ class RingIterator; class SW_DLLPUBLIC Ring { friend class Ring_node_traits; - typedef RingIterator iterator; - typedef RingIterator const_iterator; Ring* pNext; Ring* pPrev; ///< In order to speed up inserting and deleting. @@ -38,12 +36,18 @@ protected: Ring(); Ring( Ring * ); public: + typedef RingIterator iterator; + typedef RingIterator const_iterator; virtual ~Ring(); void MoveTo( Ring *pDestRing ); void MoveRingTo( Ring *pDestRing ); Ring* GetNext() const { return pNext; } Ring* GetPrev() const { return pPrev; } + // unfortunately we cant name these STL-conforming, as some derived classes + // also derive from other STL containers (which is bad anyway, but ...) + iterator beginRing(); + iterator endRing(); sal_uInt32 numberOf() const; }; @@ -78,6 +82,14 @@ class RingIterator : public boost::iterator_facade< Ring* m_pStart; }; +inline Ring::iterator Ring::beginRing() + { return Ring::iterator(this); }; + +inline Ring::iterator Ring::endRing() + { return Ring::iterator(this, false); }; + + + #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |