cello
JUCE ValueTrees for Humans
Loading...
Searching...
No Matches
cello::UpdateQueue Class Referenceabstract
Inheritance diagram for cello::UpdateQueue:
cello::IpcClient cello::Sync

Public Member Functions

 UpdateQueue (Object &consumer, juce::Thread *thread)
 
 UpdateQueue (const UpdateQueue &)=delete
 
UpdateQueueoperator= (const UpdateQueue &)=delete
 
 UpdateQueue (UpdateQueue &&)=delete
 
UpdateQueueoperator= (UpdateQueue &&)=delete
 
int getPendingUpdateCount () const
 
void performAllUpdates ()
 Execute each of the updates that are ready.
 
void performNextUpdate ()
 Pop the next event from the queue and apply the change to the destination value tree.
 
bool isDestinationThread (juce::Thread *thread) const
 Check if the given thread is the destination thread for this update queue.
 

Protected Member Functions

void pushUpdate (juce::MemoryBlock &&update)
 
virtual void startUpdate (void *data, size_t size)=0
 Called when a new update is pushed onto the queue. We use this to prevent feedback loops.
 
virtual void endUpdate ()=0
 Called when the update is complete. clear the update data.
 

Member Function Documentation

◆ getPendingUpdateCount()

int cello::UpdateQueue::getPendingUpdateCount ( ) const
Returns
int = number of updates that are ready to apply to the consumer side.

◆ isDestinationThread()

bool cello::UpdateQueue::isDestinationThread ( juce::Thread * thread) const
inline

Check if the given thread is the destination thread for this update queue.

Parameters
threadpointer to the thread to check
Returns
true if the thread is the destination thread, false otherwise

◆ startUpdate()

virtual void cello::UpdateQueue::startUpdate ( void * data,
size_t size )
protectedpure virtual

Called when a new update is pushed onto the queue. We use this to prevent feedback loops.

Parameters
datapointer to the update data
sizesize of the update data

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