In file ../include/EST_TIterator.h:

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

### Public Methods

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

### Public

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

### Protected Fields

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

## Documentation

`Container* cont`
  The container we are looking at

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

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

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

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

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

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

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

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

`void beginning()`
  Reset to the start of the container

`End Tests`

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

`bool at_end() const`
  True when there are no 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

`Moving Forward`

`void next()`
  Next moves to the next entry

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

`Access`

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

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

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

`unsigned 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