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

ACE_Select_Reactor_Handler_Repository_Iterator Class Reference

Iterate through the <ACE_Select_Reactor_Handler_Repository>. More...

#include <Select_Reactor_Base.h>

Collaboration diagram for ACE_Select_Reactor_Handler_Repository_Iterator:

Collaboration graph
[legend]
List of all members.

Public Methods

 ACE_Select_Reactor_Handler_Repository_Iterator (const ACE_Select_Reactor_Handler_Repository *s)
 ~ACE_Select_Reactor_Handler_Repository_Iterator (void)
 dtor. More...

int next (ACE_Event_Handler *&next_item)
 Pass back the <next_item> that hasn't been seen in the Set. Returns 0 when all items have been seen, else 1. More...

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

int advance (void)
 Move forward by one element in the set. Returns 0 when all the items in the set have been seen, else 1. More...

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


Public Attributes

 ACE_ALLOC_HOOK_DECLARE
 Declare the dynamic allocation hooks. More...


Private Attributes

const ACE_Select_Reactor_Handler_Repositoryrep_
 Reference to the Handler_Repository we are iterating over. More...

ssize_t current_
 Pointer to the current iteration level. More...


Detailed Description

Iterate through the <ACE_Select_Reactor_Handler_Repository>.

Definition at line 380 of file Select_Reactor_Base.h.


Constructor & Destructor Documentation

ACE_Select_Reactor_Handler_Repository_Iterator::ACE_Select_Reactor_Handler_Repository_Iterator const ACE_Select_Reactor_Handler_Repository   s
 

Definition at line 398 of file Select_Reactor_Base.cpp.

00399     : rep_ (s),
00400       current_ (-1)
00401 {
00402   this->advance ();
00403 }

ACE_INLINE ACE_Select_Reactor_Handler_Repository_Iterator::~ACE_Select_Reactor_Handler_Repository_Iterator void   
 

dtor.

Definition at line 22 of file Select_Reactor_Base.i.

00023 {
00024 }


Member Function Documentation

int ACE_Select_Reactor_Handler_Repository_Iterator::advance void   
 

Move forward by one element in the set. Returns 0 when all the items in the set have been seen, else 1.

Definition at line 430 of file Select_Reactor_Base.cpp.

References ACE_SELECT_REACTOR_EVENT_HANDLER, current_, ACE_Select_Reactor_Handler_Repository::max_handlep1_, and rep_.

Referenced by ACE_Select_Reactor_T::check_handles, ACE_Select_Reactor_Handler_Repository::dump, ACE_Select_Reactor_T::resume_handlers, and ACE_Select_Reactor_T::suspend_handlers.

00431 {
00432   if (this->current_ < this->rep_->max_handlep1_)
00433     this->current_++;
00434 
00435   while (this->current_ < this->rep_->max_handlep1_)
00436     if (ACE_SELECT_REACTOR_EVENT_HANDLER (this->rep_, this->current_) != 0)
00437       return 1;
00438     else
00439       this->current_++;
00440 
00441   return this->current_ < this->rep_->max_handlep1_;
00442 }

int ACE_Select_Reactor_Handler_Repository_Iterator::done void    const
 

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

Definition at line 422 of file Select_Reactor_Base.cpp.

References current_, ACE_Select_Reactor_Handler_Repository::max_handlep1_, and rep_.

00423 {
00424   return this->current_ >= this->rep_->max_handlep1_;
00425 }

void ACE_Select_Reactor_Handler_Repository_Iterator::dump void    const
 

Dump the state of an object.

Definition at line 447 of file Select_Reactor_Base.cpp.

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

00448 {
00449   ACE_TRACE ("ACE_Select_Reactor_Handler_Repository_Iterator::dump");
00450 
00451   ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
00452   ACE_DEBUG ((LM_DEBUG, ACE_LIB_TEXT ("rep_ = %u"), this->rep_));
00453   ACE_DEBUG ((LM_DEBUG, ACE_LIB_TEXT ("current_ = %d"), this->current_));
00454   ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
00455 }

int ACE_Select_Reactor_Handler_Repository_Iterator::next ACE_Event_Handler *&    next_item
 

Pass back the <next_item> that hasn't been seen in the Set. Returns 0 when all items have been seen, else 1.

Definition at line 409 of file Select_Reactor_Base.cpp.

References ACE_SELECT_REACTOR_EVENT_HANDLER, current_, ACE_Select_Reactor_Handler_Repository::max_handlep1_, and rep_.

Referenced by ACE_Select_Reactor_T::check_handles, ACE_Select_Reactor_Handler_Repository::dump, ACE_Select_Reactor_T::resume_handlers, and ACE_Select_Reactor_T::suspend_handlers.

00410 {
00411   int result = 1;
00412 
00413   if (this->current_ >= this->rep_->max_handlep1_)
00414     result = 0;
00415   else
00416     next_item = ACE_SELECT_REACTOR_EVENT_HANDLER (this->rep_,
00417                                                   this->current_);
00418   return result;
00419 }


Member Data Documentation

ACE_Select_Reactor_Handler_Repository_Iterator::ACE_ALLOC_HOOK_DECLARE
 

Declare the dynamic allocation hooks.

Definition at line 406 of file Select_Reactor_Base.h.

ssize_t ACE_Select_Reactor_Handler_Repository_Iterator::current_ [private]
 

Pointer to the current iteration level.

Definition at line 413 of file Select_Reactor_Base.h.

Referenced by advance, done, and next.

const ACE_Select_Reactor_Handler_Repository* ACE_Select_Reactor_Handler_Repository_Iterator::rep_ [private]
 

Reference to the Handler_Repository we are iterating over.

Definition at line 410 of file Select_Reactor_Base.h.

Referenced by advance, done, and next.


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