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
Public Member Functions | List of all members
juce::OSCMessage Class Reference

An OSC Message. More...

#include "juce_OSCMessage.h"

Public Member Functions

 OSCMessage (const OSCAddressPattern &ap) noexcept
 Constructs an OSCMessage object with the given address pattern and no arguments.
 
template<typename Arg1 , typename... Args>
 OSCMessage (const OSCAddressPattern &ap, Arg1 &&arg1, Args &&... args)
 Constructs an OSCMessage object with the given address pattern and list of arguments.
 
void setAddressPattern (const OSCAddressPattern &ap) noexcept
 Sets the address pattern of the OSCMessage.
 
OSCAddressPattern getAddressPattern () const noexcept
 Returns the address pattern of the OSCMessage.
 
int size () const noexcept
 Returns the number of OSCArgument objects that belong to this OSCMessage.
 
bool isEmpty () const noexcept
 Returns true if the OSCMessage contains no OSCArgument objects; false otherwise.
 
OSCArgumentoperator[] (int i) noexcept
 Returns a reference to the OSCArgument at index i in the OSCMessage object.
 
const OSCArgumentoperator[] (int i) const noexcept
 
OSCArgumentbegin () noexcept
 Returns a pointer to the first OSCArgument in the OSCMessage object.
 
const OSCArgumentbegin () const noexcept
 Returns a pointer to the first OSCArgument in the OSCMessage object.
 
OSCArgumentend () noexcept
 Returns a pointer to the last OSCArgument in the OSCMessage object.
 
const OSCArgumentend () const noexcept
 Returns a pointer to the last OSCArgument in the OSCMessage object.
 
void clear ()
 Removes all arguments from the OSCMessage.
 
void addInt32 (int32 value)
 Creates a new OSCArgument of type int32 with the given value, and adds it to the OSCMessage object.
 
void addFloat32 (float value)
 Creates a new OSCArgument of type float32 with the given value, and adds it to the OSCMessage object.
 
void addString (const String &value)
 Creates a new OSCArgument of type string with the given value, and adds it to the OSCMessage object.
 
void addBlob (MemoryBlock blob)
 Creates a new OSCArgument of type blob with binary data content copied from the given MemoryBlock.
 
void addColour (OSCColour colour)
 Creates a new OSCArgument of type colour with the given value, and adds it to the OSCMessage object.
 
void addArgument (OSCArgument argument)
 Adds the OSCArgument argument to the OSCMessage object.
 

Detailed Description

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}

Definition at line 40 of file juce_OSCMessage.h.

Constructor & Destructor Documentation

◆ OSCMessage() [1/2]

juce::OSCMessage::OSCMessage ( const OSCAddressPattern ap)
noexcept

Constructs an OSCMessage object with the given address pattern and no arguments.

Parameters
apthe 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).

Definition at line 29 of file juce_OSCMessage.cpp.

◆ 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
apthe 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).
arg1the first argument of the message.
argsan optional list of further arguments to add to the message.

Definition at line 177 of file juce_OSCMessage.h.

Member Function Documentation

◆ 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.

Definition at line 96 of file juce_OSCMessage.cpp.

◆ addBlob()

void juce::OSCMessage::addBlob ( MemoryBlock  blob)

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.

Definition at line 94 of file juce_OSCMessage.cpp.

◆ addColour()

void juce::OSCMessage::addColour ( OSCColour  colour)

Creates a new OSCArgument of type colour with the given value, and adds it to the OSCMessage object.

Definition at line 95 of file juce_OSCMessage.cpp.

◆ addFloat32()

void juce::OSCMessage::addFloat32 ( float  value)

Creates a new OSCArgument of type float32 with the given value, and adds it to the OSCMessage object.

Definition at line 92 of file juce_OSCMessage.cpp.

◆ addInt32()

void juce::OSCMessage::addInt32 ( int32  value)

Creates a new OSCArgument of type int32 with the given value, and adds it to the OSCMessage object.

Definition at line 91 of file juce_OSCMessage.cpp.

◆ addString()

void juce::OSCMessage::addString ( const String value)

Creates a new OSCArgument of type string with the given value, and adds it to the OSCMessage object.

Definition at line 93 of file juce_OSCMessage.cpp.

◆ begin() [1/2]

const OSCArgument * juce::OSCMessage::begin ( ) const
noexcept

Returns a pointer to the first OSCArgument in the OSCMessage object.

This method is provided for compatibility with standard C++ iteration mechanisms.

Definition at line 70 of file juce_OSCMessage.cpp.

◆ begin() [2/2]

OSCArgument * juce::OSCMessage::begin ( )
noexcept

Returns a pointer to the first OSCArgument in the OSCMessage object.

This method is provided for compatibility with standard C++ iteration mechanisms.

Definition at line 65 of file juce_OSCMessage.cpp.

◆ clear()

void juce::OSCMessage::clear ( )

Removes all arguments from the OSCMessage.

Definition at line 85 of file juce_OSCMessage.cpp.

◆ end() [1/2]

const OSCArgument * juce::OSCMessage::end ( ) const
noexcept

Returns a pointer to the last OSCArgument in the OSCMessage object.

This method is provided for compatibility with standard C++ iteration mechanisms.

Definition at line 80 of file juce_OSCMessage.cpp.

◆ end() [2/2]

OSCArgument * juce::OSCMessage::end ( )
noexcept

Returns a pointer to the last OSCArgument in the OSCMessage object.

This method is provided for compatibility with standard C++ iteration mechanisms.

Definition at line 75 of file juce_OSCMessage.cpp.

◆ getAddressPattern()

OSCAddressPattern juce::OSCMessage::getAddressPattern ( ) const
noexcept

Returns the address pattern of the OSCMessage.

Definition at line 39 of file juce_OSCMessage.cpp.

◆ isEmpty()

bool juce::OSCMessage::isEmpty ( ) const
noexcept

Returns true if the OSCMessage contains no OSCArgument objects; false otherwise.

Definition at line 50 of file juce_OSCMessage.cpp.

◆ operator[]() [1/2]

const OSCArgument & juce::OSCMessage::operator[] ( int  i) const
noexcept

Definition at line 60 of file juce_OSCMessage.cpp.

◆ operator[]() [2/2]

OSCArgument & juce::OSCMessage::operator[] ( int  i)
noexcept

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().

Definition at line 55 of file juce_OSCMessage.cpp.

◆ setAddressPattern()

void juce::OSCMessage::setAddressPattern ( const OSCAddressPattern ap)
noexcept

Sets the address pattern of the OSCMessage.

Parameters
apthe 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).

Definition at line 34 of file juce_OSCMessage.cpp.

◆ size()

int juce::OSCMessage::size ( ) const
noexcept

Returns the number of OSCArgument objects that belong to this OSCMessage.

Definition at line 45 of file juce_OSCMessage.cpp.


The documentation for this class was generated from the following files: