openshot-audio  0.1.5
Public Member Functions | Protected Attributes | Friends | List of all members
Value::ValueSource Class Referenceabstract

#include <juce_Value.h>

Inheritance diagram for Value::ValueSource:
ReferenceCountedObject AsyncUpdater ChoicePropertyComponent::RemapperValueSource SimpleValueSource ValueTreePropertyValueSource

Public Member Functions

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

Protected Attributes

SortedSet< Value * > valuesWithListeners
 

Friends

class Value
 

Additional Inherited Members

- Protected Member Functions inherited from ReferenceCountedObject
 ReferenceCountedObject ()
 
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()

Value::ValueSource::ValueSource ( )

◆ ~ValueSource()

Value::ValueSource::~ValueSource ( )
virtual

Member Function Documentation

◆ getValue()

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

Returns the current value of this object.

Implemented in ValueTreePropertyValueSource, SimpleValueSource, and ChoicePropertyComponent::RemapperValueSource.

◆ sendChangeMessage()

void 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()

virtual void 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 ValueTreePropertyValueSource, SimpleValueSource, and ChoicePropertyComponent::RemapperValueSource.

Friends And Related Function Documentation

◆ Value

friend class Value
friend

Member Data Documentation

◆ valuesWithListeners

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

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