#include <Unbounded_Queue.h>
Collaboration diagram for ACE_Unbounded_Queue_Iterator< T >:
Public Member Functions | |
ACE_Unbounded_Queue_Iterator (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. | |
ACE_Unbounded_Queue< T > & | queue_ |
Pointer to the queue we're iterating over. |
Definition at line 38 of file Unbounded_Queue.h.
ACE_Unbounded_Queue_Iterator< T >::ACE_Unbounded_Queue_Iterator | ( | ACE_Unbounded_Queue< T > & | q, | |
int | end = 0 | |||
) |
int ACE_Unbounded_Queue_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 396 of file Unbounded_Queue.cpp.
References ACE_Unbounded_Queue_Iterator< T >::current_, ACE_Node< T, C >::next_, and ACE_Unbounded_Queue_Iterator< T >::queue_.
Referenced by ACE_ARGV_T< CHAR_TYPE >::create_buf_from_queue(), ACE_Stats::mean(), ACE_Service_Gestalt::process_commandline_directives(), ACE_Service_Gestalt::process_directives(), ACE_Notification_Queue::reset(), and ACE_Stats::std_dev().
00397 { 00398 // ACE_TRACE ("ACE_Unbounded_Queue_Iterator<T>::advance"); 00399 this->current_ = this->current_->next_; 00400 return this->current_ != this->queue_.head_; 00401 }
int ACE_Unbounded_Queue_Iterator< T >::done | ( | void | ) | const |
Returns 1 when all items have been seen, else 0.
Definition at line 412 of file Unbounded_Queue.cpp.
References ACE_TRACE, ACE_Unbounded_Queue_Iterator< T >::current_, and ACE_Unbounded_Queue_Iterator< T >::queue_.
Referenced by ACE_ARGV_T< CHAR_TYPE >::create_buf_from_queue(), ACE_Stats::mean(), and ACE_Stats::std_dev().
00413 { 00414 ACE_TRACE ("ACE_Unbounded_Queue_Iterator<T>::done"); 00415 00416 return this->current_ == this->queue_.head_; 00417 }
void ACE_Unbounded_Queue_Iterator< T >::dump | ( | void | ) | const |
Dump the state of an object.
Definition at line 380 of file Unbounded_Queue.cpp.
00381 { 00382 #if defined (ACE_HAS_DUMP) 00383 // ACE_TRACE ("ACE_Unbounded_Queue_Iterator<T>::dump"); 00384 #endif /* ACE_HAS_DUMP */ 00385 }
int ACE_Unbounded_Queue_Iterator< T >::first | ( | void | ) |
Move to the first element in the queue. Returns 0 if the queue is empty, else 1.
Definition at line 404 of file Unbounded_Queue.cpp.
References ACE_Unbounded_Queue_Iterator< T >::current_, and ACE_Unbounded_Queue_Iterator< T >::queue_.
00405 { 00406 // ACE_TRACE ("ACE_Unbounded_Queue_Iterator<T>::first"); 00407 this->current_ = this->queue_.head_->next_; 00408 return this->current_ != this->queue_.head_; 00409 }
int ACE_Unbounded_Queue_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 420 of file Unbounded_Queue.cpp.
References ACE_Unbounded_Queue_Iterator< T >::current_, and ACE_Node< T, C >::item_.
Referenced by ACE_ARGV_T< CHAR_TYPE >::create_buf_from_queue(), ACE_Stats::mean(), ACE_Service_Gestalt::process_commandline_directives(), ACE_Service_Gestalt::process_directives(), ACE_Notification_Queue::reset(), and ACE_Stats::std_dev().
00421 { 00422 // ACE_TRACE ("ACE_Unbounded_Queue_Iterator<T>::next"); 00423 if (this->current_ == this->queue_.head_) 00424 return 0; 00425 else 00426 { 00427 item = &this->current_->item_; 00428 return 1; 00429 } 00430 }
ACE_Unbounded_Queue_Iterator< T >::ACE_ALLOC_HOOK_DECLARE |
ACE_Node<T>* ACE_Unbounded_Queue_Iterator< T >::current_ [private] |
Pointer to the current node in the iteration.
Definition at line 69 of file Unbounded_Queue.h.
Referenced by ACE_Unbounded_Queue_Iterator< T >::advance(), ACE_Unbounded_Queue_Iterator< T >::done(), ACE_Unbounded_Queue_Iterator< T >::first(), and ACE_Unbounded_Queue_Iterator< T >::next().
ACE_Unbounded_Queue<T>& ACE_Unbounded_Queue_Iterator< T >::queue_ [private] |
Pointer to the queue we're iterating over.
Definition at line 72 of file Unbounded_Queue.h.
Referenced by ACE_Unbounded_Queue_Iterator< T >::advance(), ACE_Unbounded_Queue_Iterator< T >::done(), and ACE_Unbounded_Queue_Iterator< T >::first().