TracktionEngine
|
#include <tracktion_ValueTreeUtilities.h>
Public Member Functions | |
SortedValueTreeObjectList (const juce::ValueTree &v) | |
virtual void | sortObjects (juce::Array< ObjectType * > &objectsToBeSorted) const =0 |
Must sort the given array. | |
virtual bool | isSortableProperty (juce::ValueTree &, const juce::Identifier &)=0 |
Should return true if the given Identifier is used to sort the tree. | |
virtual bool | objectsAreSorted (const ObjectType &first, const ObjectType &second)=0 |
Should return true if the objects are in a sorted order. | |
const juce::Array< ObjectType * > & | getSortedObjects () const |
Returns the object for a given state. | |
void | newObjectAdded (ObjectType *o) override |
void | objectOrderChanged () override |
void | valueTreePropertyChanged (juce::ValueTree &v, const juce::Identifier &id) override |
Additional Inherited Members | |
![]() | |
using | ScopedLockType = typename CriticalSectionType::ScopedLockType |
![]() | |
void | deleteAllObjects () |
bool | isChildTree (juce::ValueTree &v) const |
int | indexOf (const juce::ValueTree &v) const noexcept |
void | sortArray () |
ValueTreeObjectList (const juce::ValueTree &parentTree) | |
~ValueTreeObjectList () override | |
int | size () const |
bool | isEmpty () const noexcept |
ObjectType * | operator[] (int idx) const |
ObjectType * | at (int idx) |
ObjectType ** | begin () |
ObjectType *const * | begin () const |
ObjectType ** | end () |
ObjectType *const * | end () const |
void | rebuildObjects () |
void | freeObjects () |
virtual bool | isSuitableType (const juce::ValueTree &) const =0 |
virtual ObjectType * | createNewObject (const juce::ValueTree &)=0 |
virtual void | deleteObject (ObjectType *)=0 |
virtual void | objectRemoved (ObjectType *)=0 |
void | valueTreeChildAdded (juce::ValueTree &, juce::ValueTree &tree) override |
void | valueTreeChildRemoved (juce::ValueTree &exParent, juce::ValueTree &tree, int) override |
void | valueTreeChildOrderChanged (juce::ValueTree &tree, int, int) override |
void | valueTreePropertyChanged (juce::ValueTree &, const juce::Identifier &) override |
void | valueTreeParentChanged (juce::ValueTree &) override |
void | valueTreeRedirected (juce::ValueTree &) override |
int | compareElements (ObjectType *first, ObjectType *second) const |
![]() | |
juce::ValueTree | parent |
juce::Array< ObjectType * > | objects |
CriticalSectionType | arrayLock |
tracktion::engine::SortedValueTreeObjectList< ObjectType >::SortedValueTreeObjectList | ( | const juce::ValueTree & | v | ) |
|
pure virtual |
Must sort the given array.
Referenced by tracktion::engine::SortedValueTreeObjectList< ObjectType >::getSortedObjects().
|
pure virtual |
Should return true if the given Identifier is used to sort the tree.
This will be called when one of the items properties changes so this should return true if that property means the objects should now be in a different order.
Referenced by tracktion::engine::SortedValueTreeObjectList< ObjectType >::valueTreePropertyChanged().
|
pure virtual |
Should return true if the objects are in a sorted order.
This might look at a property of the objects (i.e. a start time) to determine their order.
const juce::Array< ObjectType * > & tracktion::engine::SortedValueTreeObjectList< ObjectType >::getSortedObjects | ( | ) | const |
Returns the object for a given state.
References tracktion::engine::SortedValueTreeObjectList< ObjectType >::sortObjects().
|
overridevirtual |
|
overridevirtual |
|
override |