JUCE  v5.4.1-191-g0ab5e696f
JUCE API
Looking for a senior C++ dev?
I'm looking for work. Hire me!
juce::OSCAddress Class Reference

An OSC address. More...

#include <juce_OSCAddress.h>

Collaboration diagram for juce::OSCAddress:

Public Member Functions

 OSCAddress (const String &address)
 Constructs a new OSCAddress from a String. More...
 
 OSCAddress (const char *address)
 Constructs a new OSCAddress from a C string. More...
 
bool operator!= (const OSCAddress &other) const noexcept
 Compares two OSCAddress objects. More...
 
bool operator== (const OSCAddress &other) const noexcept
 Compares two OSCAddress objects. More...
 
String toString () const noexcept
 Converts the OSCAddress to a String. More...
 

Private Attributes

String asString
 
StringArray oscSymbols
 

Friends

class OSCAddressPattern
 

Detailed Description

An OSC address.

This address always starts with a forward slash and has a format similar to an URL, with several address parts separated by slashes.

Only a subset of ASCII characters are allowed in OSC addresses; see OpenSoundControl 1.0 specification for details.

OSC addresses can be used to register OSCMessageListener objects to an OSCReceiver if you wish them to only listen to certain messages with matching OSC address patterns.

See also
OSCMessageListener, OSCAddressPattern, OSCMessage

{OSC}

Constructor & Destructor Documentation

◆ OSCAddress() [1/2]

juce::OSCAddress::OSCAddress ( const String address)

Constructs a new OSCAddress from a String.

Exceptions
OSCFormatErrorif the string is not a valid OSC address.

◆ OSCAddress() [2/2]

juce::OSCAddress::OSCAddress ( const char *  address)

Constructs a new OSCAddress from a C string.

Exceptions
OSCFormatErrorof the string is not a valid OSC address.

Member Function Documentation

◆ operator!=()

bool juce::OSCAddress::operator!= ( const OSCAddress other) const
noexcept

Compares two OSCAddress objects.

Returns
false if they contain the same address, true otherwise.

◆ operator==()

bool juce::OSCAddress::operator== ( const OSCAddress other) const
noexcept

Compares two OSCAddress objects.

Returns
true if they contain the same address, false otherwise.

◆ toString()

String juce::OSCAddress::toString ( ) const
noexcept

Converts the OSCAddress to a String.

Note: Trailing slashes are always removed automatically.

Returns
a String object that represents the OSC address.

Friends And Related Function Documentation

◆ OSCAddressPattern

friend class OSCAddressPattern
friend

Member Data Documentation

◆ asString

String juce::OSCAddress::asString
private

◆ oscSymbols

StringArray juce::OSCAddress::oscSymbols
private

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