MergeArray

An array-based implementation of a Bag for use by a Handle.

Constructors

this
this(H parent, size_t width, ObjArgs args)

Construct a new MergeArray, allocating on the GC heap.

Members

Aliases

ElementType
alias ElementType = Obj

The type of the contained sequential data structure.

H
alias H = Handle!(shared MergeArray)

The type of Handle which MergeArray expects to be underneath.

Functions

canMergeWith
bool canMergeWith(shared(MergeArray)* other)

Tests whether or not this is merge-compatible (has the same width) as other.

mergePerElementInto
void mergePerElementInto(H dest)

Merges all Objs in this MergeArray into the MergeArray referenced by dest.

tryApplyEachUntil
bool tryApplyEachUntil(bool delegate(Obj*) dg)

Applies dg to each element in cyclic fashion until it returns true or the MergeArray is disrupted by a merge.

tryApplyUntil
bool tryApplyUntil(bool delegate(Obj*) dg)
Undocumented in source. Be warned that the author may not have intended to support it.

Properties

width
size_t width [@property getter]

Static functions

fixedAllocSize
size_t fixedAllocSize(size_t width)
makeWith
shared(MergeArray)* makeWith(H parent, size_t width, ObjArgs args)

Static factory method using Alloc to allocate a new shared MergeArray.

Meta