The builder is a low overhead helper class that provides functions to add modules. More...
Public Member Functions | |
template<class T > | |
void | add (T *processor, Processor *parent, int chainIndex=IDs::Chains::Direct) |
Adds the given module to the parent processor. More... | |
template<class T > | |
T * | create (Processor *parent, int chainIndex=IDs::Chains::Direct) |
Creates a module of the given class and adds it to the parent with the specified chainIndex. More... | |
Processor * | createFromBase64State (const String &base64EncodedString, Processor *parent, int chainIndex=IDs::Chains::Direct) |
Creates a module from the given Base64 encoded String and adds it to the parent module with the suppliedChainIndex. More... | |
template<class T > | |
Reference< T > | find (const String &name) |
Finds and creates a reference object to the module with the given ID. More... | |
template<class T > | |
bool | remove (Processor *p) |
Removes a processor and all its child processors from the signal path. More... | |
void | setAttributes (Processor *p, const AttributeCollection &collection) |
Sets all the attributes from the given collection. More... | |
The builder is a low overhead helper class that provides functions to add modules.
Create one of those, supply the MainController instance and call its methods to build up the architecture of your plugin.
Important: This class can only be used from the IDs::Threads::Loading thread in a suspended state. If you want to use this class from another thread, wrap it into a lambda and give it to the TaskAfterSuspension class.
void add | ( | T * | processor, |
Processor * | parent, | ||
int | chainIndex = IDs::Chains::Direct |
||
) |
Adds the given module to the parent processor.
Specify the chainIndex for modulators / effects.
T * create | ( | Processor * | parent, |
int | chainIndex = IDs::Chains::Direct |
||
) |
Creates a module of the given class and adds it to the parent with the specified chainIndex.
See ChainIndexes.
This only works with HISE modules that are registered at one of the factories, so if you want to add a custom module, use the add() function instead.
Processor * createFromBase64State | ( | const String & | base64EncodedString, |
Processor * | parent, | ||
int | chainIndex = IDs::Chains::Direct |
||
) |
Creates a module from the given Base64 encoded String and adds it to the parent module with the suppliedChainIndex.
Reference<T> find | ( | const String & | name | ) |
Finds and creates a reference object to the module with the given ID.
bool remove | ( | Processor * | p | ) |
Removes a processor and all its child processors from the signal path.
void setAttributes | ( | Processor * | p, |
const AttributeCollection & | collection | ||
) |
Sets all the attributes from the given collection.
You can use std::initialiser_lists for a clean syntax: