JUCE
|
A class encapsulating a group of AudioProcessorParameters and nested AudioProcessorParameterGroups. More...
Classes | |
class | AudioProcessorParameterNode |
A child of an AudioProcessorParameterGroup. More... | |
Public Member Functions | |
AudioProcessorParameterGroup (const String &groupID, const String &groupName, const String &subgroupSeparator) | |
Creates an empty AudioProcessorParameterGroup. More... | |
template<typename ChildType > | |
AudioProcessorParameterGroup (const String &groupID, const String &groupName, const String &subgroupSeparator, std::unique_ptr< ChildType > child) | |
Creates an AudioProcessorParameterGroup with a single child. More... | |
template<typename ChildType , typename... Args> | |
AudioProcessorParameterGroup (const String &groupID, const String &groupName, const String &subgroupSeparator, std::unique_ptr< ChildType > firstChild, Args &&... remainingChildren) | |
Creates an AudioProcessorParameterGroup with multiple children. More... | |
String | getID () const |
Returns the group's ID. More... | |
String | getName () const |
Returns the group's name. More... | |
String | getSeparator () const |
Returns the group's separator string. More... | |
const AudioProcessorParameterGroup * | getParent () const noexcept |
Returns the parent of the group, or nullptr if this is a top-levle group. More... | |
const AudioProcessorParameterNode ** | begin () const noexcept |
const AudioProcessorParameterNode ** | end () const noexcept |
void | swapWith (AudioProcessorParameterGroup &other) noexcept |
Swaps the content of this group with another. More... | |
Array< const AudioProcessorParameterGroup * > | getSubgroups (bool recursive) const |
Returns all subgroups of this group. More... | |
Array< AudioProcessorParameter * > | getParameters (bool recursive) const |
Returns all the parameters in this group. More... | |
Array< const AudioProcessorParameterGroup * > | getGroupsForParameter (AudioProcessorParameter *parameter) const |
Searches this group recursively for a parameter and returns a depth ordered list of the groups it belongs to. More... | |
template<typename ChildType > | |
void | addChild (std::unique_ptr< ChildType > child) |
Adds a child to the group. More... | |
template<typename ChildType , typename... Args> | |
void | addChild (std::unique_ptr< ChildType > firstChild, Args &&... remainingChildren) |
Adds multiple children to the group. More... | |
A class encapsulating a group of AudioProcessorParameters and nested AudioProcessorParameterGroups.
This class is predominantly write-only; there are methods for adding group members but none for removing them. Ultimately you will probably want to add a fully constructed group to an AudioProcessor.
AudioProcessorParameterGroup::AudioProcessorParameterGroup | ( | const String & | groupID, |
const String & | groupName, | ||
const String & | subgroupSeparator | ||
) |
Creates an empty AudioProcessorParameterGroup.
groupID | A unique identifier for the group. Keep it basic; don't use any special characters like "." and avoid pure integer strings which could collide with legacy parameter IDs. |
groupName | The group's name, which will be displayed in the host. |
subgroupSeparator | A separator string to use between the name of this group and the name of any subgroups if this group is flattened. AUv3 and VST3 plug-ins can have multiple layers of nested subgroups, but AU plug-ins cannot have any subgroups. |
AudioProcessorParameterGroup::AudioProcessorParameterGroup | ( | const String & | groupID, |
const String & | groupName, | ||
const String & | subgroupSeparator, | ||
std::unique_ptr< ChildType > | child | ||
) |
Creates an AudioProcessorParameterGroup with a single child.
groupID | A unique identifier for the group. Keep it basic; don't use any special characters like "." and avoid pure integer strings which could collide with legacy parameter IDs. |
groupName | The group's name, which will be displayed in the host. |
subgroupSeparator | A separator string to use between the name of this group and the name of any subgroups if this group is flattened. AUv3 and VST3 plug-ins can have multiple layers of nested subgroups, but AU plug-ins cannot have any subgroups. |
child | An AudioProcessorParameter or an AudioProcessorParameterGroup to add to the group. |
References addChild().
AudioProcessorParameterGroup::AudioProcessorParameterGroup | ( | const String & | groupID, |
const String & | groupName, | ||
const String & | subgroupSeparator, | ||
std::unique_ptr< ChildType > | firstChild, | ||
Args &&... | remainingChildren | ||
) |
Creates an AudioProcessorParameterGroup with multiple children.
groupID | A unique identifier for the group. Keep it basic; don't use any special characters like "." and avoid pure integer strings which could collide with legacy parameter IDs. |
groupName | The group's name, which will be displayed in the host. |
subgroupSeparator | A separator string to use between the name of this group and the name of any subgroups if this group is flattened. AUv3 and VST3 plug-ins can have multiple layers of nested subgroups, but AU plug-ins cannot have any subgroups. |
firstChild | An AudioProcessorParameter or an AudioProcessorParameterGroup to add to the group. |
remainingChildren | A list of more AudioProcessorParameters or AudioProcessorParameterGroups to add to the group. |
References addChild().
String AudioProcessorParameterGroup::getID | ( | ) | const |
Returns the group's ID.
String AudioProcessorParameterGroup::getName | ( | ) | const |
Returns the group's name.
String AudioProcessorParameterGroup::getSeparator | ( | ) | const |
Returns the group's separator string.
|
noexcept |
Returns the parent of the group, or nullptr if this is a top-levle group.
|
noexcept |
|
noexcept |
|
noexcept |
Swaps the content of this group with another.
Array<const AudioProcessorParameterGroup*> AudioProcessorParameterGroup::getSubgroups | ( | bool | recursive | ) | const |
Returns all subgroups of this group.
recursive | If this is true then this method will fetch all nested subgroups using a depth first search. |
Referenced by addChild().
Array<AudioProcessorParameter*> AudioProcessorParameterGroup::getParameters | ( | bool | recursive | ) | const |
Returns all the parameters in this group.
recursive | If this is true then this method will fetch all nested parameters using a depth first search. |
Referenced by addChild().
Array<const AudioProcessorParameterGroup*> AudioProcessorParameterGroup::getGroupsForParameter | ( | AudioProcessorParameter * | parameter | ) | const |
Searches this group recursively for a parameter and returns a depth ordered list of the groups it belongs to.
References Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::insert().
void AudioProcessorParameterGroup::addChild | ( | std::unique_ptr< ChildType > | child | ) |
Adds a child to the group.
Referenced by addChild(), and AudioProcessorParameterGroup().
void AudioProcessorParameterGroup::addChild | ( | std::unique_ptr< ChildType > | firstChild, |
Args &&... | remainingChildren | ||
) |
Adds multiple children to the group.
References Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::add(), addChild(), getParameters(), getSubgroups(), and JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR.