OpenShot Library | OpenShotAudio 0.2.2
juce::Value::ValueSource Class Referenceabstract

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

#include <juce_Value.h>

+ Inheritance diagram for juce::Value::ValueSource:

Public Member Functions

virtual var getValue () const =0
 Returns the current value of this object. More...
 
virtual void setValue (const var &newValue)=0
 Changes the current value. More...
 
void sendChangeMessage (bool dispatchSynchronously)
 Delivers a change message to all the listeners that are registered with this value. More...
 
- Public Member Functions inherited from juce::ReferenceCountedObject
void incReferenceCount () noexcept
 Increments the object's reference count. More...
 
void decReferenceCount () noexcept
 Decreases the object's reference count. More...
 
bool decReferenceCountWithoutDeleting () noexcept
 Decreases the object's reference count. More...
 
int getReferenceCount () const noexcept
 Returns the object's current reference count. More...
 

Protected Attributes

SortedSet< Value * > valuesWithListeners
 

Friends

class Value
 

Additional Inherited Members

- Protected Member Functions inherited from juce::ReferenceCountedObject
 ReferenceCountedObject ()=default
 Creates the reference-counted object (with an initial ref count of zero).
 
 ReferenceCountedObject (const ReferenceCountedObject &) noexcept
 Copying from another object does not affect this one's reference-count. More...
 
 ReferenceCountedObject (ReferenceCountedObject &&) noexcept
 Copying from another object does not affect this one's reference-count. More...
 
ReferenceCountedObjectoperator= (const ReferenceCountedObject &) noexcept
 Copying from another object does not affect this one's reference-count. More...
 
ReferenceCountedObjectoperator= (ReferenceCountedObject &&) noexcept
 Copying from another object does not affect this one's reference-count. More...
 
virtual ~ReferenceCountedObject ()
 Destructor. More...
 
void resetReferenceCount () noexcept
 Resets the reference count to zero without deleting the object. More...
 

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.

Definition at line 182 of file juce_Value.h.

Constructor & Destructor Documentation

◆ ValueSource()

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

Definition at line 30 of file juce_Value.cpp.

◆ ~ValueSource()

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

Definition at line 34 of file juce_Value.cpp.

Member Function Documentation

◆ getValue()

virtual var juce::Value::ValueSource::getValue ( ) const
pure virtual

Returns the current value of this object.

Implemented in juce::SimpleValueSource, and juce::ValueTreePropertyValueSource.

◆ setValue()

virtual void juce::Value::ValueSource::setValue ( const var newValue)
pure virtual

Changes the current value.

This must also trigger a change message if the value actually changes.

Implemented in juce::SimpleValueSource, and juce::ValueTreePropertyValueSource.

◆ 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.

Definition at line 44 of file juce_Value.cpp.

Friends And Related Function Documentation

◆ Value

friend class Value
friend

Definition at line 207 of file juce_Value.h.

Member Data Documentation

◆ valuesWithListeners

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

Definition at line 208 of file juce_Value.h.


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