LMMS
Loading...
Searching...
No Matches
juce::Value::ValueSource Class Referenceabstract

#include <juce_Value.h>

Inheritance diagram for juce::Value::ValueSource:
juce::ReferenceCountedObject juce::AsyncUpdater juce::ChoiceRemapperValueSource juce::ChoiceRemapperValueSourceWithDefault juce::MultiChoicePropertyComponent::MultiChoiceRemapperSource juce::MultiChoicePropertyComponent::MultiChoiceRemapperSourceWithDefault juce::SimpleValueSource juce::TextRemapperValueSourceWithDefault juce::ValueTreePropertyValueSource juce::ValueTreePropertyWithDefault::SynchronousValueSource

Public Member Functions

 ValueSource ()
 ~ValueSource () override
virtual var getValue () const =0
virtual void setValue (const var &newValue)=0
void sendChangeMessage (bool dispatchSynchronously)
Public Member Functions inherited from juce::ReferenceCountedObject
void incReferenceCount () noexcept
void decReferenceCount () noexcept
bool decReferenceCountWithoutDeleting () noexcept
int getReferenceCount () const noexcept

Protected Attributes

SortedSet< Value * > valuesWithListeners

Private Member Functions

void handleAsyncUpdate () override
Private Member Functions inherited from juce::AsyncUpdater
 AsyncUpdater ()
virtual ~AsyncUpdater ()
void triggerAsyncUpdate ()
void cancelPendingUpdate () noexcept
void handleUpdateNowIfNeeded ()
bool isUpdatePending () const noexcept

Friends

class Value

Additional Inherited Members

Protected Member Functions inherited from juce::ReferenceCountedObject
 ReferenceCountedObject ()=default
 ReferenceCountedObject (const ReferenceCountedObject &) noexcept
 ReferenceCountedObject (ReferenceCountedObject &&) noexcept
ReferenceCountedObjectoperator= (const ReferenceCountedObject &) noexcept
ReferenceCountedObjectoperator= (ReferenceCountedObject &&) noexcept
virtual ~ReferenceCountedObject ()
void resetReferenceCount () noexcept

Detailed Description

Used internally by the Value class as the base class for its shared value objects.

The Value class is essentially a reference-counted pointer to a shared instance of a ValueSource object. If you're feeling adventurous, you can create your own custom ValueSource classes to allow Value objects to represent your own custom data items.

Constructor & Destructor Documentation

◆ ValueSource()

juce::Value::ValueSource::ValueSource ( )

◆ ~ValueSource()

juce::Value::ValueSource::~ValueSource ( )
override

Member Function Documentation

◆ getValue()

◆ handleAsyncUpdate()

void juce::Value::ValueSource::handleAsyncUpdate ( )
overrideprivatevirtual

Called back to do whatever your class needs to do.

This method is called by the message thread at the next convenient time after the triggerAsyncUpdate() method has been called.

Implements juce::AsyncUpdater.

◆ sendChangeMessage()

void juce::Value::ValueSource::sendChangeMessage ( bool dispatchSynchronously)

Delivers a change message to all the listeners that are registered with this value.

If dispatchSynchronously is true, the method will call all the listeners before returning; otherwise it'll dispatch a message and make the call later.

◆ setValue()

◆ Value

friend class Value
friend

Member Data Documentation

◆ valuesWithListeners

SortedSet<Value*> juce::Value::ValueSource::valuesWithListeners
protected

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