class Playable

A 'playable' object interface. More...

Contains pure virtuals
Full nameTSE3::Playable
Definition#include <Playable.h>
InheritsTSE3::Notifier [public ]
Inherited byEventTrack, FlagTrack, KeySigTrack, Metronome, MidiData, MidiFileImport, MidiParams, Panic, Part, Phrase, PhraseEdit, RepeatTrack, Song, TempoTrack, TimeSigTrack, Track
List of all Methods
Annotated List

Public Methods

Protected Methods

Detailed Description

The interface that an object that can produce MidiEvents must implement. Playable objects allow a 'player' to get an iterator that will produce all the MidiEvents in the object. Each implementation of Playable will therefore also supply an implementation of PlayableIterator which is accesed via the iterator() method.

Since all Song components implement the Playable interface, this is an application of the 'Composite' pattern from the GoF book.

See also: PlayableIterator

 Playable ()


 ~Playable ()



PlayableIterator * iterator (Clock index)


[pure virtual]

Creates a new PlayableIterator object and passes it to you ready to iterate over the MidiEvents in this object.

It is the user's responsibility to delete it.

indexThe time at which to position the iterator

Returns: New PlayableIterator that emits MidiEvent data contained in this object - you must delete the PlayableIterator when you have finished with it.

Clock  lastClock ()


[const pure virtual]

Returns the last Clock value that will be returned by this Playable object. Since all MidiEvents are delivered in strict order, this will also be the greatest Clock value returned by this Playable object.

Returns: The last Clock value in the object

Playable & operator= (const Playable &)



Reimplemented from Notifier.

 Playable (const Playable &)