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

« « « Anklang Documentation
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
tracktion::engine::SelectableList Struct Reference

A list of Selectables, similar to a juce::Array but contains a cached list of the SelectableClasses for each entry. More...

#include "tracktion_Selectable.h"

Public Types

using ScopedLockType = juce::Array< Selectable * >::ScopedLockType
 

Public Member Functions

 SelectableList (const std::initializer_list< Selectable * > &initialItems)
 
template<typename SelectableType >
 SelectableList (const juce::Array< SelectableType * > &initialItems)
 
template<typename SelectableType >
 SelectableList (const juce::ReferenceCountedArray< SelectableType > &initialItems)
 
template<typename SelectableType >
 SelectableList (const std::vector< SelectableType * > &initialItems)
 
SelectableClassgetSelectableClass (int index) const
 Returns the selectable class for a given Selectable in the list.
 
std::pair< Selectable *, SelectableClass * > getSelectableAndClass (int index) const
 Returns the selectable and it's associated class.
 
template<typename SubclassType >
juce::Array< SubclassType * > getItemsOfType () const
 
template<typename SubclassType >
SubclassType * getFirstOfType () const
 
template<typename SubclassType >
bool containsType () const
 
int size () const
 
bool isEmpty () const
 
bool isNotEmpty () const
 
Selectable ** begin ()
 
Selectable *const * begin () const
 
Selectable ** end ()
 
Selectable *const * end () const
 
Selectable ** data ()
 
Selectable *const * data () const
 
Selectableoperator[] (int index) const
 
SelectablegetUnchecked (int index) const
 
SelectablegetFirst () const
 
SelectablegetLast () const
 
template<class OtherArrayType >
void addArray (const OtherArrayType &arrayToAddFrom, int startIndex=0, int numElementsToAdd=-1)
 
template<class OtherArrayType >
void mergeArray (const OtherArrayType &arrayToMergeFrom)
 
void add (Selectable *newElement)
 
bool addIfNotAlreadyThere (Selectable *newElement)
 
void clear ()
 
void remove (int indexToRemove)
 
int removeAllInstancesOf (Selectable *s)
 
SelectableremoveAndReturn (int indexToRemove)
 
bool contains (Selectable *elementToLookFor) const
 
int indexOf (Selectable *elementToLookFor) const
 
template<class OtherArrayType >
bool operator== (const OtherArrayType &other) const
 
template<class OtherArrayType >
bool operator!= (const OtherArrayType &other) const
 
bool operator== (const SelectableList &other) const
 
bool operator!= (const SelectableList &other) const
 
const juce::DummyCriticalSectiongetLock () const noexcept
 

Detailed Description

A list of Selectables, similar to a juce::Array but contains a cached list of the SelectableClasses for each entry.

Definition at line 131 of file tracktion_Selectable.h.

Member Typedef Documentation

◆ ScopedLockType

using tracktion::engine::SelectableList::ScopedLockType = juce::Array<Selectable*>::ScopedLockType

Definition at line 248 of file tracktion_Selectable.h.

Constructor & Destructor Documentation

◆ SelectableList() [1/4]

tracktion::engine::SelectableList::SelectableList ( const std::initializer_list< Selectable * > &  initialItems)

Definition at line 135 of file tracktion_Selectable.h.

◆ SelectableList() [2/4]

template<typename SelectableType >
tracktion::engine::SelectableList::SelectableList ( const juce::Array< SelectableType * > &  initialItems)

Definition at line 141 of file tracktion_Selectable.h.

◆ SelectableList() [3/4]

template<typename SelectableType >
tracktion::engine::SelectableList::SelectableList ( const juce::ReferenceCountedArray< SelectableType > &  initialItems)

Definition at line 147 of file tracktion_Selectable.h.

◆ SelectableList() [4/4]

template<typename SelectableType >
tracktion::engine::SelectableList::SelectableList ( const std::vector< SelectableType * > &  initialItems)

Definition at line 153 of file tracktion_Selectable.h.

Member Function Documentation

◆ add()

void tracktion::engine::SelectableList::add ( Selectable newElement)

Definition at line 229 of file tracktion_Selectable.h.

◆ addArray()

template<class OtherArrayType >
void tracktion::engine::SelectableList::addArray ( const OtherArrayType &  arrayToAddFrom,
int  startIndex = 0,
int  numElementsToAdd = -1 
)

Definition at line 214 of file tracktion_Selectable.h.

◆ addIfNotAlreadyThere()

bool tracktion::engine::SelectableList::addIfNotAlreadyThere ( Selectable newElement)

Definition at line 230 of file tracktion_Selectable.h.

◆ begin() [1/2]

Selectable ** tracktion::engine::SelectableList::begin ( )

Definition at line 201 of file tracktion_Selectable.h.

◆ begin() [2/2]

Selectable *const * tracktion::engine::SelectableList::begin ( ) const

Definition at line 202 of file tracktion_Selectable.h.

◆ clear()

