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

ACE_Timer_List_Iterator_T Class Template Reference

Iterates over an <ACE_Timer_List>. More...

#include <Timer_List_T.h>

Inheritance diagram for ACE_Timer_List_Iterator_T:

Inheritance graph
[legend]
Collaboration diagram for ACE_Timer_List_Iterator_T:

Collaboration graph
[legend]
List of all members.

Public Types

typedef ACE_Timer_List_T<
TYPE, FUNCTOR, ACE_LOCK > 
List

Public Methods

 ACE_Timer_List_Iterator_T (List &lst)
 Constructor. More...

virtual ~ACE_Timer_List_Iterator_T (void)
 Destructor. More...

virtual void first (void)
 Positions the iterator at the earliest node in the Timer Queue. More...

virtual void next (void)
 Positions the iterator at the next node in the Timer Queue. More...

virtual int isdone (void) const
 Returns true when there are no more nodes in the sequence. More...

virtual ACE_Timer_Node_T<
TYPE > * 
item (void)
 Returns the node at the current position in the sequence. More...


Protected Attributes

Listlist_
 Pointer to the <ACE_Timer_List> that we are iterating over. More...

ACE_Timer_Node_T< TYPE > * current_node_
 Current position in the <ACE_Timer_List>. More...


Detailed Description

template<class TYPE, class FUNCTOR, class ACE_LOCK>
class ACE_Timer_List_Iterator_T< TYPE, FUNCTOR, ACE_LOCK >

Iterates over an <ACE_Timer_List>.

This is a generic iterator that can be used to visit every node of a timer queue.

Definition at line 36 of file Timer_List_T.h.


Member Typedef Documentation

template<class TYPE, class FUNCTOR, class ACE_LOCK>
typedef ACE_Timer_List_T<TYPE, FUNCTOR, ACE_LOCK> ACE_Timer_List_Iterator_T::List
 

Definition at line 40 of file Timer_List_T.h.


Constructor & Destructor Documentation

template<class TYPE, class FUNCTOR, class ACE_LOCK>
ACE_Timer_List_Iterator_T< TYPE, FUNCTOR, ACE_LOCK >::ACE_Timer_List_Iterator_T List   lst
 

Constructor.

Definition at line 18 of file Timer_List_T.cpp.

References first.

00019   : list_ (lst)
00020 {
00021   this->first();
00022 }

template<class TYPE, class FUNCTOR, class ACE_LOCK>
ACE_Timer_List_Iterator_T< TYPE, FUNCTOR, ACE_LOCK >::~ACE_Timer_List_Iterator_T void    [virtual]
 

Destructor.

Definition at line 25 of file Timer_List_T.cpp.

00026 {
00027 }


Member Function Documentation

template<class TYPE, class FUNCTOR, class ACE_LOCK>
void ACE_Timer_List_Iterator_T< TYPE, FUNCTOR, ACE_LOCK >::first void    [virtual]
 

Positions the iterator at the earliest node in the Timer Queue.

Implements ACE_Timer_Queue_Iterator_T.

Definition at line 32 of file Timer_List_T.cpp.

References current_node_, ACE_Timer_List_T::get_first, and list_.

Referenced by ACE_Timer_List_Iterator_T, and ACE_Timer_List_T::iter.

00033 {
00034   this->current_node_ = this->list_.get_first();
00035 }

template<class TYPE, class FUNCTOR, class ACE_LOCK>
int ACE_Timer_List_Iterator_T< TYPE, FUNCTOR, ACE_LOCK >::isdone void    const [virtual]
 

Returns true when there are no more nodes in the sequence.

Implements ACE_Timer_Queue_Iterator_T.

Definition at line 52 of file Timer_List_T.cpp.

References current_node_.

Referenced by item, and next.

00053 {
00054   return this->current_node_ == 0;
00055 }

template<class TYPE, class FUNCTOR, class ACE_LOCK>
ACE_Timer_Node_T< TYPE > * ACE_Timer_List_Iterator_T< TYPE, FUNCTOR, ACE_LOCK >::item void    [virtual]
 

Returns the node at the current position in the sequence.

Implements ACE_Timer_Queue_Iterator_T.

Definition at line 60 of file Timer_List_T.cpp.

References current_node_, and isdone.

00061 {
00062   if (! this->isdone())
00063     return this->current_node_;
00064   return 0;
00065 }

template<class TYPE, class FUNCTOR, class ACE_LOCK>
void ACE_Timer_List_Iterator_T< TYPE, FUNCTOR, ACE_LOCK >::next void    [virtual]
 

Positions the iterator at the next node in the Timer Queue.

Implements ACE_Timer_Queue_Iterator_T.

Definition at line 40 of file Timer_List_T.cpp.

References current_node_, ACE_Timer_List_T::head_, isdone, and list_.

00041 {
00042   // Make sure that if we are at the end, we don't wrap around
00043   if (! this->isdone())
00044     this->current_node_ = this->current_node_->get_next ();
00045   if (this->current_node_  == this->list_.head_)
00046     this->current_node_ = 0;
00047 }


Member Data Documentation

template<class TYPE, class FUNCTOR, class ACE_LOCK>
ACE_Timer_Node_T<TYPE>* ACE_Timer_List_Iterator_T::current_node_ [protected]
 

Current position in the <ACE_Timer_List>.

Definition at line 64 of file Timer_List_T.h.

Referenced by first, isdone, item, and next.

template<class TYPE, class FUNCTOR, class ACE_LOCK>
List& ACE_Timer_List_Iterator_T::list_ [protected]
 

Pointer to the <ACE_Timer_List> that we are iterating over.

Definition at line 61 of file Timer_List_T.h.

Referenced by first, and next.


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