Edinburgh Speech Tools  2.1-release
EST_TIterator< Container, IPointer, Entry > Class Template Reference

#include <include/EST_TIterator.h>

Inheritance diagram for EST_TIterator< Container, IPointer, Entry >:

Public Types

typedef EST_TIterator< Container, IPointer, Entry > Iter
 Name for an iterator like this. More...
 

Public Member Functions

 EST_TIterator ()
 Create an iterator not associated with any specific container. More...
 
 EST_TIterator (const Container &over)
 Create an iterator ready to run over the given container. More...
 
Iteroperator= (const Iter &orig)
 Copy an iterator by assignment. More...
 
Iteroperator= (const Container &over)
 Assigning a container to an iterator sets it ready to start. More...
 
void begin (const Container &over)
 Set the iterator ready to run over this container. More...
 
void beginning ()
 Reset to the start of the container. More...
 
End Tests
bool has_more_elements () const
 True if there are more elements to look at. More...
 
bool at_end () const
 True when there are no more. More...
 
 operator int () const
 
Moving Forward
void next ()
 Next moves to the next entry. More...
 
Iteroperator++ ()
 The increment operator does the same as next. More...
 
Iter operator++ (int dummy)
 
Access
const Entry & current () const
 Return the element currently pointed to. More...
 
const Entry & operator* () const
 The * operator returns the current element. More...
 
const Entry & next_element ()
 Return the current element and move the pointer forwards. More...
 
unsigned int n () const
 Return the current position. More...
 

Protected Attributes

Container * cont
 The container we are looking at. More...
 
unsigned int pos
 Position in the structure. May or may not be useful. More...
 
IPointer pointer
 

Friends

class EST_TStructIterator< Container, IPointer, Entry >
 
class EST_TRwIterator< Container, IPointer, Entry >
 
class EST_TRwStructIterator< Container, IPointer, Entry >
 

Detailed Description

template<class Container, class IPointer, class Entry>
class EST_TIterator< Container, IPointer, Entry >

Definition at line 85 of file EST_TIterator.h.

Member Typedef Documentation

template<class Container, class IPointer, class Entry>
typedef EST_TIterator<Container, IPointer, Entry> EST_TIterator< Container, IPointer, Entry >::Iter

Name for an iterator like this.

Definition at line 101 of file EST_TIterator.h.

Constructor & Destructor Documentation

template<class Container, class IPointer, class Entry>
EST_TIterator< Container, IPointer, Entry >::EST_TIterator ( )
inline

Create an iterator not associated with any specific container.

Definition at line 104 of file EST_TIterator.h.

template<class Container, class IPointer, class Entry>
EST_TIterator< Container, IPointer, Entry >::EST_TIterator ( const Container &  over)
inline

Create an iterator ready to run over the given container.

Definition at line 107 of file EST_TIterator.h.

Member Function Documentation

template<class Container, class IPointer, class Entry>
Iter& EST_TIterator< Container, IPointer, Entry >::operator= ( const Iter orig)
inline

Copy an iterator by assignment.

Definition at line 111 of file EST_TIterator.h.

template<class Container, class IPointer, class Entry>
Iter& EST_TIterator< Container, IPointer, Entry >::operator= ( const Container &  over)
inline

Assigning a container to an iterator sets it ready to start.

Definition at line 115 of file EST_TIterator.h.

template<class Container, class IPointer, class Entry>
void EST_TIterator< Container, IPointer, Entry >::begin ( const Container &  over)
inline

Set the iterator ready to run over this container.

Definition at line 119 of file EST_TIterator.h.

template<class Container, class IPointer, class Entry>
void EST_TIterator< Container, IPointer, Entry >::beginning ( )
inline

Reset to the start of the container.

Definition at line 123 of file EST_TIterator.h.

template<class Container, class IPointer, class Entry>
bool EST_TIterator< Container, IPointer, Entry >::has_more_elements ( ) const
inline

True if there are more elements to look at.

Definition at line 130 of file EST_TIterator.h.

template<class Container, class IPointer, class Entry>
bool EST_TIterator< Container, IPointer, Entry >::at_end ( ) const
inline

True when there are no more.

Definition at line 134 of file EST_TIterator.h.

template<class Container, class IPointer, class Entry>
EST_TIterator< Container, IPointer, Entry >::operator int ( ) const
inline

Viewing the iterator as an integer (for instance in a test) sees a non-zero value iff there are elements still to look at.

Definition at line 140 of file EST_TIterator.h.

template<class Container, class IPointer, class Entry>
void EST_TIterator< Container, IPointer, Entry >::next ( )
inline

Next moves to the next entry.

Definition at line 148 of file EST_TIterator.h.

template<class Container, class IPointer, class Entry>
Iter& EST_TIterator< Container, IPointer, Entry >::operator++ ( )
inline

The increment operator does the same as next.

Definition at line 152 of file EST_TIterator.h.

template<class Container, class IPointer, class Entry>
Iter EST_TIterator< Container, IPointer, Entry >::operator++ ( int  dummy)
inline

Definition at line 154 of file EST_TIterator.h.

template<class Container, class IPointer, class Entry>
const Entry& EST_TIterator< Container, IPointer, Entry >::current ( ) const
inline

Return the element currently pointed to.

Definition at line 167 of file EST_TIterator.h.

template<class Container, class IPointer, class Entry>
const Entry& EST_TIterator< Container, IPointer, Entry >::operator* ( ) const
inline

The * operator returns the current element.

Definition at line 171 of file EST_TIterator.h.

template<class Container, class IPointer, class Entry>
const Entry& EST_TIterator< Container, IPointer, Entry >::next_element ( )
inline

Return the current element and move the pointer forwards.

Definition at line 181 of file EST_TIterator.h.

template<class Container, class IPointer, class Entry>
unsigned int EST_TIterator< Container, IPointer, Entry >::n ( ) const
inline

Return the current position.

Definition at line 190 of file EST_TIterator.h.

Friends And Related Function Documentation

template<class Container, class IPointer, class Entry>
friend class EST_TStructIterator< Container, IPointer, Entry >
friend

Definition at line 193 of file EST_TIterator.h.

template<class Container, class IPointer, class Entry>
friend class EST_TRwIterator< Container, IPointer, Entry >
friend

Definition at line 194 of file EST_TIterator.h.

template<class Container, class IPointer, class Entry>
friend class EST_TRwStructIterator< Container, IPointer, Entry >
friend

Definition at line 195 of file EST_TIterator.h.

Member Data Documentation

template<class Container, class IPointer, class Entry>
Container* EST_TIterator< Container, IPointer, Entry >::cont
protected

The container we are looking at.

Definition at line 89 of file EST_TIterator.h.

template<class Container, class IPointer, class Entry>
unsigned int EST_TIterator< Container, IPointer, Entry >::pos
protected

Position in the structure. May or may not be useful.

Definition at line 92 of file EST_TIterator.h.

template<class Container, class IPointer, class Entry>
IPointer EST_TIterator< Container, IPointer, Entry >::pointer
protected

Structure defined by the container class which contains the current state of the iteration.

Definition at line 97 of file EST_TIterator.h.


The documentation for this class was generated from the following file: