A Processor that uses a Table. More...
Public Member Functions | |
| void | addTableChangeListener (SafeChangeListener *listener) |
| Adds a listener to this processor. More... | |
| virtual int | getNumTables () const |
| Overwrite this and return the number of tables that this processor uses. More... | |
| virtual Table * | getTable (int tableIndex) const =0 |
| Overwrite this method and return the table for the supplied index. More... | |
| void | removeTableChangeListener (SafeChangeListener *listener) |
| Removes a listener from this processor. More... | |
| void | sendTableIndexChangeMessage (bool sendSynchronous, Table *table, float tableIndex) |
| Call this method whenever the table index is changed and all connected tables will receive a change message. More... | |
A Processor that uses a Table.
If your Processor uses a Table object for anything, you can subclass it from this interface class and use its Table.
| void addTableChangeListener | ( | SafeChangeListener * | listener | ) |
Adds a listener to this processor.
|
inlinevirtual |
Overwrite this and return the number of tables that this processor uses.
It assumes one table so if you do have one table, you don't need to do anything...
|
pure virtual |
Overwrite this method and return the table for the supplied index.
If you only have one table, ignore this parameter.
Implemented in LfoModulator, KeyModulator, PitchwheelModulator, MacroModulator, and RandomModulator.
| void removeTableChangeListener | ( | SafeChangeListener * | listener | ) |
Removes a listener from this processor.
| void sendTableIndexChangeMessage | ( | bool | sendSynchronous, |
| Table * | table, | ||
| float | tableIndex | ||
| ) |
Call this method whenever the table index is changed and all connected tables will receive a change message.
You can dynamic_cast the broadcaster to a LookupTableProcessor::TableChangeBroadcaster and use this code:
if(dynamic_cast<LookupTableProcessor::TableChangeBroadcaster*>(b) != nullptr)
{
dynamic_cast<LookupTableProcessor::TableChangeBroadcaster*>(b)->table->setDisplayedIndex(tableValue);
}