OpenShot Audio Library | OpenShotAudio 0.3.2
|
#include <juce_Array.h>
Public Types | |
using | ScopedLockType = typename TypeOfCriticalSectionToUse::ScopedLockType |
Public Attributes | |
JUCE_DEPRECATED_WITH_BODY(void swapWithArray(Array &other) noexcept, { swapWith(other);}) private void | removeInternal (int indexToRemove) |
Holds a resizable array of primitive or copy-by-value objects.
Examples of arrays are: Array<int>, Array<Rectangle> or Array<MyClass*>
The Array class can be used to hold simple, non-polymorphic objects as well as primitive types - to do so, the class must fulfill these requirements:
You can of course have an array of pointers to any kind of object, e.g. Array<MyClass*>, but if you do this, the array doesn't take any ownership of the objects - see the OwnedArray class or the ReferenceCountedArray class for more powerful ways of holding lists of objects.
For holding lists of strings, you can use Array<String>, but it's usually better to use the specialised class StringArray, which provides more useful functions.
To make all the array's methods thread-safe, pass in "CriticalSection" as the templated TypeOfCriticalSectionToUse parameter, instead of the default DummyCriticalSection.
Definition at line 55 of file juce_Array.h.
using juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::ScopedLockType = typename TypeOfCriticalSectionToUse::ScopedLockType |
Returns the type of scoped lock to use for locking this array
Definition at line 1123 of file juce_Array.h.
|
default |
Creates an empty array.
Referenced by juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::addArray(), juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::addArray(), juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::addNullTerminatedArray(), juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::Array(), juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::contains(), juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::indexOf(), juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::indexOfSorted(), juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::operator=(), juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::operator==(), juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::remove(), juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::removeAllInstancesOf(), juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::removeAndReturn(), juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::removeIf(), juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::removeValuesIn(), juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::removeValuesNotIn(), juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::set(), juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::setUnchecked(), and juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::swapWith().
|
inline |
Creates a copy of another array.
other | the array to copy |
Definition at line 68 of file juce_Array.h.
|
inlinenoexcept |
Definition at line 74 of file juce_Array.h.
|
inlineexplicit |
Initalises from a null-terminated raw array of values.
data | the data to copy from |
Definition at line 83 of file juce_Array.h.
|
inline |
Initalises from a raw array of values.
data | the data to copy from |
numValues | the number of values in the array |
Definition at line 94 of file juce_Array.h.
|
inline |
Initalises an Array of size 1 containing a single element.
Definition at line 100 of file juce_Array.h.
|
inline |
Initalises an Array of size 1 containing a single element.
Definition at line 106 of file juce_Array.h.
|
inline |
Initalises an Array from a list of items.
Definition at line 113 of file juce_Array.h.
|
inline |
Initalises an Array from a list of items.
Definition at line 120 of file juce_Array.h.
|
inline |
Definition at line 126 of file juce_Array.h.
|
default |
Destructor.
|
inline |
Appends multiple new elements at the end of the array.
Definition at line 436 of file juce_Array.h.
|
inline |
Appends a new element at the end of the array.
newElement | the new object to add to the array |
Definition at line 418 of file juce_Array.h.
Referenced by juce::StringArray::add(), juce::ActionBroadcaster::addActionListener(), juce::StringArray::addArray(), juce::AudioDeviceManager::addAudioCallback(), juce::AudioDeviceManager::addAudioDeviceType(), juce::ChangeBroadcaster::addChangeListener(), juce::dsp::Oversampling< SampleType >::addDummyOversamplingStage(), juce::ZipFile::Builder::addFile(), juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::addIfNotAlreadyThere(), juce::MixerAudioSource::addInputSource(), juce::ThreadPool::addJob(), juce::StringArray::addLines(), juce::Thread::addListener(), juce::MPEZoneLayout::addListener(), juce::Value::addListener(), juce::ValueTree::addListener(), juce::MPEInstrument::addListener(), juce::ThreadPoolJob::addListener(), juce::AudioDeviceManager::addMidiInputDeviceCallback(), juce::dsp::Oversampling< SampleType >::addOversamplingStage(), juce::SparseSet< Type >::addRange(), juce::MidiMessageSequence::addSequence(), juce::MidiMessageSequence::addSequence(), juce::Synthesiser::addSound(), juce::StringArray::addTokens(), juce::MidiFile::addTrack(), juce::MPESynthesiser::addVoice(), juce::Synthesiser::addVoice(), juce::var::append(), juce::ArgumentList::ArgumentList(), juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::Array(), juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::Array(), juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::Array(), juce::AudioChannelSet::channelSetsWithNumberOfChannels(), juce::dsp::IIR::Coefficients< NumericType >::Coefficients(), juce::dsp::Convolution::copyAndLoadImpulseResponseFromBlock(), juce::MidiMessageSequence::createControllerUpdatesForTime(), juce::DeletedAtShutdown::DeletedAtShutdown(), juce::dsp::FilterDesign< FloatType >::designFIRLowpassHalfBandEquirippleMethod(), juce::dsp::FilterDesign< FloatType >::designIIRHighpassHighOrderButterworthMethod(), juce::dsp::FilterDesign< FloatType >::designIIRLowpassHalfBandPolyphaseAllpassMethod(), juce::dsp::FilterDesign< FloatType >::designIIRLowpassHighOrderButterworthMethod(), juce::BigInteger::extendedEuclidean(), juce::File::findChildFiles(), juce::MPEChannelAssigner::findMidiChannelForNewNote(), juce::MPESynthesiser::findVoiceToSteal(), juce::Synthesiser::findVoiceToSteal(), juce::UndoManager::getActionsInCurrentTransaction(), juce::AudioChannelSet::getChannelTypes(), juce::RelativeTime::getDescription(), juce::SystemStats::getDeviceIdentifiers(), juce::IIRFilterAudioSource::getNextAudioBlock(), juce::dsp::Polynomial< FloatingType >::getProductWith(), juce::UndoManager::getRedoDescriptions(), juce::AudioChannelSet::getSpeakerArrangementAsString(), juce::UnitTest::getTestsInCategory(), juce::UndoManager::getUndoDescriptions(), juce::IIRFilterAudioSource::IIRFilterAudioSource(), juce::dsp::ConvolutionEngine::initializeConvolutionEngine(), juce::IPAddress::IPAddress(), juce::ChildProcessMaster::launchSlaveProcess(), juce::dsp::Convolution::loadImpulseResponse(), juce::dsp::Convolution::loadImpulseResponse(), juce::MPEInstrument::noteOn(), juce::dsp::SIMDRegister< Type >::operator+(), juce::dsp::SIMDRegister< Type >::operator+(), juce::dsp::SIMDRegister< Type >::operator+=(), juce::dsp::SIMDRegister< Type >::operator+=(), juce::ValueTree::operator=(), juce::UndoManager::perform(), juce::dsp::Polynomial< FloatingType >::Polynomial(), juce::var::readFromStream(), juce::Value::referTo(), juce::AudioFormatManager::registerFormat(), juce::MixerAudioSource::removeAllInputs(), juce::ThreadPool::removeAllJobs(), juce::ChannelRemappingAudioSource::restoreFromXml(), juce::NamedValueSet::set(), juce::NamedValueSet::set(), juce::OwnedArray< ObjectClass, TypeOfCriticalSectionToUse >::set(), juce::NamedValueSet::setFromXmlAttributes(), juce::ChannelRemappingAudioSource::setInputChannelMapping(), juce::ChannelRemappingAudioSource::setOutputChannelMapping(), juce::StringArray::StringArray(), juce::ReadWriteLock::tryEnterRead(), and juce::UnitTest::UnitTest().
|
inline |
Appends multiple new elements at the end of the array.
Definition at line 444 of file juce_Array.h.
|
inline |
Appends a new element at the end of the array.
newElement | the new object to add to the array |
Definition at line 428 of file juce_Array.h.
|
inline |
Adds elements from another array to the end of this array.
arrayToAddFrom | the array from which to copy the elements |
Definition at line 634 of file juce_Array.h.
|
inline |
Adds elements from another array to the end of this array.
arrayToAddFrom | the array from which to copy the elements |
startIndex | the first element of the other array to start copying from |
numElementsToAdd | how many elements to add from the other array. If this value is negative or greater than the number of available elements, all available elements will be copied. |
Definition at line 653 of file juce_Array.h.
|
inline |
Definition at line 592 of file juce_Array.h.
|
inline |
Adds elements from an array to the end of this array.
elementsToAdd | an array of some kind of object from which elements can be constructed. |
numElementsToAdd | how many elements are in this other array |
Definition at line 583 of file juce_Array.h.
Referenced by juce::ReferenceCountedArray< ObjectClass, TypeOfCriticalSectionToUse >::addArray(), juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::addNullTerminatedArray(), juce::dsp::FilterDesign< FloatType >::designIIRLowpassHalfBandPolyphaseAllpassMethod(), juce::ReferenceCountedArray< ObjectClass, TypeOfCriticalSectionToUse >::removeRange(), juce::OwnedArray< ObjectClass, TypeOfCriticalSectionToUse >::removeRange(), juce::StringArray::StringArray(), juce::StringArray::StringArray(), juce::StringArray::StringArray(), and juce::StringArray::StringArray().
|
inline |
Appends a new element at the end of the array as long as the array doesn't already contain it.
If the array already contains an element that matches the one passed in, nothing will be done.
newElement | the new object to add to the array |
Definition at line 522 of file juce_Array.h.
Referenced by juce::ListenerList< ListenerClass, ArrayType >::add(), juce::MidiKeyboardState::addListener(), juce::TimeSliceThread::addTimeSliceClient(), and juce::UnitTest::getAllCategories().
|
inline |
Adds elements from a null-terminated array of pointers to the end of this array.
elementsToAdd | an array of pointers to some kind of object from which elements can be constructed. This array must be terminated by a nullptr |
Definition at line 605 of file juce_Array.h.
Referenced by juce::StringArray::StringArray(), and juce::StringArray::StringArray().
|
inline |
Inserts a new element into the array, assuming that the array is sorted.
This will use a comparator to find the position at which the new element should go. If the array isn't sorted, the behaviour of this method will be unpredictable.
comparator | the comparator to use to compare the elements - see the sort() method for details about the form this object should take |
newElement | the new element to insert to the array |
Definition at line 694 of file juce_Array.h.
Referenced by juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::addUsingDefaultSort().
|
inline |
Inserts a new element into the array, assuming that the array is sorted.
This will use the DefaultElementComparator class for sorting, so your ElementType must be suitable for use with that class. If the array isn't sorted, the behaviour of this method will be unpredictable.
newElement | the new element to insert to the array |
Definition at line 711 of file juce_Array.h.
|
inlinenoexcept |
Returns a pointer to the first element in the array. This method is provided for compatibility with standard C++ iteration mechanisms.
Definition at line 336 of file juce_Array.h.
|
inlinenoexcept |
Returns a pointer to the first element in the array. This method is provided for compatibility with standard C++ iteration mechanisms.
Definition at line 328 of file juce_Array.h.
Referenced by juce::MidiBuffer::addEvent(), juce::SparseSet< Type >::addRange(), juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::addSorted(), juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::Array(), juce::MidiMessageSequence::begin(), juce::AudioFormatManager::begin(), juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::begin(), juce::OwnedArray< ObjectClass, TypeOfCriticalSectionToUse >::begin(), juce::ReferenceCountedArray< ObjectClass, TypeOfCriticalSectionToUse >::begin(), juce::SortedSet< ElementType, TypeOfCriticalSectionToUse >::begin(), juce::StringArray::begin(), juce::MidiMessageSequence::begin(), juce::AudioFormatManager::begin(), juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::begin(), juce::OwnedArray< ObjectClass, TypeOfCriticalSectionToUse >::begin(), juce::ReferenceCountedArray< ObjectClass, TypeOfCriticalSectionToUse >::begin(), juce::StringArray::begin(), juce::dsp::Matrix< ElementType >::clear(), juce::MidiBuffer::clear(), juce::dsp::Matrix< ElementType >::compare(), juce::OwnedArray< ObjectClass, TypeOfCriticalSectionToUse >::contains(), juce::ReferenceCountedArray< ObjectClass, TypeOfCriticalSectionToUse >::contains(), juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::contains(), juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::data(), juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::data(), juce::MPESynthesiser::findVoiceToSteal(), juce::Synthesiser::findVoiceToSteal(), juce::MidiBuffer::getFirstEventTime(), juce::MidiBuffer::getLastEventTime(), juce::dsp::IIR::Coefficients< NumericType >::getMagnitudeForFrequency(), juce::dsp::IIR::Coefficients< NumericType >::getMagnitudeForFrequencyArray(), juce::MidiBuffer::getNumEvents(), juce::dsp::IIR::Coefficients< NumericType >::getPhaseForFrequency(), juce::dsp::IIR::Coefficients< NumericType >::getPhaseForFrequencyArray(), juce::dsp::FIR::Coefficients< NumericType >::getRawCoefficients(), juce::dsp::IIR::Coefficients< NumericType >::getRawCoefficients(), juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::getRawDataPointer(), juce::ReferenceCountedArray< ObjectClass, TypeOfCriticalSectionToUse >::getRawDataPointer(), juce::dsp::Matrix< ElementType >::getRawDataPointer(), juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::getRawDataPointer(), juce::OwnedArray< ObjectClass, TypeOfCriticalSectionToUse >::getRawDataPointer(), juce::OwnedArray< ObjectClass, TypeOfCriticalSectionToUse >::indexOf(), juce::ReferenceCountedArray< ObjectClass, TypeOfCriticalSectionToUse >::indexOf(), juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::indexOf(), juce::StringArray::operator=(), juce::ReferenceCountedArray< ObjectClass, TypeOfCriticalSectionToUse >::ReferenceCountedArray(), juce::ReferenceCountedArray< ObjectClass, TypeOfCriticalSectionToUse >::ReferenceCountedArray(), juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::remove(), juce::OwnedArray< ObjectClass, TypeOfCriticalSectionToUse >::remove(), juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::removeFirstMatchingValue(), juce::MidiBuffer::Iterator::setNextSamplePosition(), juce::StringArray::sort(), juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::sort(), juce::OwnedArray< ObjectClass, TypeOfCriticalSectionToUse >::sort(), juce::ReferenceCountedArray< ObjectClass, TypeOfCriticalSectionToUse >::sort(), juce::StringArray::sortNatural(), juce::StringArray::StringArray(), and juce::dsp::Matrix< ElementType >::toString().
|
inline |
Removes all elements from the array. This will remove all the elements, and free any storage that the array is using. To clear the array without freeing the storage, use the clearQuick() method instead.
Definition at line 188 of file juce_Array.h.
Referenced by juce::MPEChannelAssigner::allNotesOff(), juce::MidiFile::clear(), juce::ListenerList< ListenerClass, ArrayType >::clear(), juce::NamedValueSet::clear(), juce::SparseSet< Type >::clear(), juce::StringArray::clear(), juce::SortedSet< ElementType, TypeOfCriticalSectionToUse >::clear(), juce::AudioSourceChannelInfo::clearActiveBufferRegion(), juce::ChannelRemappingAudioSource::clearAllMappings(), juce::AudioFormatManager::clearFormats(), juce::dsp::Oversampling< SampleType >::clearOversamplingStages(), juce::Synthesiser::clearSounds(), juce::MPESynthesiser::clearVoices(), juce::Synthesiser::clearVoices(), juce::DeletedAtShutdown::deleteAll(), juce::BigInteger::divideBy(), juce::BigInteger::extendedEuclidean(), juce::BufferingAudioSource::getNextAudioBlock(), juce::AudioTransportSource::getNextAudioBlock(), juce::MemoryAudioSource::getNextAudioBlock(), juce::dsp::ConvolutionEngine::initializeConvolutionEngine(), juce::dsp::Oscillator< SampleType >::process(), juce::MPEInstrument::releaseAllNotes(), juce::ActionBroadcaster::removeAllActionListeners(), juce::ChangeBroadcaster::removeAllChangeListeners(), juce::MixerAudioSource::removeAllInputs(), juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::removeValuesIn(), juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::removeValuesNotIn(), juce::UnitTestRunner::runTests(), and juce::MultiTimer::~MultiTimer().
|
inline |
Removes all elements from the array without freeing the array's allocated storage.
Definition at line 198 of file juce_Array.h.
Referenced by juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::clear(), juce::MidiBuffer::clear(), juce::StringArray::clearQuick(), juce::SortedSet< ElementType, TypeOfCriticalSectionToUse >::clearQuick(), juce::dsp::Polynomial< FloatingType >::getProductWith(), and juce::NamedValueSet::setFromXmlAttributes().
|
inline |
Returns true if the array contains at least one occurrence of an object.
elementToLookFor | the value or object to look for |
Definition at line 400 of file juce_Array.h.
Referenced by juce::AudioDeviceManager::addAudioCallback(), juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::addIfNotAlreadyThere(), juce::MixerAudioSource::addInputSource(), juce::ListenerList< ListenerClass, ArrayType >::contains(), juce::StringPairArray::containsKey(), juce::AudioFormatManager::findFormatForFileExtension(), juce::IPAddress::getFormattedAddress(), juce::IPAddress::IPAddress(), juce::MPEInstrument::isMemberChannel(), juce::MPEInstrument::isUsingChannel(), juce::TimeSliceThread::moveToFrontOfQueue(), juce::AudioDeviceManager::removeAudioCallback(), juce::ThreadPool::removeJob(), juce::SparseSet< Type >::removeRange(), juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::removeValuesIn(), juce::SortedSet< ElementType, TypeOfCriticalSectionToUse >::removeValuesIn(), juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::removeValuesNotIn(), juce::SortedSet< ElementType, TypeOfCriticalSectionToUse >::removeValuesNotIn(), and juce::MPEInstrument::setLegacyModeChannelRange().
|
inlinenoexcept |
Returns a pointer to the first element in the array. This method is provided for compatibility with the standard C++ containers.
Definition at line 368 of file juce_Array.h.
|
inlinenoexcept |
Returns a pointer to the first element in the array. This method is provided for compatibility with the standard C++ containers.
Definition at line 360 of file juce_Array.h.
Referenced by juce::SortedSet< ElementType, TypeOfCriticalSectionToUse >::addSet(), juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::Array(), juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::Array(), juce::CharPointer_ASCII::compare(), juce::CharPointer_ASCII::compareUpTo(), juce::AudioData::Pointer< SampleFormat, Endianness, InterleavingType, Constness >::convertSamples(), juce::MidiBuffer::Iterator::getNextEvent(), juce::MidiBuffer::Iterator::getNextEvent(), juce::AudioData::Pointer< SampleFormat, Endianness, InterleavingType, Constness >::getRawData(), juce::HeapBlock< ElementType, throwOnFailure >::HeapBlock(), juce::HeapBlock< ElementType, throwOnFailure >::HeapBlock(), juce::MemoryBlock::MemoryBlock(), juce::MemoryBlock::operator=(), juce::MidiBuffer::operator=(), juce::HeapBlock< ElementType, throwOnFailure >::operator=(), juce::HeapBlock< ElementType, throwOnFailure >::operator=(), juce::MemoryBlock::operator=(), juce::CharPointer_ASCII::operator==(), juce::CharPointer_UTF16::operator==(), juce::CharPointer_UTF32::operator==(), juce::CharPointer_UTF8::operator==(), juce::MemoryBlock::operator==(), juce::SortedSet< ElementType, TypeOfCriticalSectionToUse >::operator==(), juce::SamplerVoice::renderNextBlock(), juce::MidiBuffer::Iterator::setNextSamplePosition(), juce::HeapBlock< ElementType, throwOnFailure >::swapWith(), juce::MemoryBlock::swapWith(), juce::MidiBuffer::swapWith(), juce::SortedSet< ElementType, TypeOfCriticalSectionToUse >::swapWith(), juce::CharPointer_UTF16::writeAll(), juce::CharPointer_UTF32::writeAll(), and juce::CharPointer_UTF8::writeAll().
|
inlinenoexcept |
Returns a pointer to the element which follows the last element in the array. This method is provided for compatibility with standard C++ iteration mechanisms.
Definition at line 352 of file juce_Array.h.
|
inlinenoexcept |
Returns a pointer to the element which follows the last element in the array. This method is provided for compatibility with standard C++ iteration mechanisms.
Definition at line 344 of file juce_Array.h.
Referenced by juce::ReferenceCountedArray< ObjectClass, TypeOfCriticalSectionToUse >::addArray(), juce::MidiBuffer::addEvent(), juce::SparseSet< Type >::addRange(), juce::MidiBuffer::clear(), juce::OwnedArray< ObjectClass, TypeOfCriticalSectionToUse >::contains(), juce::ReferenceCountedArray< ObjectClass, TypeOfCriticalSectionToUse >::contains(), juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::contains(), juce::Range< ValueType >::contains(), juce::MidiMessageSequence::end(), juce::AudioFormatManager::end(), juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::end(), juce::OwnedArray< ObjectClass, TypeOfCriticalSectionToUse >::end(), juce::ReferenceCountedArray< ObjectClass, TypeOfCriticalSectionToUse >::end(), juce::SortedSet< ElementType, TypeOfCriticalSectionToUse >::end(), juce::StringArray::end(), juce::MidiMessageSequence::end(), juce::AudioFormatManager::end(), juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::end(), juce::OwnedArray< ObjectClass, TypeOfCriticalSectionToUse >::end(), juce::ReferenceCountedArray< ObjectClass, TypeOfCriticalSectionToUse >::end(), juce::StringArray::end(), juce::MPESynthesiser::findVoiceToSteal(), juce::Synthesiser::findVoiceToSteal(), juce::Range< ValueType >::getIntersectionWith(), juce::MidiBuffer::getLastEventTime(), juce::MidiBuffer::Iterator::getNextEvent(), juce::MidiBuffer::Iterator::getNextEvent(), juce::MidiBuffer::getNumEvents(), juce::Range< ValueType >::getUnionWith(), juce::OwnedArray< ObjectClass, TypeOfCriticalSectionToUse >::indexOf(), juce::ReferenceCountedArray< ObjectClass, TypeOfCriticalSectionToUse >::indexOf(), juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::indexOf(), juce::Range< ValueType >::intersects(), juce::StringArray::operator=(), juce::StringArray::sort(), juce::StringArray::sortNatural(), and juce::StringArray::StringArray().
|
inline |
Increases the array's internal storage to hold a minimum number of elements.
Calling this before adding a large known number of elements means that the array won't have to keep dynamically resizing itself as the elements are added, and it'll therefore be more efficient.
Definition at line 1062 of file juce_Array.h.
Referenced by juce::MidiBuffer::ensureSize(), juce::SortedSet< ElementType, TypeOfCriticalSectionToUse >::ensureStorageAllocated(), juce::StringArray::ensureStorageAllocated(), juce::MPESynthesiser::findVoiceToSteal(), juce::Synthesiser::findVoiceToSteal(), and juce::ReadWriteLock::ReadWriteLock().
|
inlinenoexcept |
Fills the Array with the provided value.
Definition at line 205 of file juce_Array.h.
Referenced by juce::dsp::LadderFilter< Type >::reset().
|
inlinenoexcept |
Returns the first element in the array, or a default value if the array is empty.
Definition at line 290 of file juce_Array.h.
Referenced by juce::AudioDeviceManager::getCurrentDeviceTypeObject(), juce::SortedSet< ElementType, TypeOfCriticalSectionToUse >::getFirst(), juce::SparseSet< Type >::getTotalRange(), and juce::dsp::Oversampling< SampleType >::processSamplesDown().
|
inlinenoexcept |
Returns the last element in the array, or a default value if the array is empty.
Definition at line 300 of file juce_Array.h.
Referenced by juce::AudioDeviceManager::addAudioDeviceType(), juce::MPEChannelAssigner::allNotesOff(), juce::SortedSet< ElementType, TypeOfCriticalSectionToUse >::getLast(), juce::SparseSet< Type >::getTotalRange(), and juce::UndoManager::perform().
|
inlinenoexcept |
Returns the CriticalSection that locks this array. To lock, you can call getLock().enter() and getLock().exit(), or preferably use an object of ScopedLockType as an RAII lock for it.
Definition at line 1120 of file juce_Array.h.
Referenced by juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::add(), juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::add(), juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::add(), juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::add(), juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::addArray(), juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::addArray(), juce::OwnedArray< ObjectClass, TypeOfCriticalSectionToUse >::addArray(), juce::ReferenceCountedArray< ObjectClass, TypeOfCriticalSectionToUse >::addArray(), juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::addArray(), juce::OwnedArray< ObjectClass, TypeOfCriticalSectionToUse >::addCopiesOf(), juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::addIfNotAlreadyThere(), juce::SortedSet< ElementType, TypeOfCriticalSectionToUse >::addSet(), juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::addSorted(), juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::Array(), juce::ListenerList< ListenerClass, ArrayType >::call(), juce::ListenerList< ListenerClass, ArrayType >::callChecked(), juce::ListenerList< ListenerClass, ArrayType >::callCheckedExcluding(), juce::ListenerList< ListenerClass, ArrayType >::callExcluding(), juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::clear(), juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::clearQuick(), juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::contains(), juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::ensureStorageAllocated(), juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::fill(), juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::getFirst(), juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::getLast(), juce::SortedSet< ElementType, TypeOfCriticalSectionToUse >::getLock(), juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::getReference(), juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::getReference(), juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::getUnchecked(), juce::SortedSet< ElementType, TypeOfCriticalSectionToUse >::indexOf(), juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::indexOf(), juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::indexOfSorted(), juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::insert(), juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::insertArray(), juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::insertMultiple(), juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::minimiseStorageOverheads(), juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::move(), juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::operator==(), juce::ReferenceCountedArray< ObjectClass, TypeOfCriticalSectionToUse >::operator==(), juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::operator[](), juce::ReferenceCountedArray< ObjectClass, TypeOfCriticalSectionToUse >::ReferenceCountedArray(), juce::ReferenceCountedArray< ObjectClass, TypeOfCriticalSectionToUse >::ReferenceCountedArray(), juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::remove(), juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::remove(), juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::removeAllInstancesOf(), juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::removeAndReturn(), juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::removeFirstMatchingValue(), juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::removeIf(), juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::removeLast(), juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::removeRange(), juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::removeValuesIn(), juce::SortedSet< ElementType, TypeOfCriticalSectionToUse >::removeValuesIn(), juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::removeValuesNotIn(), juce::SortedSet< ElementType, TypeOfCriticalSectionToUse >::removeValuesNotIn(), juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::set(), juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::setUnchecked(), juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::size(), juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::sort(), juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::swap(), juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::swapWith(), juce::OwnedArray< ObjectClass, TypeOfCriticalSectionToUse >::swapWith(), juce::ReferenceCountedArray< ObjectClass, TypeOfCriticalSectionToUse >::swapWith(), and juce::HashMap< KeyType, ValueType, HashFunctionType, TypeOfCriticalSectionToUse >::swapWith().
|
inlinenoexcept |
Returns a pointer to the actual array data. This pointer will only be valid until the next time a non-const method is called on the array.
Definition at line 319 of file juce_Array.h.
|
inlinenoexcept |
Returns a pointer to the actual array data. This pointer will only be valid until the next time a non-const method is called on the array.
Definition at line 310 of file juce_Array.h.
Referenced by juce::URL::addEscapeChars(), juce::dsp::FIR::Coefficients< NumericType >::getRawCoefficients(), juce::dsp::IIR::Coefficients< NumericType >::getRawCoefficients(), juce::dsp::Matrix< ElementType >::getRawDataPointer(), juce::dsp::Matrix< ElementType >::Matrix(), juce::dsp::WindowingFunction< FloatType >::multiplyWithWindowingTable(), juce::dsp::Matrix< ElementType >::operator*(), juce::dsp::Oscillator< SampleType >::process(), juce::dsp::Convolution::Pimpl::processFifo(), juce::URL::removeEscapeChars(), juce::dsp::Matrix< ElementType >::solve(), and juce::dsp::Matrix< ElementType >::swapRows().
|
inlinenoexcept |
Returns a direct reference to one of the elements in the array, without checking the index passed in.
This is like getUnchecked, but returns a direct reference to the element. Obviously this can be dangerous, so only use it when absolutely necessary.
index | the index of the element being requested (0 is the first element in the array) |
Definition at line 281 of file juce_Array.h.
|
inlinenoexcept |
Returns a direct reference to one of the elements in the array, without checking the index passed in.
This is like getUnchecked, but returns a direct reference to the element, so that you can alter it directly. Obviously this can be dangerous, so only use it when absolutely necessary.
index | the index of the element being requested (0 is the first element in the array) |
Definition at line 267 of file juce_Array.h.
Referenced by juce::SortedSet< ElementType, TypeOfCriticalSectionToUse >::add(), juce::StringArray::addArray(), juce::StringArray::appendNumbersToDuplicates(), juce::ReadWriteLock::exitRead(), juce::BigInteger::extendedEuclidean(), juce::IPAddress::getFormattedAddress(), juce::MPEInstrument::getMostRecentNoteOtherThan(), juce::SortedSet< ElementType, TypeOfCriticalSectionToUse >::getReference(), juce::SortedSet< ElementType, TypeOfCriticalSectionToUse >::getReference(), juce::NamedValueSet::getValueAt(), juce::ArgumentList::getValueForOption(), juce::SortedSet< ElementType, TypeOfCriticalSectionToUse >::indexOf(), juce::StringArray::indexOf(), juce::ArgumentList::indexOfOption(), juce::dsp::ConvolutionEngine::initializeConvolutionEngine(), juce::StringArray::joinIntoString(), juce::dsp::Matrix< ElementType >::operator()(), juce::dsp::Matrix< ElementType >::operator()(), juce::NamedValueSet::operator==(), juce::StringArray::operator[](), juce::dsp::Polynomial< FloatingType >::operator[](), juce::MPEInstrument::polyAftertouch(), juce::dsp::ConvolutionEngine::processSamples(), juce::MPEInstrument::releaseAllNotes(), juce::NamedValueSet::remove(), juce::StringArray::removeDuplicates(), juce::StringArray::removeEmptyStrings(), juce::AudioDeviceManager::removeMidiInputDeviceCallback(), juce::SparseSet< Type >::removeRange(), juce::StringArray::removeString(), juce::ArgumentList::removeValueForOption(), juce::SortedSet< ElementType, TypeOfCriticalSectionToUse >::removeValuesIn(), and juce::SortedSet< ElementType, TypeOfCriticalSectionToUse >::removeValuesNotIn().
|
inline |
Returns one of the elements in the array, without checking the index passed in.
Unlike the operator[] method, this will try to return an element without checking that the index is within the bounds of the array, so should only be used when you're confident that it will always be a valid index.
index | the index of the element being requested (0 is the first element in the array) |
Definition at line 252 of file juce_Array.h.
Referenced by juce::OwnedArray< ObjectClass, TypeOfCriticalSectionToUse >::addCopiesOf(), juce::URL::addEscapeChars(), juce::HashMap< KeyType, ValueType, HashFunctionType, TypeOfCriticalSectionToUse >::clear(), juce::HashMap< KeyType, ValueType, HashFunctionType, TypeOfCriticalSectionToUse >::containsValue(), juce::MidiMessageSequence::createControllerUpdatesForTime(), juce::ChannelRemappingAudioSource::createXml(), juce::DeletedAtShutdown::deleteAll(), juce::ZipFile::getIndexOfFileName(), juce::IIRFilterAudioSource::getNextAudioBlock(), juce::MixerAudioSource::getNextAudioBlock(), juce::HashMap< KeyType, ValueType, HashFunctionType, TypeOfCriticalSectionToUse >::getReference(), juce::ChannelRemappingAudioSource::getRemappedInputChannel(), juce::ChannelRemappingAudioSource::getRemappedOutputChannel(), juce::SortedSet< ElementType, TypeOfCriticalSectionToUse >::getUnchecked(), juce::dsp::LookupTable< FloatType >::getUnchecked(), juce::IIRFilterAudioSource::makeInactive(), juce::MidiMessageSequence::MidiMessageSequence(), juce::HashMap< KeyType, ValueType, HashFunctionType, TypeOfCriticalSectionToUse >::Iterator::next(), juce::MPESynthesiser::noteReleased(), juce::dsp::Polynomial< FloatingType >::operator()(), juce::dsp::Polynomial< FloatingType >::operator[](), juce::IIRFilterAudioSource::prepareToPlay(), juce::MixerAudioSource::prepareToPlay(), juce::dsp::Convolution::Pimpl::processFifo(), juce::dsp::Oversampling< SampleType >::processSamplesDown(), juce::dsp::Oversampling< SampleType >::processSamplesUp(), juce::MixerAudioSource::releaseResources(), juce::HashMap< KeyType, ValueType, HashFunctionType, TypeOfCriticalSectionToUse >::remapTable(), juce::HashMap< KeyType, ValueType, HashFunctionType, TypeOfCriticalSectionToUse >::remove(), juce::MixerAudioSource::removeAllInputs(), juce::ThreadPool::removeAllJobs(), juce::URL::removeEscapeChars(), juce::HashMap< KeyType, ValueType, HashFunctionType, TypeOfCriticalSectionToUse >::removeValue(), juce::ActionBroadcaster::sendActionMessage(), juce::AudioDeviceManager::setAudioDeviceSetup(), juce::IIRFilterAudioSource::setCoefficients(), juce::AudioDeviceManager::setCurrentAudioDeviceType(), juce::MPESynthesiser::setCurrentPlaybackSampleRate(), juce::AudioDeviceManager::setDefaultMidiOutputDevice(), and juce::MidiMessageSequence::updateMatchedPairs().
|
inline |
Finds the index of the first element which matches the value passed in.
This will search the array for the given object, and return the index of its first occurrence. If the object isn't found, the method will return -1.
elementToLookFor | the value or object to look for |
Definition at line 382 of file juce_Array.h.
Referenced by juce::String::containsAnyOf(), juce::String::containsChar(), juce::String::containsOnly(), juce::CharacterFunctions::findEndOfToken(), juce::File::hasFileExtension(), juce::ValueTree::indexOf(), juce::var::indexOf(), juce::String::indexOf(), juce::String::indexOf(), juce::String::indexOfAnyOf(), juce::String::indexOfChar(), juce::String::initialSectionContainingOnly(), juce::String::initialSectionNotContaining(), juce::IPAddress::IPAddress(), juce::String::lastIndexOfAnyOf(), juce::StringPairArray::operator==(), juce::AudioDeviceManager::removeAudioDeviceType(), juce::String::removeCharacters(), juce::MixerAudioSource::removeInputSource(), juce::PropertySet::removeValue(), juce::String::replaceCharacters(), juce::String::retainCharacters(), juce::PropertySet::setValue(), juce::String::trimCharactersAtEnd(), and juce::String::trimCharactersAtStart().
|
inline |
Finds the index of an element in the array, assuming that the array is sorted.
This will use a comparator to do a binary-chop to find the index of the given element, if it exists. If the array isn't sorted, the behaviour of this method will be unpredictable.
comparator | the comparator to use to compare the elements - see the sort() method for details about the form this object should take |
elementToLookFor | the element to search for |
Definition at line 730 of file juce_Array.h.
|
inline |
Inserts a new element into the array at a given position.
If the index is less than 0 or greater than the size of the array, the element will be added to the end of the array. Otherwise, it will be inserted into the array, moving all the later elements along to make room.
indexToInsertAt | the index at which the new element should be inserted (pass in -1 to add it to the end) |
newElement | the new object to add to the array |
Definition at line 462 of file juce_Array.h.
Referenced by juce::SortedSet< ElementType, TypeOfCriticalSectionToUse >::add(), juce::URL::addEscapeChars(), juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::addSorted(), juce::dsp::FilterDesign< FloatType >::designFIRLowpassHalfBandEquirippleMethod(), juce::var::insert(), juce::StringArray::insert(), juce::IPAddress::IPAddress(), and juce::SparseSet< Type >::removeRange().
|
inline |
Inserts an array of values into this array at a given position.
If the index is less than 0 or greater than the size of the array, the new elements will be added to the end of the array. Otherwise, they will be inserted into the array, moving all the later elements along to make room.
indexToInsertAt | the index at which the first new element should be inserted |
newElements | the new values to add to the array |
numberOfElements | how many items are in the array |
Definition at line 502 of file juce_Array.h.
|
inline |
Inserts multiple copies of an element into the array at a given position.
If the index is less than 0 or greater than the size of the array, the element will be added to the end of the array. Otherwise, it will be inserted into the array, moving all the later elements along to make room.
indexToInsertAt | the index at which the new element should be inserted |
newElement | the new object to add to the array |
numberOfTimesToInsertIt | how many copies of the value to insert |
Definition at line 480 of file juce_Array.h.
Referenced by juce::MidiBuffer::addEvent(), juce::HashMap< KeyType, ValueType, HashFunctionType, TypeOfCriticalSectionToUse >::HashMap(), juce::HashMap< KeyType, ValueType, HashFunctionType, TypeOfCriticalSectionToUse >::remapTable(), and juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::resize().
|
inlinenoexcept |
Returns true if the array is empty, false otherwise.
Definition at line 222 of file juce_Array.h.
Referenced by juce::StringArray::addLines(), juce::ValueTree::addListener(), juce::SparseSet< Type >::addRange(), juce::StringArray::addTokens(), juce::String::appendCharPointer(), juce::String::appendCharPointer(), juce::String::containsAnyOf(), juce::String::containsNonWhitespaceChars(), juce::String::containsOnly(), juce::CharacterFunctions::find(), juce::Synthesiser::findVoiceToSteal(), juce::MemoryBlock::fromBase64Encoding(), juce::XmlElement::getChildByAttribute(), juce::XmlElement::getChildByName(), juce::RelativeTime::getDescription(), juce::SystemStats::getDeviceIdentifiers(), juce::StringPool::getPooledString(), juce::StringPool::getPooledString(), juce::SparseSet< Type >::getTotalRange(), juce::File::hasFileExtension(), juce::String::indexOf(), juce::String::indexOf(), juce::String::indexOfAnyOf(), juce::String::indexOfChar(), juce::String::indexOfIgnoreCase(), juce::String::indexOfIgnoreCase(), juce::String::initialSectionContainingOnly(), juce::String::initialSectionNotContaining(), juce::File::isAChildOf(), juce::ListenerList< ListenerClass, ArrayType >::isEmpty(), juce::NamedValueSet::isEmpty(), juce::SparseSet< Type >::isEmpty(), juce::URL::isEmpty(), juce::String::isEmpty(), juce::StringRef::isEmpty(), juce::String::isNotEmpty(), juce::StringRef::isNotEmpty(), juce::Identifier::isNull(), juce::XmlElement::isTextElement(), juce::String::lastIndexOfAnyOf(), juce::String::lastIndexOfChar(), juce::MPEChannelAssigner::MPEChannelAssigner(), juce::MPEInstrument::noteOff(), juce::Result::operator bool(), juce::ValueTree::operator=(), juce::dsp::Polynomial< FloatingType >::Polynomial(), juce::dsp::Polynomial< FloatingType >::Polynomial(), juce::ValueTree::removeListener(), juce::SparseSet< Type >::removeRange(), juce::SortedSet< ElementType, TypeOfCriticalSectionToUse >::removeValuesIn(), juce::SortedSet< ElementType, TypeOfCriticalSectionToUse >::removeValuesNotIn(), juce::String::replaceSection(), juce::AudioDeviceManager::setAudioDeviceSetup(), juce::String::substring(), juce::String::substring(), juce::ZipFile::uncompressEntry(), juce::Result::wasOk(), and juce::ValueTree::~ValueTree().
|
inline |
Definition at line 1143 of file juce_Array.h.
|
inline |
Reduces the amount of storage being used by the array.
Arrays typically allocate slightly more storage than they need, and after removing elements, they may have quite a lot of unused space allocated. This method will reduce the amount of allocated storage to a minimum.
Definition at line 1050 of file juce_Array.h.
Referenced by juce::StringArray::minimiseStorageOverheads(), and juce::SortedSet< ElementType, TypeOfCriticalSectionToUse >::minimiseStorageOverheads().
|
inlinenoexcept |
Moves one of the values to a different position.
This will move the value to a specified index, shuffling along any intervening elements as required.
So for example, if you have the array { 0, 1, 2, 3, 4, 5 } then calling move (2, 4) would result in { 0, 1, 3, 4, 2, 5 }.
currentIndex | the index of the value to be moved. If this isn't a valid index, then nothing will be done |
newIndex | the index at which you'd like this value to end up. If this is less than zero, the value will be moved to the end of the array |
Definition at line 1034 of file juce_Array.h.
Referenced by juce::StringArray::move().
|
inline |
Compares this array to another one. Two arrays are considered equal if they both contain the same set of elements, in the same order.
other | the other array to compare with |
Definition at line 175 of file juce_Array.h.
|
inlinenoexcept |
Definition at line 148 of file juce_Array.h.
|
inline |
Copies another array.
other | the array to copy |
Definition at line 137 of file juce_Array.h.
|
inline |
Compares this array to another one. Two arrays are considered equal if they both contain the same set of elements, in the same order.
other | the other array to compare with |
Definition at line 162 of file juce_Array.h.
Referenced by juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::operator!=().
|
inline |
Returns one of the elements in the array. If the index passed in is beyond the range of valid elements, this will return a default value.
If you're certain that the index will always be a valid element, you can call getUnchecked() instead, which is faster.
index | the index of the element being requested (0 is the first element in the array) |
Definition at line 237 of file juce_Array.h.
|
inline |
Removes an element from the array.
This will remove the element pointed to by the given iterator, and move back all the subsequent elements to close the gap. If the iterator passed in does not point to an element within the array, behaviour is undefined.
elementToRemove | a pointer to the element to remove |
Definition at line 809 of file juce_Array.h.
|
inline |
Removes an element from the array.
This will remove the element at a given index, and move back all the subsequent elements to close the gap. If the index passed in is out-of-range, nothing will happen.
indexToRemove | the index of the element to remove |
Definition at line 767 of file juce_Array.h.
Referenced by juce::MidiMessageSequence::deleteMidiChannelMessages(), juce::MidiMessageSequence::deleteSysExMessages(), juce::ReadWriteLock::exitRead(), juce::MPEInstrument::noteOff(), juce::MPEInstrument::noteOn(), juce::MPESynthesiser::reduceNumVoices(), juce::NamedValueSet::remove(), juce::var::remove(), juce::StringArray::remove(), juce::ThreadPool::removeAllJobs(), juce::AudioDeviceManager::removeAudioDeviceType(), juce::ChangeBroadcaster::removeChangeListener(), juce::StringArray::removeDuplicates(), juce::StringArray::removeEmptyStrings(), juce::MixerAudioSource::removeInputSource(), juce::Thread::removeListener(), juce::MPEZoneLayout::removeListener(), juce::Value::removeListener(), juce::ValueTree::removeListener(), juce::MPEInstrument::removeListener(), juce::ThreadPoolJob::removeListener(), juce::AudioDeviceManager::removeMidiInputDeviceCallback(), juce::ArgumentList::removeOptionIfFound(), juce::SparseSet< Type >::removeRange(), juce::Synthesiser::removeSound(), juce::StringArray::removeString(), juce::SortedSet< ElementType, TypeOfCriticalSectionToUse >::removeValue(), juce::ArgumentList::removeValueForOption(), juce::MPESynthesiser::removeVoice(), and juce::Synthesiser::removeVoice().
|
inline |
Removes items from the array.
This will remove all occurrences of the given element from the array. If no such items are found, no action is taken.
valueToRemove | the object to try to remove |
Definition at line 858 of file juce_Array.h.
Referenced by juce::MPEChannelAssigner::noteOff().
|
inline |
Removes an element from the array.
This will remove the element at a given index, and move back all the subsequent elements to close the gap. If the index passed in is out-of-range, nothing will happen.
indexToRemove | the index of the element to remove |
Definition at line 785 of file juce_Array.h.
Referenced by juce::SortedSet< ElementType, TypeOfCriticalSectionToUse >::remove(), and juce::AudioDeviceManager::removeAudioDeviceType().
|
inline |
Removes an item from the array.
This will remove the first occurrence of the given element from the array. If the item isn't found, no action is taken.
valueToRemove | the object to try to remove |
Definition at line 834 of file juce_Array.h.
Referenced by juce::ListenerList< ListenerClass, ArrayType >::remove(), juce::AudioDeviceManager::removeAudioCallback(), juce::ThreadPool::removeJob(), juce::MidiKeyboardState::removeListener(), juce::TimeSliceThread::removeTimeSliceClient(), juce::TimeSliceThread::run(), juce::DeletedAtShutdown::~DeletedAtShutdown(), juce::OutputStream::~OutputStream(), and juce::UnitTest::~UnitTest().
|
inline |
Removes items from the array.
This will remove all objects from the array that match a condition. If no such items are found, no action is taken.
predicate | the condition when to remove an item. Must be a callable type that takes an ElementType and returns a bool |
Definition at line 887 of file juce_Array.h.
|
inline |
Removes the last n elements from the array.
howManyToRemove | how many elements to remove from the end of the array |
Definition at line 936 of file juce_Array.h.
Referenced by juce::UndoManager::perform().
|
inline |
Removes a range of elements from the array.
This will remove a set of elements, starting from the given index, and move subsequent elements down to close the gap.
If the range extends beyond the bounds of the array, it will be safely clipped to the size of the array.
startIndex | the index of the first element to remove |
numberToRemove | how many elements should be removed |
Definition at line 916 of file juce_Array.h.
Referenced by juce::MidiBuffer::clear(), juce::SparseSet< Type >::invertRange(), juce::URL::removeEscapeChars(), juce::StringArray::removeRange(), juce::ArgumentList::removeValueForOption(), and juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::resize().
|
inline |
Removes any elements which are also in another array.
otherArray | the other array in which to look for elements to remove |
Definition at line 958 of file juce_Array.h.
|
inline |
Removes any elements which are not found in another array.
Only elements which occur in this other array will be retained.
otherArray | the array in which to look for elements NOT to remove |
Definition at line 986 of file juce_Array.h.
|
inline |
This will enlarge or shrink the array to the given number of elements, by adding or removing items from its end.
If the array is smaller than the given target size, empty elements will be appended until its size is as specified. If its size is larger than the target, items will be removed from its end to shorten it.
Definition at line 670 of file juce_Array.h.
Referenced by juce::dsp::FIR::Coefficients< NumericType >::Coefficients(), juce::dsp::WindowingFunction< FloatType >::fillWindowingTables(), juce::dsp::LookupTable< FloatType >::initialise(), juce::dsp::Oscillator< SampleType >::prepare(), and juce::var::resize().
|
inline |
Replaces an element with a new value.
If the index is less than zero, this method does nothing. If the index is beyond the end of the array, the item is added to the end of the array.
indexToChange | the index whose value you want to change |
newValue | the new value to set for this index. |
Definition at line 542 of file juce_Array.h.
Referenced by juce::MessageManager::Lock::abort(), juce::URL::addEscapeChars(), juce::HashMap< KeyType, ValueType, HashFunctionType, TypeOfCriticalSectionToUse >::clear(), juce::HashMap< KeyType, ValueType, HashFunctionType, TypeOfCriticalSectionToUse >::getReference(), juce::IPAddress::IPAddress(), juce::HashMap< KeyType, ValueType, HashFunctionType, TypeOfCriticalSectionToUse >::remapTable(), juce::HashMap< KeyType, ValueType, HashFunctionType, TypeOfCriticalSectionToUse >::remove(), juce::URL::removeEscapeChars(), juce::HashMap< KeyType, ValueType, HashFunctionType, TypeOfCriticalSectionToUse >::removeValue(), juce::StringArray::set(), juce::dsp::SIMDRegister< Type >::set(), juce::ChannelRemappingAudioSource::setInputChannelMapping(), and juce::ChannelRemappingAudioSource::setOutputChannelMapping().
|
inline |
Replaces an element with a new value without doing any bounds-checking.
This just sets a value directly in the array's internal storage, so you'd better make sure it's in range!
indexToChange | the index whose value you want to change |
newValue | the new value to set for this index. |
Definition at line 568 of file juce_Array.h.
Referenced by juce::dsp::Convolution::Pimpl::addToFifo(), juce::dsp::Convolution::Pimpl::addToFifo(), juce::dsp::FilterDesign< FloatType >::designFIRLowpassHalfBandEquirippleMethod(), and juce::dsp::Convolution::Pimpl::processFifo().
|
inlinenoexcept |
Returns the current number of elements in the array.
Definition at line 215 of file juce_Array.h.
Referenced by juce::SortedSet< ElementType, TypeOfCriticalSectionToUse >::add(), juce::StringArray::addArray(), juce::StringPairArray::addArray(), juce::AudioDeviceManager::addAudioDeviceType(), juce::OwnedArray< ObjectClass, TypeOfCriticalSectionToUse >::addCopiesOf(), juce::URL::addEscapeChars(), juce::MixerAudioSource::addInputSource(), juce::Value::addListener(), juce::ReferenceCountedArray< ObjectClass, TypeOfCriticalSectionToUse >::addOrReplaceSorted(), juce::SortedSet< ElementType, TypeOfCriticalSectionToUse >::addSet(), juce::OwnedArray< ObjectClass, TypeOfCriticalSectionToUse >::addSorted(), juce::ReferenceCountedArray< ObjectClass, TypeOfCriticalSectionToUse >::addSorted(), juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::addSorted(), juce::MPEChannelAssigner::allNotesOff(), juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::Array(), juce::AudioBuffer< Type >::AudioBuffer(), juce::HashMap< KeyType, ValueType, HashFunctionType, TypeOfCriticalSectionToUse >::clear(), juce::dsp::Matrix< ElementType >::clear(), juce::AudioBuffer< Type >::copyFrom(), juce::MidiMessageSequence::createControllerUpdatesForTime(), juce::ChannelRemappingAudioSource::createXml(), juce::DeletedAtShutdown::deleteAll(), juce::MidiMessageSequence::deleteEvent(), juce::MidiMessageSequence::deleteMidiChannelMessages(), juce::MidiMessageSequence::deleteSysExMessages(), juce::dsp::FilterDesign< FloatType >::designFIRLowpassHalfBandEquirippleMethod(), juce::ReadWriteLock::exitRead(), juce::BigInteger::extendedEuclidean(), juce::MPESynthesiser::findVoiceToSteal(), juce::Synthesiser::findVoiceToSteal(), juce::RelativeTime::getDescription(), juce::dsp::FIR::Coefficients< NumericType >::getFilterOrder(), juce::MidiBuffer::getFirstEventTime(), juce::IPAddress::getFormattedAddress(), juce::MidiBuffer::getLastEventTime(), juce::IIRFilterAudioSource::getNextAudioBlock(), juce::MixerAudioSource::getNextAudioBlock(), juce::MidiMessageSequence::getNextIndexAtTime(), juce::UndoManager::getNumActionsInCurrentTransaction(), juce::ValueTree::getNumChildren(), juce::TimeSliceThread::getNumClients(), juce::MidiMessageSequence::getNumEvents(), juce::ThreadPool::getNumJobs(), juce::AudioFormatManager::getNumKnownFormats(), juce::MPEInstrument::getNumPlayingNotes(), juce::dsp::LookupTable< FloatType >::getNumPoints(), juce::ValueTree::getNumProperties(), juce::SparseSet< Type >::getNumRanges(), juce::UnitTestRunner::getNumResults(), juce::HashMap< KeyType, ValueType, HashFunctionType, TypeOfCriticalSectionToUse >::getNumSlots(), juce::Synthesiser::getNumSounds(), juce::MidiFile::getNumTracks(), juce::MPESynthesiser::getNumVoices(), juce::Synthesiser::getNumVoices(), juce::dsp::Polynomial< FloatingType >::getOrder(), juce::dsp::Polynomial< FloatingType >::getProductWith(), juce::ChannelRemappingAudioSource::getRemappedInputChannel(), juce::ChannelRemappingAudioSource::getRemappedOutputChannel(), juce::dsp::Polynomial< FloatingType >::getSumWith(), juce::ArgumentList::getValueForOption(), juce::SortedSet< ElementType, TypeOfCriticalSectionToUse >::indexOf(), juce::NamedValueSet::indexOf(), juce::ArgumentList::indexOfOption(), juce::OwnedArray< ObjectClass, TypeOfCriticalSectionToUse >::indexOfSorted(), juce::ReferenceCountedArray< ObjectClass, TypeOfCriticalSectionToUse >::indexOfSorted(), juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::indexOfSorted(), juce::IPAddress::IPAddress(), juce::MidiBuffer::isEmpty(), juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::isEmpty(), juce::dsp::LookupTable< FloatType >::isInitialised(), juce::IIRFilterAudioSource::makeInactive(), juce::MidiMessage::MidiMessage(), juce::MPESynthesiser::noteReleased(), juce::dsp::Polynomial< FloatingType >::operator()(), juce::AudioBuffer< Type >::operator=(), juce::MemoryBlock::operator=(), juce::MidiMessage::operator=(), juce::MemoryBlock::operator=(), juce::MidiMessage::operator=(), juce::Value::operator=(), juce::MemoryBlock::operator==(), juce::NamedValueSet::operator==(), juce::StringPairArray::operator==(), juce::var::operator[](), juce::var::operator[](), juce::MPEInstrument::polyAftertouch(), juce::IIRFilterAudioSource::prepareToPlay(), juce::MixerAudioSource::prepareToPlay(), juce::dsp::Oscillator< SampleType >::process(), juce::MPESynthesiser::reduceNumVoices(), juce::ReferenceCountedArray< ObjectClass, TypeOfCriticalSectionToUse >::ReferenceCountedArray(), juce::ReferenceCountedArray< ObjectClass, TypeOfCriticalSectionToUse >::ReferenceCountedArray(), juce::Value::referTo(), juce::MPEInstrument::releaseAllNotes(), juce::MixerAudioSource::releaseResources(), juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::remove(), juce::NamedValueSet::remove(), juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::remove(), juce::ReferenceCountedArray< ObjectClass, TypeOfCriticalSectionToUse >::remove(), juce::OwnedArray< ObjectClass, TypeOfCriticalSectionToUse >::remove(), juce::MixerAudioSource::removeAllInputs(), juce::ThreadPool::removeAllJobs(), juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::removeAndReturn(), juce::OwnedArray< ObjectClass, TypeOfCriticalSectionToUse >::removeAndReturn(), juce::ReferenceCountedArray< ObjectClass, TypeOfCriticalSectionToUse >::removeAndReturn(), juce::AudioDeviceManager::removeAudioDeviceType(), juce::ChangeBroadcaster::removeChangeListener(), juce::URL::removeEscapeChars(), juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::removeLast(), juce::ReferenceCountedArray< ObjectClass, TypeOfCriticalSectionToUse >::removeLast(), juce::OwnedArray< ObjectClass, TypeOfCriticalSectionToUse >::removeLast(), juce::Value::removeListener(), juce::AudioDeviceManager::removeMidiInputDeviceCallback(), juce::SparseSet< Type >::removeRange(), juce::ArgumentList::removeValueForOption(), juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::removeValuesIn(), juce::SortedSet< ElementType, TypeOfCriticalSectionToUse >::removeValuesIn(), juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::removeValuesNotIn(), juce::SortedSet< ElementType, TypeOfCriticalSectionToUse >::removeValuesNotIn(), juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::resize(), juce::ChannelRemappingAudioSource::restoreFromXml(), juce::TimeSliceThread::run(), juce::ActionBroadcaster::sendActionMessage(), juce::Value::ValueSource::sendChangeMessage(), juce::ReferenceCountedArray< ObjectClass, TypeOfCriticalSectionToUse >::set(), juce::OwnedArray< ObjectClass, TypeOfCriticalSectionToUse >::set(), juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::set(), juce::AudioDeviceManager::setAudioDeviceSetup(), juce::IIRFilterAudioSource::setCoefficients(), juce::AudioDeviceManager::setCurrentAudioDeviceType(), juce::MPESynthesiser::setCurrentPlaybackSampleRate(), juce::AudioDeviceManager::setDefaultMidiOutputDevice(), juce::ChannelRemappingAudioSource::setInputChannelMapping(), juce::ChannelRemappingAudioSource::setOutputChannelMapping(), juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::setUnchecked(), juce::var::size(), juce::ArgumentList::size(), juce::ListenerList< ListenerClass, ArrayType >::size(), juce::NamedValueSet::size(), juce::OwnedArray< ObjectClass, TypeOfCriticalSectionToUse >::size(), juce::ReferenceCountedArray< ObjectClass, TypeOfCriticalSectionToUse >::size(), juce::SortedSet< ElementType, TypeOfCriticalSectionToUse >::size(), juce::StringArray::size(), juce::StringPairArray::size(), juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::sort(), juce::ReferenceCountedArray< ObjectClass, TypeOfCriticalSectionToUse >::swap(), juce::MemoryBlock::swapWith(), juce::MidiMessageSequence::updateMatchedPairs(), juce::Value::Value(), juce::URL::withParameters(), juce::DynamicObject::writeAsJSON(), juce::ZipFile::Builder::writeToStream(), and juce::ReadWriteLock::~ReadWriteLock().
|
inline |
Sorts the array using a default comparison operation. If the type of your elements isn't supported by the DefaultElementComparator class then you may need to use the other version of sort, which takes a custom comparator.
Definition at line 1073 of file juce_Array.h.
Referenced by juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::sort(), and juce::ValueTree::sort().
|
inline |
Sorts the elements in the array.
This will use a comparator object to sort the elements into order. The object passed must have a method of the form:
..and this method must return:
To improve performance, the compareElements() method can be declared as static or const.
comparator | the comparator to use for comparing elements. |
retainOrderOfEquivalentItems | if this is true, then items which the comparator says are equivalent will be kept in the order in which they currently appear in the array. This is slower to perform, but may be important in some cases. If it's false, a faster algorithm is used, but equivalent elements may be rearranged. |
Definition at line 1106 of file juce_Array.h.
|
inline |
Swaps over two elements in the array.
This swaps over the elements found at the two indexes passed in. If either index is out-of-range, this method will do nothing.
index1 | index of one of the elements to swap |
index2 | index of the other element to swap |
Definition at line 1014 of file juce_Array.h.
|
inlinenoexcept |
This swaps the contents of this array with those of another array.
If you need to exchange two arrays, this is vastly quicker than using copy-by-value because it just swaps their internal pointers.
Definition at line 621 of file juce_Array.h.
Referenced by juce::BigInteger::extendedEuclidean(), juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::operator=(), juce::HashMap< KeyType, ValueType, HashFunctionType, TypeOfCriticalSectionToUse >::remapTable(), juce::AudioDeviceManager::setDefaultMidiOutputDevice(), juce::ArrayAllocationBase< ElementType, TypeOfCriticalSectionToUse >::swapWith(), juce::BigInteger::swapWith(), juce::MidiBuffer::swapWith(), juce::OptionalScopedPointer< ObjectType >::swapWith(), juce::HashMap< KeyType, ValueType, HashFunctionType, TypeOfCriticalSectionToUse >::swapWith(), juce::SortedSet< ElementType, TypeOfCriticalSectionToUse >::swapWith(), and juce::StringArray::swapWith().
|
inline |
Definition at line 1137 of file juce_Array.h.