ACE_TPQ_Iterator Class Reference

Iterates through ACE_Token_Proxy_Queues. More...

#include <Local_Tokens.h>

Collaboration diagram for ACE_TPQ_Iterator:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 ACE_TPQ_Iterator (ACE_Token_Proxy_Queue &q)
 Constructor.

 ~ACE_TPQ_Iterator (void)
 Destructor.

int next (ACE_TPQ_Entry *&next_item)
 Pass back the .

int done (void) const
 Returns 1 when all items have been seen, else 0.

void advance (void)
 Move forward by one element in the queue.

void dump (void) const
 Dump the state of an object.


Private Attributes

ACE_TPQ_Entrycurrent_

Detailed Description

Iterates through ACE_Token_Proxy_Queues.

Not a public interface.

Definition at line 264 of file Local_Tokens.h.


Constructor & Destructor Documentation

ACE_TPQ_Iterator::ACE_TPQ_Iterator ACE_Token_Proxy_Queue q  ) 
 

Constructor.

Definition at line 239 of file Local_Tokens.cpp.

References ACE_TRACE.

00240   : current_ (q.head_)
00241 {
00242   ACE_TRACE ("ACE_TPQ_Iterator::ACE_TPQ_Iterator");
00243 }

ACE_TPQ_Iterator::~ACE_TPQ_Iterator void   ) 
 

Destructor.


Member Function Documentation

void ACE_TPQ_Iterator::advance void   ) 
 

Move forward by one element in the queue.

Definition at line 264 of file Local_Tokens.cpp.

References ACE_TRACE, and ACE_TPQ_Entry::next_.

Referenced by ACE_RW_Token::is_owner(), ACE_RW_Token::is_waiting_for(), ACE_Mutex_Token::is_waiting_for(), ACE_RW_Token::notify_new_owner(), and ACE_RW_Token::owners().

00265 {
00266   ACE_TRACE ("ACE_TPQ_Iterator::advance");
00267 
00268   if (current_ != 0)
00269     this->current_ = this->current_->next_;
00270 }

int ACE_TPQ_Iterator::done void   )  const
 

Returns 1 when all items have been seen, else 0.

Definition at line 256 of file Local_Tokens.cpp.

References ACE_TRACE.

00257 {
00258   ACE_TRACE ("ACE_TPQ_Iterator::done");
00259 
00260   return this->current_ == 0;
00261 }

void ACE_TPQ_Iterator::dump void   )  const
 

Dump the state of an object.

Definition at line 273 of file Local_Tokens.cpp.

References ACE_BEGIN_DUMP, ACE_DEBUG, ACE_END_DUMP, ACE_LIB_TEXT, ACE_TRACE, and LM_DEBUG.

00274 {
00275 #if defined (ACE_HAS_DUMP)
00276   ACE_TRACE ("ACE_TPQ_Iterator::dump");
00277   ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
00278   ACE_DEBUG ((LM_DEBUG,  ACE_LIB_TEXT ("ACE_TPQ_Iterator::dump:\n")
00279               ACE_LIB_TEXT (" current_ = %d\n"),
00280               (long) this->current_));
00281   ACE_DEBUG ((LM_DEBUG,  ACE_LIB_TEXT ("head_ and tail_\n")));
00282   ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
00283 #endif /* ACE_HAS_DUMP */
00284 }

int ACE_TPQ_Iterator::next ACE_TPQ_Entry *&  next_item  ) 
 

Pass back the .

Definition at line 246 of file Local_Tokens.cpp.

References ACE_TRACE.

Referenced by ACE_RW_Token::is_owner(), ACE_RW_Token::is_waiting_for(), ACE_Mutex_Token::is_waiting_for(), ACE_RW_Token::notify_new_owner(), and ACE_RW_Token::owners().

00247 {
00248   ACE_TRACE ("ACE_TPQ_Iterator::next");
00249 
00250   next_item = this->current_;
00251 
00252   return current_ != 0;
00253 }


Member Data Documentation

ACE_TPQ_Entry* ACE_TPQ_Iterator::current_ [private]
 

Definition at line 286 of file Local_Tokens.h.


The documentation for this class was generated from the following files:
Generated on Thu Nov 9 11:31:58 2006 for ACE by doxygen 1.3.6