JUCE-7.0.12-0-g4f43011b96 JUCE-7.0.12-0-g4f43011b96
JUCE — C++ application framework with suport for VST, VST3, LV2 audio plug-ins

« « « Anklang Documentation
Loading...
Searching...
No Matches
juce_AudioProcessorParameterGroup.h
Go to the documentation of this file.
1 /*
2 ==============================================================================
3
4 This file is part of the JUCE library.
5 Copyright (c) 2022 - Raw Material Software Limited
6
7 JUCE is an open source library subject to commercial or open-source
8 licensing.
9
10 By using JUCE, you agree to the terms of both the JUCE 7 End-User License
11 Agreement and JUCE Privacy Policy.
12
13 End User License Agreement: www.juce.com/juce-7-licence
14 Privacy Policy: www.juce.com/juce-privacy-policy
15
16 Or: You may also use this code under the terms of the GPL v3 (see
17 www.gnu.org/licenses).
18
19 JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER
20 EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE
21 DISCLAIMED.
22
23 ==============================================================================
24*/
25
26namespace juce
27{
28
29//==============================================================================
42{
43public:
44 //==============================================================================
88
89 //==============================================================================
92
105
117 template <typename ParameterOrGroup>
124
137 template <typename ParameterOrGroup, typename... Args>
144
149
154
157
158 //==============================================================================
160 String getID() const;
161
163 String getName() const;
164
166 String getSeparator() const;
167
170
171 //==============================================================================
176 void setName (String newName);
177
178 //==============================================================================
179 const AudioProcessorParameterNode* const* begin() const noexcept;
181
182 //==============================================================================
189
196
201
202 //==============================================================================
209 void addChild (std::unique_ptr<ParameterOrGroup> child)
210 {
211 // If you hit a compiler error here then you are attempting to add a
212 // child that is neither a pointer to an AudioProcessorParameterGroup
213 // nor a pointer to an AudioProcessorParameter.
214 append (std::move (child));
215 }
216
222 template <typename ParameterOrGroup, typename... Args>
224 {
225 addChild (std::move (firstChild));
226 addChild (std::forward<Args> (remainingChildren)...);
227 }
228
229 #ifndef DOXYGEN
230 [[deprecated ("This class now has a move operator, so if you're trying to move them around, you "
231 "should use that, or if you really need to swap two groups, just call std::swap. "
232 "However, remember that swapping a group that's already owned by an AudioProcessor "
233 "will most likely crash the host, so don't do that.")]]
234 void swapWith (AudioProcessorParameterGroup& other) { std::swap (*this, other); }
235 #endif
236
237private:
238 //==============================================================================
241 const AudioProcessorParameterGroup* getGroupForParameter (AudioProcessorParameter*) const;
242 void updateChildParentage();
245
246 //==============================================================================
247 String identifier, name, separator;
249 AudioProcessorParameterGroup* parent = nullptr;
250
252};
253
254} // namespace juce
Holds a resizable array of primitive or copy-by-value objects.
Definition juce_Array.h:56
AudioProcessorParameterGroup * getGroup() const
Returns a pointer to a group if this node contains a group, nullptr otherwise.
AudioProcessorParameter * getParameter() const
Returns a pointer to a parameter if this node contains a parameter, nullptr otherwise.
AudioProcessorParameterGroup * getParent() const
Returns the parent group or nullptr if this is a top-level group.
A class encapsulating a group of AudioProcessorParameters and nested AudioProcessorParameterGroups.
AudioProcessorParameterGroup(String groupID, String groupName, String subgroupSeparator, std::unique_ptr< ParameterOrGroup > firstChild, Args &&... remainingChildren)
Creates an AudioProcessorParameterGroup with multiple children.
AudioProcessorParameterGroup(String groupID, String groupName, String subgroupSeparator, std::unique_ptr< ParameterOrGroup > child)
Creates an AudioProcessorParameterGroup with a single child.
String getSeparator() const
Returns the group's separator string.
void setName(String newName)
Changes the name of the group.
String getName() const
Returns the group's name.
void addChild(std::unique_ptr< ParameterOrGroup > child)
Adds a child to the group.
Array< const AudioProcessorParameterGroup * > getGroupsForParameter(AudioProcessorParameter *) const
Searches this group recursively for a parameter and returns a depth ordered list of the groups it bel...
Array< AudioProcessorParameter * > getParameters(bool recursive) const
Returns all the parameters in this group.
const AudioProcessorParameterGroup * getParent() const noexcept
Returns the parent of the group, or nullptr if this is a top-level group.
void addChild(std::unique_ptr< ParameterOrGroup > firstChild, Args &&... remainingChildren)
Adds multiple parameters or sub-groups to this group.
Array< const AudioProcessorParameterGroup * > getSubgroups(bool recursive) const
Returns all subgroups of this group.
AudioProcessorParameterGroup & operator=(AudioProcessorParameterGroup &&)
Once a group has been added to an AudioProcessor don't try to mutate it by moving or swapping it - th...
String getID() const
Returns the group's ID.
AudioProcessorParameterGroup()
Creates an empty AudioProcessorParameterGroup with no name or ID.
An abstract base class for parameter objects that can be added to an AudioProcessor.
The JUCE String class!
Definition juce_String.h:53
#define JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(className)
This is a shorthand way of writing both a JUCE_DECLARE_NON_COPYABLE and JUCE_LEAK_DETECTOR macro for ...
JUCE Namespace.
Type unalignedPointerCast(void *ptr) noexcept
Casts a pointer to another type via void*, which suppresses the cast-align warning which sometimes ar...
Definition juce_Memory.h:88
T swap(T... args)