tracktion-engine 3.0-10-g034fdde4aa5
Tracktion Engine — High level data model for audio applications

« « « Anklang Documentation
Loading...
Searching...
No Matches
Public Member Functions | List of all members
tracktion::engine::SortedValueTreeObjectList< ObjectType > Struct Template Referenceabstract
Inheritance diagram for tracktion::engine::SortedValueTreeObjectList< ObjectType >:
tracktion::engine::ValueTreeObjectList< ObjectType, CriticalSectionType > juce::ValueTree::Listener

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

- Protected Types inherited from tracktion::engine::ValueTreeObjectList< ObjectType, CriticalSectionType >
using ScopedLockType = typename CriticalSectionType::ScopedLockType
 
- Protected Member Functions inherited from tracktion::engine::ValueTreeObjectList< ObjectType, CriticalSectionType >
void deleteAllObjects ()
 
bool isChildTree (juce::ValueTree &v) const
 
int indexOf (const juce::ValueTree &v) const noexcept
 
void sortArray ()
 
 ValueTreeObjectList (const juce::ValueTree &parentTree)
 
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
 
- Protected Attributes inherited from tracktion::engine::ValueTreeObjectList< ObjectType, CriticalSectionType >
juce::ValueTree parent
 
juce::Array< ObjectType * > objects
 
CriticalSectionType arrayLock
 

Detailed Description

template<typename ObjectType>
struct tracktion::engine::SortedValueTreeObjectList< ObjectType >

Definition at line 254 of file tracktion_ValueTreeUtilities.h.

Constructor & Destructor Documentation

◆ SortedValueTreeObjectList()

template<typename ObjectType >
tracktion::engine::SortedValueTreeObjectList< ObjectType >::SortedValueTreeObjectList ( const juce::ValueTree v)

Definition at line 256 of file tracktion_ValueTreeUtilities.h.

Member Function Documentation

◆ getSortedObjects()

template<typename ObjectType >
const juce::Array< ObjectType * > & tracktion::engine::SortedValueTreeObjectList< ObjectType >::getSortedObjects ( ) const

Returns the object for a given state.

Definition at line 277 of file tracktion_ValueTreeUtilities.h.

◆ isSortableProperty()

template<typename ObjectType >
virtual bool tracktion::engine::SortedValueTreeObjectList< ObjectType >::isSortableProperty ( juce::ValueTree ,
const juce::Identifier  
)
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.

◆ newObjectAdded()

template<typename ObjectType >
void tracktion::engine::SortedValueTreeObjectList< ObjectType >::newObjectAdded ( ObjectType *  o)
overridevirtual

◆ objectOrderChanged()

template<typename ObjectType >
void tracktion::engine::SortedValueTreeObjectList< ObjectType >::objectOrderChanged ( )
overridevirtual

◆ objectsAreSorted()

template<typename ObjectType >
virtual bool tracktion::engine::SortedValueTreeObjectList< ObjectType >::objectsAreSorted ( const ObjectType &  first,
const ObjectType &  second 
)
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.

◆ valueTreePropertyChanged()

template<typename ObjectType >
void tracktion::engine::SortedValueTreeObjectList< ObjectType >::valueTreePropertyChanged ( juce::ValueTree v,
const juce::Identifier id 
)
overridevirtual

Reimplemented from juce::ValueTree::Listener.

Definition at line 296 of file tracktion_ValueTreeUtilities.h.


The documentation for this struct was generated from the following file: