summaryrefslogtreecommitdiff
path: root/sw/inc/ring.hxx
diff options
context:
space:
mode:
authorBjoern Michaelsen <bjoern.michaelsen@canonical.com>2014-12-01 20:37:40 +0100
committerBjoern Michaelsen <bjoern.michaelsen@canonical.com>2014-12-02 00:37:13 +0100
commitd57baa3d5d197c6620078104cca57fd8104012f6 (patch)
tree3a5ef1da481634e0974e71cc59c0cb10096b1f94 /sw/inc/ring.hxx
parent7902e30aab21968648d53356d9d3533bbac17172 (diff)
const iterators
Change-Id: I129b51c2e736e04287141c0eae8c212c179a3475
Diffstat (limited to 'sw/inc/ring.hxx')
-rw-r--r--sw/inc/ring.hxx11
1 files changed, 10 insertions, 1 deletions
diff --git a/sw/inc/ring.hxx b/sw/inc/ring.hxx
index d5eb30ba0377..b4d4043f07da 100644
--- a/sw/inc/ring.hxx
+++ b/sw/inc/ring.hxx
@@ -53,7 +53,7 @@ namespace sw
Ring( T* );
public:
typedef RingIterator<T> iterator;
- typedef RingIterator<T> const_iterator;
+ typedef RingIterator<const T> const_iterator;
virtual ~Ring()
{ algo::unlink(static_cast< T* >(this)); };
void MoveTo( T* pDestRing );
@@ -65,6 +65,8 @@ namespace sw
// also derive from other STL containers (which is bad anyway, but ...)
iterator beginRing();
iterator endRing();
+ const_iterator beginRing() const;
+ const_iterator endRing() const;
sal_uInt32 numberOf() const
{ return algo::count(static_cast< const T* >(this)); }
@@ -142,6 +144,13 @@ namespace sw
inline typename Ring<T>::iterator Ring<T>::endRing()
{ return Ring<T>::iterator(static_cast< T* >(this), false); };
+ template <class T>
+ inline typename Ring<T>::const_iterator Ring<T>::beginRing() const
+ { return Ring<T>::const_iterator(static_cast< const T* >(this)); };
+
+ template <class T>
+ inline typename Ring<T>::const_iterator Ring<T>::endRing() const
+ { return Ring<T>::const_iterator(static_cast< const T* >(this), false); };
}
#endif