diff options
author | sergio <sergio@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-09-29 01:38:40 +0000 |
---|---|---|
committer | sergio <sergio@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-09-29 01:38:40 +0000 |
commit | 709a65e517b0b52c1f5a657b15c4261de79a65c5 (patch) | |
tree | 5ffee6a3374b00834a7f5d1d51fb26a161f566e1 /ace/Containers_T.cpp | |
parent | 9cb54c3668925e6a8cb032c2c65fe0e258009869 (diff) | |
download | ATCD-709a65e517b0b52c1f5a657b15c4261de79a65c5.tar.gz |
Added begin () and end () to ACE_Unbounded_Queue.
Diffstat (limited to 'ace/Containers_T.cpp')
-rw-r--r-- | ace/Containers_T.cpp | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/ace/Containers_T.cpp b/ace/Containers_T.cpp index f7dd671baa9..4b2d04db88f 100644 --- a/ace/Containers_T.cpp +++ b/ace/Containers_T.cpp @@ -366,6 +366,21 @@ ACE_Unbounded_Queue<T>::operator= (const ACE_Unbounded_Queue<T> &us) } } +template <class T> ACE_Unbounded_Queue_Iterator<T> +ACE_Unbounded_Queue<T>::begin (void) +{ + // ACE_TRACE ("ACE_Unbounded_Queue<T>::begin"); + return ACE_Unbounded_Queue_Iterator<T> (*this); +} + +template <class T> ACE_Unbounded_Queue_Iterator<T> +ACE_Unbounded_Queue<T>::end (void) +{ + // ACE_TRACE ("ACE_Unbounded_Queue<T>::end"); + return ACE_Unbounded_Queue_Iterator<T> (*this, 1); +} + + ACE_ALLOC_HOOK_DEFINE(ACE_Unbounded_Queue) template <class T> void @@ -596,8 +611,8 @@ ACE_Unbounded_Queue_Iterator<T>::dump (void) const } template <class T> -ACE_Unbounded_Queue_Iterator<T>::ACE_Unbounded_Queue_Iterator (ACE_Unbounded_Queue<T> &q) - : current_ (q.head_->next_), +ACE_Unbounded_Queue_Iterator<T>::ACE_Unbounded_Queue_Iterator (ACE_Unbounded_Queue<T> &q, int end) + : current_ (end == 0 ? q.head_->next_ : q.head_ ), queue_ (q) { // ACE_TRACE ("ACE_Unbounded_Queue_Iterator<T>::ACE_Unbounded_Queue_Iterator"); |