ACE_Stream_Iterator<> Class Template Reference

Iterate through an ACE_Stream. More...

#include <Stream.h>

Collaboration diagram for ACE_Stream_Iterator<>:

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 <Module> that we haven't yet seen.

Detailed Description

template<ACE_SYNCH_DECL>
class ACE_Stream_Iterator<>

Iterate through an ACE_Stream.

Definition at line 201 of file Stream.h.


Constructor & Destructor Documentation

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

Definition at line 611 of file Stream.cpp.

References ACE_TRACE.

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


Member Function Documentation

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

References ACE_TRACE, ACE_Module<>::next(), and ACE_Stream_Iterator<>::next_.

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

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

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

Definition at line 37 of file Stream.inl.

References ACE_TRACE, and ACE_Stream_Iterator<>::next_.

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

template<ACE_SYNCH_DECL >
ACE_INLINE int ACE_Stream_Iterator<>::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.

References ACE_TRACE, and ACE_Stream_Iterator<>::next_.

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


Member Data Documentation

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

Next <Module> that we haven't yet seen.

Definition at line 222 of file Stream.h.

Referenced by ACE_Stream_Iterator<>::advance(), ACE_Stream_Iterator<>::done(), and ACE_Stream_Iterator<>::next().


The documentation for this class was generated from the following files:
Generated on Tue Feb 2 17:35:41 2010 for ACE by  doxygen 1.4.7