Public Member Functions | Private Attributes

ACE_Stream_Iterator< ACE_SYNCH_DECL > Class Template Reference

Iterate through an ACE_Stream. More...

#include <Stream.h>

Collaboration diagram for ACE_Stream_Iterator< ACE_SYNCH_DECL >:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 ACE_Stream_Iterator (const ACE_Stream< ACE_SYNCH_USE > &sr)
int next (const ACE_Module< ACE_SYNCH_USE > *&next_item)
int done (void) const
 Returns 1 when all items have been seen, else 0.
int advance (void)

Private Attributes

ACE_Module< ACE_SYNCH_USE > * next_
 Next ACE_Module that we haven't yet seen.

Detailed Description

template<ACE_SYNCH_DECL>
class ACE_Stream_Iterator< ACE_SYNCH_DECL >

Iterate through an ACE_Stream.

Definition at line 201 of file Stream.h.


Constructor & Destructor Documentation

template<ACE_SYNCH_DECL >
ACE_Stream_Iterator< ACE_SYNCH_DECL >::ACE_Stream_Iterator ( const ACE_Stream< ACE_SYNCH_USE > &  sr  ) 

Definition at line 625 of file Stream.cpp.

  : next_ (sr.stream_head_)
{
  ACE_TRACE ("ACE_Stream_Iterator<ACE_SYNCH_USE>::ACE_Stream_Iterator");
}


Member Function Documentation

template<ACE_SYNCH_DECL >
int ACE_Stream_Iterator< ACE_SYNCH_DECL >::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 44 of file Stream.inl.

{
  ACE_TRACE ("ACE_Stream_Iterator<ACE_SYNCH_USE>::advance");
  this->next_ = this->next_->next ();
  return this->next_ != 0;
}

template<ACE_SYNCH_DECL >
int ACE_Stream_Iterator< ACE_SYNCH_DECL >::done ( void   )  const

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

Definition at line 37 of file Stream.inl.

{
  ACE_TRACE ("ACE_Stream_Iterator<ACE_SYNCH_USE>::done");
  return this->next_ == 0;
}

template<ACE_SYNCH_DECL >
int ACE_Stream_Iterator< ACE_SYNCH_DECL >::next ( const ACE_Module< ACE_SYNCH_USE > *&  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 29 of file Stream.inl.

{
  ACE_TRACE ("ACE_Stream_Iterator<ACE_SYNCH_USE>::next");
  mod = this->next_;
  return this->next_ != 0;
}


Member Data Documentation

template<ACE_SYNCH_DECL >
ACE_Module<ACE_SYNCH_USE>* ACE_Stream_Iterator< ACE_SYNCH_DECL >::next_ [private]

Next ACE_Module that we haven't yet seen.

Definition at line 222 of file Stream.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines