NiCMidi 1.1.0
A MIDI library derived from J.D.Koftinoff jdksmidi
|
Allows the user to queue many MIDIProcessor objects, passing the result of each one to the next. More...
#include <processor.h>
Public Types | |
enum | { MODE_IGNORE , MODE_CONTINUE , MODE_STOP } |
These are the values to be given as parameters to the SetProcessMode() method. More... | |
Public Member Functions | |
MIDIMultiProcessor () | |
The constructor creates an object with empty queue. More... | |
virtual void | Reset () |
Empties the processors queue, removing all their pointers from it. More... | |
MIDIProcessor * | GetProcessor (unsigned int pos) |
Returns a pointer to the MIDIProcessor at the given position. More... | |
const MIDIProcessor * | GetProcessor (unsigned int pos) const |
Returns a pointer to the MIDIProcessor at the given position. More... | |
int | GetProcessMode () const |
Returns the processing mode (see SetProcessMode()). More... | |
void | SetProcessor (MIDIProcessor *proc, int pos=-1) |
Inserts a MIDIProcessor object into the queue. More... | |
void | RemoveProcessor (unsigned int pos) |
Removes the MIDIProcessor at the given position. More... | |
void | RemoveProcessor (const MIDIProcessor *proc) |
Searches the given MIDIProcessor in the queue and removes it (it does nothing if the processor is not in the queue). More... | |
void | SetProcessMode (int mode) |
Determines the behaviour of the MIDIMultiProcessor if any of the processors return false. More... | |
virtual bool | Process (MIDITimedMessage *msg) |
The Process method. More... | |
![]() | |
MIDIProcessor () | |
The constructor. More... | |
virtual | ~MIDIProcessor () |
The destructor. More... | |
Allows the user to queue many MIDIProcessor objects, passing the result of each one to the next.
anonymous enum |
These are the values to be given as parameters to the SetProcessMode() method.
|
inline |
The constructor creates an object with empty queue.
|
virtual |
Empties the processors queue, removing all their pointers from it.
Implements MIDIProcessor.
|
inline |
Returns a pointer to the MIDIProcessor at the given position.
|
inline |
Returns a pointer to the MIDIProcessor at the given position.
|
inline |
Returns the processing mode (see SetProcessMode()).
void MIDIMultiProcessor::SetProcessor | ( | MIDIProcessor * | proc, |
int | pos = -1 |
||
) |
Inserts a MIDIProcessor object into the queue.
proc | the MIDIProcessor to be inserted (it is not owned by the MIDIMultiProcessor) |
pos | the position in the queue. If you leave the default value the processor will be appended to the queue, otherwise the new processor substitutes the old (the method does nothing if pos is not in the appropriate range) |
void MIDIMultiProcessor::RemoveProcessor | ( | unsigned int | pos | ) |
Removes the MIDIProcessor at the given position.
It only removes the processor pointer from the queue, and does nothing if pos is not in the appropriate range.
void MIDIMultiProcessor::RemoveProcessor | ( | const MIDIProcessor * | proc | ) |
Searches the given MIDIProcessor in the queue and removes it (it does nothing if the processor is not in the queue).
It only removes the processor pointer from the queue.
|
inline |
Determines the behaviour of the MIDIMultiProcessor if any of the processors return false.
You can set these three values:
|
virtual |
The Process method.
It passes the MIDI message to the first processor and subsequently to all other processors in the queue. If any of the processors returns false the behaviour and the returned value are defined by the SetProcessMode() method.
Implements MIDIProcessor.