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_OSCBundle.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//==============================================================================
43class JUCE_API OSCBundle
44{
45public:
46 //==============================================================================
48 OSCBundle();
49
51 OSCBundle (OSCTimeTag timeTag);
52
53 //==============================================================================
55 void setTimeTag (OSCTimeTag newTimeTag) noexcept { timeTag = newTimeTag; }
56
58 OSCTimeTag getTimeTag() const noexcept { return timeTag; }
59
60 //==============================================================================
66 class JUCE_API Element
67 {
68 public:
69 //==============================================================================
71 Element (OSCMessage message);
72
74 Element (OSCBundle bundle);
75
77 Element (const Element& other);
78
80 ~Element();
81
83 bool isMessage() const noexcept;
84
86 bool isBundle() const noexcept;
87
91 const OSCMessage& getMessage() const;
92
96 const OSCBundle& getBundle() const;
97
98 private:
99 //==============================================================================
102 };
103
104 //==============================================================================
106 int size() const noexcept { return elements.size(); }
107
109 bool isEmpty() const noexcept { return elements.isEmpty(); }
110
115 OSCBundle::Element& operator[] (const int i) noexcept
116 {
117 return elements.getReference (i);
118 }
119
120 const OSCBundle::Element& operator[] (const int i) const noexcept
121 {
122 return elements.getReference (i);
123 }
124
126 void addElement (const OSCBundle::Element& element) { elements.add (element); }
127
129 OSCBundle::Element* begin() noexcept { return elements.begin(); }
130
132 const OSCBundle::Element* begin() const noexcept { return elements.begin(); }
133
135 OSCBundle::Element* end() noexcept { return elements.end(); }
136
138 const OSCBundle::Element* end() const noexcept { return elements.end(); }
139
140private:
141 //==============================================================================
143 OSCTimeTag timeTag;
144};
145
146} // namespace juce
Holds a resizable array of primitive or copy-by-value objects.
Definition juce_Array.h:56
An OSC bundle element.
An OSC bundle.
OSCTimeTag getTimeTag() const noexcept
Returns the OSCBundle's OSC time tag.
OSCBundle::Element * end() noexcept
Returns a pointer past the last element of the OSCBundle.
OSCBundle::Element * begin() noexcept
Returns a pointer to the first element of the OSCBundle.
const OSCBundle::Element * begin() const noexcept
Returns a pointer to the first element of the OSCBundle.
bool isEmpty() const noexcept
Returns true if the bundle contains no elements; false otherwise.
void setTimeTag(OSCTimeTag newTimeTag) noexcept
Sets the OSCBundle's OSC time tag.
void addElement(const OSCBundle::Element &element)
Adds an OSCBundleElement to the OSCBundle's content.
int size() const noexcept
Returns the number of elements contained in the bundle.
const OSCBundle::Element * end() const noexcept
Returns a pointer past the last element of the OSCBundle.
An OSC Message.
An OSC time tag.
JUCE Namespace.