#include <Message_Queue_T.h>
Collaboration diagram for ACE_Message_Queue_Iterator<>:
Public Member Functions | |
ACE_Message_Queue_Iterator (ACE_Message_Queue< ACE_SYNCH_USE > &queue) | |
int | next (ACE_Message_Block *&entry) |
int | done (void) const |
Returns 1 when all items have been seen, else 0. | |
int | advance (void) |
void | dump (void) const |
Dump the state of an object. | |
Public Attributes | |
ACE_ALLOC_HOOK_DECLARE | |
Declare the dynamic allocation hooks. | |
Private Attributes | |
ACE_Message_Queue< ACE_SYNCH_USE > & | queue_ |
Message_Queue we are iterating over. | |
ACE_Message_Block * | curr_ |
Keeps track of how far we've advanced... |
Definition at line 629 of file Message_Queue_T.h.
ACE_Message_Queue_Iterator<>::ACE_Message_Queue_Iterator | ( | ACE_Message_Queue< ACE_SYNCH_USE > & | queue | ) |
int ACE_Message_Queue_Iterator<>::advance | ( | void | ) |
Move forward by one element in the queue. Returns 0 when all the items in the set have been seen, else 1.
Definition at line 626 of file Message_Queue_T.cpp.
References ACE_READ_GUARD_RETURN, ACE_SYNCH_MUTEX_T, ACE_Message_Queue_Iterator<>::curr_, and ACE_Message_Block::next().
00627 { 00628 ACE_READ_GUARD_RETURN (ACE_SYNCH_MUTEX_T, m, this->queue_.lock_, -1) 00629 00630 if (this->curr_) 00631 this->curr_ = this->curr_->next (); 00632 return this->curr_ != 0; 00633 }
int ACE_Message_Queue_Iterator<>::done | ( | void | ) | const |
Returns 1 when all items have been seen, else 0.
Definition at line 618 of file Message_Queue_T.cpp.
References ACE_READ_GUARD_RETURN, ACE_SYNCH_MUTEX_T, and ACE_Message_Queue_Iterator<>::curr_.
00619 { 00620 ACE_READ_GUARD_RETURN (ACE_SYNCH_MUTEX_T, m, this->queue_.lock_, -1) 00621 00622 return this->curr_ == 0; 00623 }
void ACE_Message_Queue_Iterator<>::dump | ( | void | ) | const |
int ACE_Message_Queue_Iterator<>::next | ( | ACE_Message_Block *& | entry | ) |
Pass back the entry that hasn't been seen in the queue. Returns 0 when all items have been seen, else 1.
Definition at line 604 of file Message_Queue_T.cpp.
References ACE_READ_GUARD_RETURN, ACE_SYNCH_MUTEX_T, and ACE_Message_Queue_Iterator<>::curr_.
00605 { 00606 ACE_READ_GUARD_RETURN (ACE_SYNCH_MUTEX_T, m, this->queue_.lock_, -1) 00607 00608 if (this->curr_ != 0) 00609 { 00610 entry = this->curr_; 00611 return 1; 00612 } 00613 00614 return 0; 00615 }
ACE_Message_Queue_Iterator<>::ACE_ALLOC_HOOK_DECLARE |
ACE_Message_Block* ACE_Message_Queue_Iterator<>::curr_ [private] |
Keeps track of how far we've advanced...
Definition at line 658 of file Message_Queue_T.h.
Referenced by ACE_Message_Queue_Iterator<>::advance(), ACE_Message_Queue_Iterator<>::done(), and ACE_Message_Queue_Iterator<>::next().
ACE_Message_Queue<ACE_SYNCH_USE>& ACE_Message_Queue_Iterator<>::queue_ [private] |