Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

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 Methods

 ACE_TPQ_Iterator (ACE_Token_Proxy_Queue &q)
 Constructor. More...

 ~ACE_TPQ_Iterator (void)
 Destructor. More...

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

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

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

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


Private Attributes

ACE_TPQ_Entrycurrent_

Detailed Description

Iterates through ACE_Token_Proxy_Queues.

Not a public interface.

Definition at line 259 of file Local_Tokens.h.


Constructor & Destructor Documentation

ACE_TPQ_Iterator::ACE_TPQ_Iterator ACE_Token_Proxy_Queue   q
 

Constructor.

Definition at line 213 of file Local_Tokens.cpp.

References ACE_TRACE.

00214   : current_ (q.head_)
00215 {
00216   ACE_TRACE ("ACE_TPQ_Iterator::ACE_TPQ_Iterator");
00217 }

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 238 of file Local_Tokens.cpp.

References ACE_TRACE, current_, 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.

00239 {
00240   ACE_TRACE ("ACE_TPQ_Iterator::advance");
00241 
00242   if (current_ != 0)
00243     this->current_ = this->current_->next_;
00244 }

int ACE_TPQ_Iterator::done void    const
 

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

Definition at line 230 of file Local_Tokens.cpp.

References ACE_TRACE, and current_.

00231 {
00232   ACE_TRACE ("ACE_TPQ_Iterator::done");
00233 
00234   return this->current_ == 0;
00235 }

void ACE_TPQ_Iterator::dump void    const
 

Dump the state of an object.

Definition at line 247 of file Local_Tokens.cpp.

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

00248 {
00249   ACE_TRACE ("ACE_TPQ_Iterator::dump");
00250   ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
00251   ACE_DEBUG ((LM_DEBUG,  ACE_LIB_TEXT ("ACE_TPQ_Iterator::dump:\n")
00252               ACE_LIB_TEXT (" current_ = %d\n"),
00253               (long) this->current_));
00254   ACE_DEBUG ((LM_DEBUG,  ACE_LIB_TEXT ("head_ and tail_\n")));
00255   ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
00256 }

int ACE_TPQ_Iterator::next ACE_TPQ_Entry *&    next_item
 

Pass back the <next_item>.

Definition at line 220 of file Local_Tokens.cpp.

References ACE_TRACE, and current_.

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.

00221 {
00222   ACE_TRACE ("ACE_TPQ_Iterator::next");
00223 
00224   next_item = this->current_;
00225 
00226   return current_ != 0;
00227 }


Member Data Documentation

ACE_TPQ_Entry* ACE_TPQ_Iterator::current_ [private]
 

Definition at line 281 of file Local_Tokens.h.

Referenced by advance, done, and next.


The documentation for this class was generated from the following files:
Generated on Mon Jun 16 12:58:40 2003 for ACE by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002