Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members

TSE3::PlayableIterator Class Reference

Iterator over the MidiEvents in a Playable. More...

#include <Playable.h>

Collaboration diagram for TSE3::PlayableIterator:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 PlayableIterator ()
virtual ~PlayableIterator ()
const MidiEventoperator * () const
const MidiEventoperator-> () const
bool more () const
virtual void moveTo (Clock)
PlayableIteratoroperator++ ()

Protected Member Functions

virtual void getNextEvent ()=0

Protected Attributes

MidiEvent _next
bool _more

Detailed Description

Iterator over the MidiEvents in a Playable.

This is an iterator that moves over every MidiEvent in a Playable object. Each MidiEvent are delivered in time order. This is a use of the 'Iterator' design pattern in the GoF book.

Each kind of Playable object will provide an implementation of the PlayableIterator interface that knows how to iterate over that kind of object.

Author:
Pete Goodliffe
Version:
3.00
See also:
Playable

MidiEvent


Constructor & Destructor Documentation

TSE3::PlayableIterator::PlayableIterator  ) 
 

Create a PlayableIterator. Client code will never call this member function.

Important note
Derived classes must attach themselves to the parent Playable object as listeners, and then implement properly.

virtual TSE3::PlayableIterator::~PlayableIterator  )  [virtual]
 


Member Function Documentation

const MidiEvent& TSE3::PlayableIterator::operator *  )  const [inline]
 

Returns the next MidiEvent in the iterator

Returns:
Next MidiEvent
See also:
operator->

const MidiEvent* TSE3::PlayableIterator::operator->  )  const [inline]
 

Returns the next MidiEvent in the iterator

Returns:
Next MidiEvent
See also:
operator*

bool TSE3::PlayableIterator::more  )  const [inline]
 

Returns whether there are any more events to come; i.e. whether ++ is valid on this object.

Returns:
Whether there are any more events

virtual void TSE3::PlayableIterator::moveTo Clock   )  [inline, virtual]
 

Moves the iterator to the given time position.

Parameters:
c Time to move iterator to.

PlayableIterator& TSE3::PlayableIterator::operator++  ) 
 

Increments the iterator, so that it will return the next MidiEvent in the Playable.

virtual void TSE3::PlayableIterator::getNextEvent  )  [protected, pure virtual]
 


Member Data Documentation

MidiEvent TSE3::PlayableIterator::_next [protected]
 

bool TSE3::PlayableIterator::_more [protected]
 


The documentation for this class was generated from the following file:
Generated on Wed May 25 14:46:52 2005 for TSE3 by doxygen 1.3.2