class PlayableIterator

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

Contains pure virtuals
Full nameTSE3::PlayableIterator
Definition#include <Playable.h>
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods

Protected Methods

Protected Members


Detailed Description

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.

See also: Playable, MidiEvent

 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 Listener::deleted properly.

 ~PlayableIterator ()

~PlayableIterator

[virtual]

const MidiEvent & operator* ()

operator*

[const]

Returns the next MidiEvent in the iterator

Returns: Next MidiEvent

See also: operator->

const MidiEvent * operator-> ()

operator->

[const]

Returns the next MidiEvent in the iterator

Returns: Next MidiEvent

See also: operator*

bool  more ()

more

[const]

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

Returns: Whether there are any more events

void  moveTo (Clock )

moveTo

[virtual]

Moves the iterator to the given time position.

Parameters:
cTime to move iterator to.

PlayableIterator & operator++ ()

operator++

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

void  getNextEvent ()

getNextEvent

[protected pure virtual]

MidiEvent _next

_next

[protected]

bool _more

_more

[protected]