JUCE v8.0.9
JUCE API
 
Loading...
Searching...
No Matches
juce::ARAListenableModelClass< ListenerType > Class Template Reference

Base class used by the JUCE ARA model objects to provide listenable interfaces. More...

#include <juce_ARAModelObjects.h>

Inheritance diagram for juce::ARAListenableModelClass< ListenerType >:
Collaboration diagram for juce::ARAListenableModelClass< ListenerType >:

Public Member Functions

 ARAListenableModelClass ()=default
 Constructor.
 
virtual ~ARAListenableModelClass ()=default
 Destructor.
 
void addListener (ListenerType *l)
 Subscribe l to notified by changes to the object.
 
template<typename Callback >
void notifyListeners (Callback &&callback)
 Call the provided callback for each of the added listeners.
 
void removeListener (ListenerType *l)
 Unsubscribe l from object notifications.
 

Private Attributes

ListenerList< ListenerType > listeners
 

Detailed Description

template<class ListenerType>
class juce::ARAListenableModelClass< ListenerType >

Base class used by the JUCE ARA model objects to provide listenable interfaces.

@tags{ARA}

Constructor & Destructor Documentation

◆ ARAListenableModelClass()

template<class ListenerType >
juce::ARAListenableModelClass< ListenerType >::ARAListenableModelClass ( )
default

Constructor.

◆ ~ARAListenableModelClass()

template<class ListenerType >
virtual juce::ARAListenableModelClass< ListenerType >::~ARAListenableModelClass ( )
virtualdefault

Destructor.

Member Function Documentation

◆ addListener()

template<class ListenerType >
void juce::ARAListenableModelClass< ListenerType >::addListener ( ListenerType *  l)
inline

Subscribe l to notified by changes to the object.

Parameters
lThe listener instance.

◆ notifyListeners()

template<class ListenerType >
template<typename Callback >
void juce::ARAListenableModelClass< ListenerType >::notifyListeners ( Callback &&  callback)
inline

Call the provided callback for each of the added listeners.

◆ removeListener()

template<class ListenerType >
void juce::ARAListenableModelClass< ListenerType >::removeListener ( ListenerType *  l)
inline

Unsubscribe l from object notifications.

Parameters
lThe listener instance.

Member Data Documentation

◆ listeners

template<class ListenerType >
ListenerList<ListenerType> juce::ARAListenableModelClass< ListenerType >::listeners
private

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