JUCE  v6.1.6 (6.0.8-1114)
JUCE API
Looking for a senior C++ dev?
I'm looking for work. Hire me!
juce::OSCAddressPattern Class Reference

An OSC address pattern. More...

#include <juce_OSCAddress.h>

Collaboration diagram for juce::OSCAddressPattern:

Public Member Functions

 OSCAddressPattern (const char *address)
 Constructs a new OSCAddressPattern from a C string. More...
 
 OSCAddressPattern (const String &address)
 Constructs a new OSCAddressPattern from a String. More...
 
bool containsWildcards () const noexcept
 Checks whether the OSCAddressPattern contains any of the allowed OSC address pattern wildcards: ?, *, [], {}. More...
 
bool matches (const OSCAddress &address) const noexcept
 Checks if the OSCAddressPattern matches an OSC address with the wildcard rules defined by the OpenSoundControl 1.0 specification. More...
 
bool operator!= (const OSCAddressPattern &other) const noexcept
 Compares two OSCAddressPattern objects. More...
 
bool operator== (const OSCAddressPattern &other) const noexcept
 Compares two OSCAddressPattern objects. More...
 
String toString () const noexcept
 Converts the OSCAddressPattern to a String. More...
 

Private Attributes

String asString
 
StringArray oscSymbols
 
bool wasInitialisedWithWildcards
 

Detailed Description

An OSC address pattern.

Extends an OSC address by additionally allowing the following wildcards: ?, *, [], {}

OSC messages always have an OSC address pattern to specify the destination(s) of the message.

See also
OSCMessage, OSCAddress, OSCMessageListener

@tags{OSC}

Constructor & Destructor Documentation

◆ OSCAddressPattern() [1/2]

juce::OSCAddressPattern::OSCAddressPattern ( const String address)

Constructs a new OSCAddressPattern from a String.

Exceptions
OSCFormatErrorif the string is not a valid OSC address pattern.

◆ OSCAddressPattern() [2/2]

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

Constructs a new OSCAddressPattern from a C string.

Exceptions
OSCFormatErrorof the string is not a valid OSC address pattern.

Member Function Documentation

◆ containsWildcards()

bool juce::OSCAddressPattern::containsWildcards ( ) const
inlinenoexcept

Checks whether the OSCAddressPattern contains any of the allowed OSC address pattern wildcards: ?, *, [], {}.

Returns
true if the OSCAddressPattern contains OSC wildcards, false otherwise.

◆ matches()

bool juce::OSCAddressPattern::matches ( const OSCAddress address) const
noexcept

Checks if the OSCAddressPattern matches an OSC address with the wildcard rules defined by the OpenSoundControl 1.0 specification.

Returns
true if the OSCAddressPattern matches the given OSC address, false otherwise.

◆ operator!=()

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

Compares two OSCAddressPattern objects.

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

◆ operator==()

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

Compares two OSCAddressPattern objects.

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

◆ toString()

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

Converts the OSCAddressPattern to a String.

Note: Trailing slashes are always removed automatically.

Returns
a String object that represents the OSC address pattern.

Member Data Documentation

◆ asString

String juce::OSCAddressPattern::asString
private

◆ oscSymbols

StringArray juce::OSCAddressPattern::oscSymbols
private

◆ wasInitialisedWithWildcards

bool juce::OSCAddressPattern::wasInitialisedWithWildcards
private

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