AsmJit
Low-Latency Machine Code Generation
Template used to store and manage array of Zone allocated data.
This template has these advantages over other std::vector<>:
Returns vector data.
Returns vector data (const)
Returns item at the given index i
(const).
Swaps this vector with other
.
Prepends item
to the vector.
Inserts an item
at the specified index
.
Appends item
to the vector.
Appends other
vector at the end of this vector.
Prepends item
to the vector (unsafe case).
Can only be used together with willGrow()
. If willGrow(N)
returns kErrorOk
then N elements can be added to the vector without checking if there is a place for them. Used mostly internally.
Append sitem
to the vector (unsafe case).
Can only be used together with willGrow()
. If willGrow(N)
returns kErrorOk
then N elements can be added to the vector without checking if there is a place for them. Used mostly internally.
Inserts an item
at the specified index
(unsafe case).
Concatenates all items of other
at the end of the vector.
Returns index of the given val
or Globals::kNotFound
if it doesn't exist.
Tests whether the vector contains val
.
Removes item at index i
.
Pops the last element from the vector and returns it.
Returns item at index i
.
Returns item at index i
.
Returns a reference to the first element of the vector.
first()
on empty vector will trigger an assertion failure in debug builds. This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Returns a reference to the last element of the vector.
last()
on empty vector will trigger an assertion failure in debug builds. This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Releases the memory held by ZoneVector<T>
back to the allocator
.
Called to grow the buffer to fit at least n
elements more.
Resizes the vector to hold n
elements.
If n
is greater than the current size then the additional elements' content will be initialized to zero. If n
is less than the current size then the vector will be truncated to exactly n
elements.
Reallocates the internal array to fit at least n
items.
Reallocates the internal array to fit at least n
items with growing semantics.
If the vector is smaller than n
the same growing calculations will be used as if N items were appended to an empty vector, which means reserving additional space for more append operations that could follow.