cello
JUCE ValueTrees for Humans
Loading...
Searching...
No Matches
cello::SyncController Class Reference

Class to manage bi-directional sync between two Objects in different threads, preventing feedback loops. Each SyncController contains a pair of Sync objects, one for each direction of the sync. More...

#include <cello_sync.h>

Public Member Functions

 SyncController (Object &obj1, juce::Thread *threadForObj1, Object &obj2, juce::Thread *threadForObj2)
 Construct a new SyncController object.
 
 SyncController (const SyncController &)=delete
 
SyncControlleroperator= (const SyncController &)=delete
 
 SyncController (SyncController &&)=delete
 
SyncControlleroperator= (SyncController &&)=delete
 
void performNextUpdate (juce::Thread *thread)
 Perform the next update for the given thread.
 
void performAllUpdates (juce::Thread *thread)
 Perform all updates for the given thread.
 

Friends

class Sync
 

Detailed Description

Class to manage bi-directional sync between two Objects in different threads, preventing feedback loops. Each SyncController contains a pair of Sync objects, one for each direction of the sync.

Constructor & Destructor Documentation

◆ SyncController()

cello::SyncController::SyncController ( Object & obj1,
juce::Thread * threadForObj1,
Object & obj2,
juce::Thread * threadForObj2 )

Construct a new SyncController object.

Parameters
obj1pointer to the first Object
threadForObj1pointer to the thread for the first Object
obj2pointer to the second Object
threadForObj2pointer to the thread for the second Object

Member Function Documentation

◆ performNextUpdate()

void cello::SyncController::performNextUpdate ( juce::Thread * thread)

Perform the next update for the given thread.

Parameters
threadpointer to the thread to perform the update

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