Deluge Firmware 1.3.0
Build date: 2026.10.14
Loading...
Searching...
No Matches
LazyParamNodeVector Class Reference

#include <param_node_vector.h>

Collaboration diagram for LazyParamNodeVector:

Public Member Functions

 LazyParamNodeVector (LazyParamNodeVector const &)=delete
LazyParamNodeVector & operator= (LazyParamNodeVector const &)=delete
void init ()
 Forget the current vector without freeing it - for when this object was memcpy'd from another one.
void empty ()
 Free the vector and all its nodes.
bool cloneFrom (LazyParamNodeVector const *other)
 Like ResizeableArray::cloneFrom(), this assumes there's currently nothing here to free.
Error beenCloned ()
 Call after this object was memcpy'd from another one, to give it its own copy of the nodes.
void swapStateWith (LazyParamNodeVector *other)
ParamNodeVector * get ()
 The underlying vector, or nullptr if there are no nodes.
int32_t getNumElements () const
ParamNode * getElement (int32_t index)
ParamNode * getFirst ()
ParamNode * getLast ()
void * getElementAddress (int32_t index)
int32_t search (int32_t key, int32_t comparison, int32_t rangeBegin=0)
int32_t search (int32_t key, int32_t comparison, int32_t rangeBegin, int32_t rangeEnd)
int32_t searchExact (int32_t key)
void searchDual (int32_t const *__restrict__ searchTerms, int32_t *__restrict__ resultingIndexes)
void testSequentiality (char const *errorCode)
Error insertAtIndex (int32_t i, int32_t numToInsert=1, void *thingNotToStealFrom=nullptr)
int32_t insertAtKey (int32_t key, bool isDefinitelyLast=false)
bool ensureEnoughSpaceAllocated (int32_t numAdditionalElementsNeeded)
void deleteAtIndex (int32_t i, int32_t numToDelete=1, bool mayShortenMemoryAfter=true)
void shiftHorizontal (int32_t amount, int32_t effectiveLength)
bool generateRepeats (int32_t wrapPoint, int32_t endPos)

Private Member Functions

bool allocate ()
void freeIfEmpty ()

Private Attributes

ParamNodeVector * vector_ = nullptr

Detailed Description

Owns a ParamNodeVector that is only allocated once the first node is added, and freed again once the last node is removed. An un-automated AutoParam therefore costs one pointer instead of a whole (empty) ParamNodeVector, which matters because every Sound has well over a hundred AutoParams per Clip.

The interface mirrors the subset of ParamNodeVector that AutoParam uses, including its "memcpy then init() or beenCloned()" cloning convention, so read-only calls on an unallocated vector behave exactly as on an empty one.


The documentation for this class was generated from the following files:
  • src/deluge/modulation/params/param_node_vector.h
  • src/deluge/modulation/params/param_node_vector.cpp