#include <Unbounded_Queue.h>
Collaboration diagram for ACE_Unbounded_Queue_Const_Iterator< T >:
Public Member Functions | |
ACE_Unbounded_Queue_Const_Iterator (const ACE_Unbounded_Queue< T > &q, int end=0) | |
int | next (T *&next_item) |
int | advance (void) |
int | first (void) |
int | done (void) const |
Returns 1 when all items have been seen, else 0. | |
void | dump (void) const |
Dump the state of an object. | |
Public Attributes | |
ACE_ALLOC_HOOK_DECLARE | |
Declare the dynamic allocation hooks. | |
Private Attributes | |
ACE_Node< T > * | current_ |
Pointer to the current node in the iteration. | |
const ACE_Unbounded_Queue< T > & | queue_ |
Pointer to the queue we're iterating over. |
Definition at line 81 of file Unbounded_Queue.h.
ACE_Unbounded_Queue_Const_Iterator< T >::ACE_Unbounded_Queue_Const_Iterator | ( | const ACE_Unbounded_Queue< T > & | q, | |
int | end = 0 | |||
) |
int ACE_Unbounded_Queue_Const_Iterator< T >::advance | ( | void | ) |
Move forward by one element in the set. Returns 0 when all the items in the queue have been seen, else 1.
Definition at line 341 of file Unbounded_Queue.cpp.
References ACE_Unbounded_Queue_Const_Iterator< T >::current_, ACE_Node< T, C >::next_, and ACE_Unbounded_Queue_Const_Iterator< T >::queue_.
00342 { 00343 // ACE_TRACE ("ACE_Unbounded_Queue_Const_Iterator<T>::advance"); 00344 this->current_ = this->current_->next_; 00345 return this->current_ != this->queue_.head_; 00346 }
int ACE_Unbounded_Queue_Const_Iterator< T >::done | ( | void | ) | const |
Returns 1 when all items have been seen, else 0.
Definition at line 357 of file Unbounded_Queue.cpp.
References ACE_TRACE, ACE_Unbounded_Queue_Const_Iterator< T >::current_, and ACE_Unbounded_Queue_Const_Iterator< T >::queue_.
00358 { 00359 ACE_TRACE ("ACE_Unbounded_Queue_Const_Iterator<T>::done"); 00360 00361 return this->current_ == this->queue_.head_; 00362 }
void ACE_Unbounded_Queue_Const_Iterator< T >::dump | ( | void | ) | const |
Dump the state of an object.
Definition at line 325 of file Unbounded_Queue.cpp.
00326 { 00327 #if defined (ACE_HAS_DUMP) 00328 // ACE_TRACE ("ACE_Unbounded_Queue_Const_Iterator<T>::dump"); 00329 #endif /* ACE_HAS_DUMP */ 00330 }
int ACE_Unbounded_Queue_Const_Iterator< T >::first | ( | void | ) |
Move to the first element in the queue. Returns 0 if the queue is empty, else 1.
Definition at line 349 of file Unbounded_Queue.cpp.
References ACE_Unbounded_Queue_Const_Iterator< T >::current_, and ACE_Unbounded_Queue_Const_Iterator< T >::queue_.
00350 { 00351 // ACE_TRACE ("ACE_Unbounded_Queue_Const_Iterator<T>::first"); 00352 this->current_ = this->queue_.head_->next_; 00353 return this->current_ != this->queue_.head_; 00354 }
int ACE_Unbounded_Queue_Const_Iterator< T >::next | ( | T *& | next_item | ) |
Pass back the next_item that hasn't been seen in the queue. Returns 0 when all items have been seen, else 1.
Definition at line 365 of file Unbounded_Queue.cpp.
References ACE_Unbounded_Queue_Const_Iterator< T >::current_, and ACE_Node< T, C >::item_.
00366 { 00367 // ACE_TRACE ("ACE_Unbounded_Queue_Const_Iterator<T>::next"); 00368 if (this->current_ == this->queue_.head_) 00369 return 0; 00370 else 00371 { 00372 item = &this->current_->item_; 00373 return 1; 00374 } 00375 }
ACE_Unbounded_Queue_Const_Iterator< T >::ACE_ALLOC_HOOK_DECLARE |
ACE_Node<T>* ACE_Unbounded_Queue_Const_Iterator< T >::current_ [private] |
Pointer to the current node in the iteration.
Definition at line 112 of file Unbounded_Queue.h.
Referenced by ACE_Unbounded_Queue_Const_Iterator< T >::advance(), ACE_Unbounded_Queue_Const_Iterator< T >::done(), ACE_Unbounded_Queue_Const_Iterator< T >::first(), and ACE_Unbounded_Queue_Const_Iterator< T >::next().
const ACE_Unbounded_Queue<T>& ACE_Unbounded_Queue_Const_Iterator< T >::queue_ [private] |
Pointer to the queue we're iterating over.
Definition at line 115 of file Unbounded_Queue.h.
Referenced by ACE_Unbounded_Queue_Const_Iterator< T >::advance(), ACE_Unbounded_Queue_Const_Iterator< T >::done(), and ACE_Unbounded_Queue_Const_Iterator< T >::first().