AlignedBuffer

Growable array, points to a memory aligned location. This can also work as an output range.

Constructors

this
this(size_t initialSize, int alignment)

Creates an aligned buffer with given initial size.

Destructor

~this
~this()
Undocumented in source.

Postblit

this(this)
this(this)
Undocumented in source.

Members

Aliases

opDollar
alias opDollar = length
put
alias put = pushBack
Undocumented in source.

Functions

clearContents
void clearContents()

Sets size to zero.

fill
void fill(T x)

Fills the buffer with the same value.

indexOf
int indexOf(T x)

Finds an item, returns -1 if not found

length
size_t length()
opIndex
inout(T) opIndex(size_t i)
Undocumented in source. Be warned that the author may not have intended to support it.
opIndexAssign
T opIndexAssign(T x, size_t i)
Undocumented in source. Be warned that the author may not have intended to support it.
opSlice
inout(T)[] opSlice()
opSlice
inout(T)[] opSlice(size_t i1, size_t i2)
popBack
T popBack()

Pop last element

pushBack
void pushBack(T x)

Append an element to this buffer.

pushBack
void pushBack(AlignedBuffer other)

Appends another buffer to this buffer.

pushBack
void pushBack(T[] slice)

Appends a slice to this buffer.

releaseData
T[] releaseData()

Move. Give up owner ship of the data.

removeAndReplaceByLastElement
void removeAndReplaceByLastElement(size_t index)

Removes an item and replaces it by the last item. Warning: this reorders the array.

resize
void resize(size_t askedSize)

Resizes a buffer to hold askedSize elements.

Properties

ptr
inout(T)* ptr [@property getter]

Bugs

make this class disappear when std.allocator is out.

Meta