Maintain a clone of a ValueTree on a critical thread. More...
#include <value_tree_clone.h>
Public Member Functions | |
| CriticalThreadValueTree (ValueTree source, LockFreeCallQueue &q) | |
| Configure the CriticalThreadValueTree. More... | |
| void | setSource (ValueTree source) |
| set the source tree to copy. This is set initally by the constructor, so you may not need to call this function. | |
| void | valueTreeChildAdded (ValueTree &parentTree, ValueTree &childWhichHasBeenAdded) |
| void | valueTreeChildRemoved (ValueTree &parentTree, ValueTree &childWhichHasBeenRemoved) |
| void | valueTreeChildOrderChanged (ValueTree &parentTreeWhoseChildrenHaveMoved) |
| void | valueTreeParentChanged (ValueTree &treeWhoseParentHasChanged) |
| void | syncAll () |
| Synchronise. You shouldn't have to call this. It should be called automatically from the non-critical thread when the ValueTree changes. | |
| void | valueTreePropertyChanged (ValueTree &tree, const Identifier &property) |
Public Attributes | |
| ValueTreeCopy::Ptr | readonly |
| The output - the clone of the ValueTree. More... | |
Maintain a clone of a ValueTree on a critical thread.
Maintains a clone of a value tree for a critical thread. For example for passing complex configuration from a GUI to an audio processing thread.
|
inline |
Configure the CriticalThreadValueTree.
Requires a LockFreeCallQueue to be passed which will be used for the synchronisation. You will need to regularly call synchronise on the LockFreeCallQueue from the critical thread so that the ValueTree gets updated.
| ValueTreeCopy::Ptr CriticalThreadValueTree::readonly |
The output - the clone of the ValueTree.
A read-only copy of the value tree that you can access safely from your critical thread.
1.8.7