Static Public Member Functions | List of all members
ProcessorHelpers Class Reference

Some handy helper functions that are using mainly the Iterator. More...

Static Public Member Functions

static const ProcessorfindParentProcessor (const Processor *childProcessor, bool getParentSynth)
 Small helper function that returns the parent processor of the given child processor. More...
 
static ProcessorgetFirstProcessorWithName (const Processor *rootProcessor, const String &name)
 Returns the first Processor with the given name (It skips all InternalChains). More...
 
static StringArray getListOfAllConnectableProcessors (const Processor *processorToSkip)
 Returns a list of all processors that can be connected to a parameter. More...
 
static String getScriptVariableDeclaration (const Processor *p, bool copyToClipboard=true)
 Returns a string that declares a variable to be copied into a script. More...
 
template<class ProcessorType >
static bool is (const Processor *p)
 Small helper function that checks if the given processor is of the supplied type. More...
 
template<class ProcessorType >
static bool is (Processor *p)
 Small helper function that checks if the given processor is of the supplied type. More...
 
static bool isHiddableProcessor (const Processor *p)
 Checks if the Processor can be hidden. More...
 

Detailed Description

Some handy helper functions that are using mainly the Iterator.

Member Function Documentation

const Processor * findParentProcessor ( const Processor childProcessor,
bool  getParentSynth 
)
static

Small helper function that returns the parent processor of the given child processor.

Parameters
childProcessorthe processor which parent should be found. It must be within the normal tree structure.
getParentSynthif true, then the synth where the processor resides will be looked for. If false, it will return the chain where the Processor resides (either ModulatorChain, MidiProcessorChain or EffectChain)
Processor * getFirstProcessorWithName ( const Processor rootProcessor,
const String &  name 
)
static

Returns the first Processor with the given name (It skips all InternalChains).

If there are multiple Processors with the same name, it will always return the first one.

To avoid this, use PresetHandler::findProcessorsWithDuplicateId...

StringArray getListOfAllConnectableProcessors ( const Processor processorToSkip)
static

Returns a list of all processors that can be connected to a parameter.

String getScriptVariableDeclaration ( const Processor p,
bool  copyToClipboard = true 
)
static

Returns a string that declares a variable to be copied into a script.

For a given Processor of type "Type" and id "name" it will return:

id = Synth.getType("id");

Currently supported types (including all subclasses):

  • MidiProcessors
  • Modulators
  • ModulatorSynths
static bool is ( const Processor p)
inlinestatic

Small helper function that checks if the given processor is of the supplied type.

static bool is ( Processor p)
inlinestatic

Small helper function that checks if the given processor is of the supplied type.

bool isHiddableProcessor ( const Processor p)
static

Checks if the Processor can be hidden.

This returns true for all processors that show up in the popup list.

©2017 HISE. This documentation is autogenerated from the HISE source code using Doxygen.