An OSC Message.
More...
#include <juce_OSCMessage.h>
An OSC Message.
An OSCMessage consists of an OSCAddressPattern and zero or more OSCArguments.
OSC messages are the elementary objects that are used to exchange any data via OSC. An OSCSender can send OSCMessage objects to an OSCReceiver.
@tags{OSC}
◆ OSCMessage() [1/2]
Constructs an OSCMessage object with the given address pattern and no arguments.
- Parameters
-
ap | the address pattern of the message. This must be a valid OSC address (starting with a forward slash) and may contain OSC wildcard expressions. You can pass in a string literal or a juce String (they will be converted to an OSCAddressPattern automatically). |
◆ OSCMessage() [2/2]
template<typename Arg1 , typename... Args>
juce::OSCMessage::OSCMessage |
( |
const OSCAddressPattern & |
ap, |
|
|
Arg1 && |
arg1, |
|
|
Args &&... |
args |
|
) |
| |
Constructs an OSCMessage object with the given address pattern and list of arguments.
- Parameters
-
ap | the address pattern of the message. This must be a valid OSC address (starting with a forward slash) and may contain OSC wildcard expressions. You can pass in a string literal or a juce String (they will be converted to an OSCAddressPattern automatically). |
arg1 | the first argument of the message. |
args | an optional list of further arguments to add to the message. |
References addArguments(), and juce::gl::arg1.
◆ addArgument()
void juce::OSCMessage::addArgument |
( |
OSCArgument |
argument | ) |
|
Adds the OSCArgument argument to the OSCMessage object.
Note: This method will result in a copy of the OSCArgument object if it is passed as an lvalue. If the OSCArgument is of type blob, this will also copy the underlying binary data. In general, you should use addInt32, addFloat32, etc. instead.
◆ addArguments() [1/2]
void juce::OSCMessage::addArguments |
( |
| ) |
|
|
inlineprivate |
◆ addArguments() [2/2]
template<typename Arg1 , typename... Args>
void juce::OSCMessage::addArguments |
( |
Arg1 && |
arg1, |
|
|
Args &&... |
args |
|
) |
| |
|
inlineprivate |
◆ addBlob()
Creates a new OSCArgument of type blob with binary data content copied from the given MemoryBlock.
Note: If the argument passed is an lvalue, this may copy the binary data.
◆ addColour()
void juce::OSCMessage::addColour |
( |
OSCColour |
colour | ) |
|
◆ addFloat32()
void juce::OSCMessage::addFloat32 |
( |
float |
value | ) |
|
◆ addInt32()
void juce::OSCMessage::addInt32 |
( |
int32 |
value | ) |
|
◆ addString()
void juce::OSCMessage::addString |
( |
const String & |
value | ) |
|
◆ begin() [1/2]
Returns a pointer to the first OSCArgument in the OSCMessage object.
This method is provided for compatibility with standard C++ iteration mechanisms.
◆ begin() [2/2]
Returns a pointer to the first OSCArgument in the OSCMessage object.
This method is provided for compatibility with standard C++ iteration mechanisms.
◆ clear()
void juce::OSCMessage::clear |
( |
| ) |
|
◆ end() [1/2]
Returns a pointer to the last OSCArgument in the OSCMessage object.
This method is provided for compatibility with standard C++ iteration mechanisms.
◆ end() [2/2]
Returns a pointer to the last OSCArgument in the OSCMessage object.
This method is provided for compatibility with standard C++ iteration mechanisms.
◆ getAddressPattern()
◆ isEmpty()
bool juce::OSCMessage::isEmpty |
( |
| ) |
const |
|
noexcept |
◆ operator[]() [1/2]
◆ operator[]() [2/2]
Returns a reference to the OSCArgument at index i in the OSCMessage object.
This method does not check the range and results in undefined behaviour in case i < 0 or i >= size().
◆ setAddressPattern()
Sets the address pattern of the OSCMessage.
- Parameters
-
ap | the address pattern of the message. This must be a valid OSC address (starting with a forward slash) and may contain OSC wildcard expressions. You can pass in a string literal or a juce String (they will be converted to an OSCAddressPattern automatically). |
◆ size()
int juce::OSCMessage::size |
( |
| ) |
const |
|
noexcept |
◆ addressPattern
◆ arguments
The documentation for this class was generated from the following file: