In file ../include/EST_TIterator.h:

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


Public Methods

[more] 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]Iter& operator = (const Iter &orig)
Copy an iterator by assignment
[more]Iter& operator = (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

[more]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
Viewing the iterator as an integer (for instance in a test) sees a non-zero value iff there are elements still to look at

[more] Moving Forward

[more]void next ()
Next moves to the next entry
[more]Iter& operator ++ ()
The increment operator does the same as next

[more] Access

[more]const Entry& current () const
Return the element currentl 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

Public

[more]typedef EST_TIterator<Container, IPointer, Entry> Iter
Name for an itterator like this

Protected Fields

[more]Container* cont
The container we are looking at
[more]unsigned int pos
Position in the structure.
[more]IPointer pointer
Structure defined by the container class whcih contains the current state of the iteration


Documentation

oContainer* cont
The container we are looking at

ounsigned int pos
Position in the structure. May or may not be useful.

oIPointer pointer
Structure defined by the container class whcih contains the current state of the iteration

otypedef EST_TIterator<Container, IPointer, Entry> Iter
Name for an itterator like this

o EST_TIterator()
Create an iterator not associated with any specific container

o EST_TIterator(const Container &over)
Create an iterator ready to run over the given container

oIter& operator = (const Iter &orig)
Copy an iterator by assignment

oIter& operator = (const Container &over)
Assigning a container to an iterator sets it ready to start

ovoid begin(const Container &over)
Set the iterator ready to run over this container

ovoid beginning()
Reset to the start of the container

o End Tests

obool has_more_elements() const
True if there are more elements to look at

obool at_end() const
True when there are no more

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

o Moving Forward

ovoid next()
Next moves to the next entry

oIter& operator ++()
The increment operator does the same as next

o Access

oconst Entry& current() const
Return the element currentl pointed to

oconst Entry& operator *() const
The * operator returns the current element.

oconst Entry& next_element()
Return the current element and move the pointer forwards

ounsigned int n() const
Return the current position


This class has no child classes.
Friends:
class EST_TStructIterator <Container, IPointer, Entry>
class EST_TRwIterator <Container, IPointer, Entry>
class EST_TRwStructIterator <Container, IPointer, Entry>

Alphabetic index HTML hierarchy of classes or Java


This page is part of the Edinburgh Speech Tools Library documentation
Copyright University of Edinburgh 1997
Contact: speech_tools@cstr.ed.ac.uk