void tracktion::engine::SelectableList::clear ( )

Definition at line 232 of file tracktion_Selectable.h.

◆ contains()

bool tracktion::engine::SelectableList::contains ( Selectable elementToLookFor) const

Definition at line 236 of file tracktion_Selectable.h.

◆ containsType()

template<typename SubclassType >
bool tracktion::engine::SelectableList::containsType ( ) const

Definition at line 187 of file tracktion_Selectable.h.

◆ data() [1/2]

Selectable ** tracktion::engine::SelectableList::data ( )

Definition at line 205 of file tracktion_Selectable.h.

◆ data() [2/2]

Selectable *const * tracktion::engine::SelectableList::data ( ) const

Definition at line 206 of file tracktion_Selectable.h.

◆ end() [1/2]

Selectable ** tracktion::engine::SelectableList::end ( )

Definition at line 203 of file tracktion_Selectable.h.

◆ end() [2/2]

Selectable *const * tracktion::engine::SelectableList::end ( ) const

Definition at line 204 of file tracktion_Selectable.h.

◆ getFirst()

Selectable * tracktion::engine::SelectableList::getFirst ( ) const

Definition at line 210 of file tracktion_Selectable.h.

◆ getFirstOfType()

template<typename SubclassType >
SubclassType * tracktion::engine::SelectableList::getFirstOfType ( ) const

Definition at line 181 of file tracktion_Selectable.h.

◆ getItemsOfType()

template<typename SubclassType >
juce::Array< SubclassType * > tracktion::engine::SelectableList::getItemsOfType ( ) const

Definition at line 169 of file tracktion_Selectable.h.

◆ getLast()

Selectable * tracktion::engine::SelectableList::getLast ( ) const

Definition at line 211 of file tracktion_Selectable.h.

◆ getLock()

const juce::DummyCriticalSection & tracktion::engine::SelectableList::getLock ( ) const
noexcept

Definition at line 249 of file tracktion_Selectable.h.

◆ getSelectableAndClass()

std::pair< Selectable *, SelectableClass * > tracktion::engine::SelectableList::getSelectableAndClass ( int  index) const

Returns the selectable and it's associated class.

N.B. This does no bounds checking so make sure index is in range!

Definition at line 772 of file tracktion_SelectionManager.cpp.

◆ getSelectableClass()

SelectableClass * tracktion::engine::SelectableList::getSelectableClass ( int  index) const

Returns the selectable class for a given Selectable in the list.

Definition at line 755 of file tracktion_SelectionManager.cpp.

◆ getUnchecked()

Selectable * tracktion::engine::SelectableList::getUnchecked ( int  index) const

Definition at line 209 of file tracktion_Selectable.h.

◆ indexOf()

int tracktion::engine::SelectableList::indexOf ( Selectable elementToLookFor) const

Definition at line 237 of file tracktion_Selectable.h.

◆ isEmpty()

bool tracktion::engine::SelectableList::isEmpty ( ) const

Definition at line 198 of file tracktion_Selectable.h.

◆ isNotEmpty()

bool tracktion::engine::SelectableList::isNotEmpty ( ) const

Definition at line 199 of file tracktion_Selectable.h.

◆ mergeArray()

template<class OtherArrayType >
void tracktion::engine::SelectableList::mergeArray ( const OtherArrayType &  arrayToMergeFrom)

Definition at line 221 of file tracktion_Selectable.h.

◆ operator!=() [1/2]

template<class OtherArrayType >
bool tracktion::engine::SelectableList::operator!= ( const OtherArrayType &  other) const

Definition at line 243 of file tracktion_Selectable.h.

◆ operator!=() [2/2]

bool tracktion::engine::SelectableList::operator!= ( const SelectableList other) const

Definition at line 246 of file tracktion_Selectable.h.

◆ operator==() [1/2]

template<class OtherArrayType >
bool tracktion::engine::SelectableList::operator== ( const OtherArrayType &  other) const

Definition at line 240 of file tracktion_Selectable.h.

◆ operator==() [2/2]

bool tracktion::engine::SelectableList::operator== ( const SelectableList other) const

Definition at line 245 of file tracktion_Selectable.h.

◆ operator[]()

Selectable * tracktion::engine::SelectableList::operator[] ( int  index) const

Definition at line 208 of file tracktion_Selectable.h.

◆ remove()

void tracktion::engine::SelectableList::remove ( int  indexToRemove)

Definition at line 233 of file tracktion_Selectable.h.

◆ removeAllInstancesOf()

int tracktion::engine::SelectableList::removeAllInstancesOf ( Selectable s)

Definition at line 234 of file tracktion_Selectable.h.

◆ removeAndReturn()

Selectable * tracktion::engine::SelectableList::removeAndReturn ( int  indexToRemove)

Definition at line 235 of file tracktion_Selectable.h.

◆ size()

int tracktion::engine::SelectableList::size ( ) const

Definition at line 197 of file tracktion_Selectable.h.


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