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_OSCMessage.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//==============================================================================
40class JUCE_API OSCMessage
41{
42public:
43
44 //==============================================================================
54 OSCMessage (const OSCAddressPattern& ap) noexcept;
55
56
69 template <typename Arg1, typename... Args>
70 OSCMessage (const OSCAddressPattern& ap, Arg1&& arg1, Args&&... args);
71
80 void setAddressPattern (const OSCAddressPattern& ap) noexcept;
81
83 OSCAddressPattern getAddressPattern() const noexcept;
84
86 int size() const noexcept;
87
89 bool isEmpty() const noexcept;
90
95 OSCArgument& operator[] (int i) noexcept;
96 const OSCArgument& operator[] (int i) const noexcept;
97
101 OSCArgument* begin() noexcept;
102
106 const OSCArgument* begin() const noexcept;
107
111 OSCArgument* end() noexcept;
112
116 const OSCArgument* end() const noexcept;
117
119 void clear();
120
121 //==============================================================================
125 void addInt32 (int32 value);
126
130 void addFloat32 (float value);
131
135 void addString (const String& value);
136
142 void addBlob (MemoryBlock blob);
143
147 void addColour (OSCColour colour);
148
155 void addArgument (OSCArgument argument);
156
157private:
158
159 //==============================================================================
160 template <typename Arg1, typename... Args>
161 void addArguments (Arg1&& arg1, Args&&... args)
162 {
163 addArgument (arg1);
164 addArguments (std::forward<Args> (args)...);
165 }
166
167 void addArguments() {}
168
169 //==============================================================================
170 OSCAddressPattern addressPattern;
171 Array<OSCArgument> arguments;
172};
173
174
175//==============================================================================
176template <typename Arg1, typename... Args>
178 : addressPattern (ap)
179{
180 addArguments (std::forward<Arg1> (arg1), std::forward<Args> (args)...);
181}
182
183} // namespace juce
Holds a resizable array of primitive or copy-by-value objects.
Definition juce_Array.h:56
A class to hold a resizable block of raw data.
An OSC address pattern.
An OSC argument.
An OSC Message.
OSCMessage(const OSCAddressPattern &ap) noexcept
Constructs an OSCMessage object with the given address pattern and no arguments.
The JUCE String class!
Definition juce_String.h:53
JUCE Namespace.
signed int int32
A platform-independent 32-bit signed integer type.
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
Holds a 32-bit RGBA colour for passing to and from an OSCArgument.