JUCE
Public Member Functions | List of all members
OSCReceiver::ListenerWithOSCAddress< CallbackType > Class Template Referenceabstract

A class for receiving only those OSC messages from an OSCReceiver that match a given OSC address. More...

Public Member Functions

virtual ~ListenerWithOSCAddress ()=default
 Destructor. More...
 
virtual void oscMessageReceived (const OSCMessage &message)=0
 Called when the OSCReceiver receives an OSC message with an OSC address pattern that matches the OSC address with which this listener was added. More...
 

Detailed Description

template<typename CallbackType = MessageLoopCallback>
class OSCReceiver::ListenerWithOSCAddress< CallbackType >

A class for receiving only those OSC messages from an OSCReceiver that match a given OSC address.

Use this class if your app receives OSC messages with different address patterns (for example "/juce/fader1", /juce/knob2" etc.) and you want to route those to different objects. This class contains pre-build functionality for that OSC address routing, including wildcard pattern matching (e.g. "/juce/fader[0-9]").

This class implements the concept of an "OSC Method" from the OpenSoundControl 1.0 specification.

The template argument CallbackType determines how the callback will be called and has to be either MessageLoopCallback or RealtimeCallback. If not specified, MessageLoopCallback will be used by default.

Note: This type of listener will ignore OSC bundles.

See also
OSCReceiver::addListener, OSCReceiver::Listener, OSCReceiver::MessageLoopCallback, OSCReceiver::RealtimeCallback

Constructor & Destructor Documentation

◆ ~ListenerWithOSCAddress()

template<typename CallbackType = MessageLoopCallback>
virtual OSCReceiver::ListenerWithOSCAddress< CallbackType >::~ListenerWithOSCAddress ( )
virtualdefault

Destructor.

Member Function Documentation

◆ oscMessageReceived()

template<typename CallbackType = MessageLoopCallback>
virtual void OSCReceiver::ListenerWithOSCAddress< CallbackType >::oscMessageReceived ( const OSCMessage message)
pure virtual

Called when the OSCReceiver receives an OSC message with an OSC address pattern that matches the OSC address with which this listener was added.


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