CyclicArray

Cyclic array-like container.

Set capacity_ to size_t.max for array with dynamic length.

TODO: replace PAGESIZE / T.sizeof with standard logic and Allocator TODO: replace throw staticError!CyclicRangeError with onRangeError

Constructors

this
this(Array!T array)
Undocumented in source.
this
this(size_t length)
Undocumented in source.
this
this(T[n] val)
Undocumented in source.
this
this(Range val)
Undocumented in source.
this
this(Args val)
Undocumented in source.
this
this(T[n] val)
Undocumented in source.
this
this(Range val)
Undocumented in source.
this
this(Args val)
Undocumented in source.

Members

Aliases

capacity
alias capacity = capacity_
Undocumented in source.

Functions

byRef
CyclicRange!T byRef()
Undocumented in source.
clear
void clear()
Undocumented in source. Be warned that the author may not have intended to support it.
dup
CyclicArray!(T, capacity_) dup()
Undocumented in source. Be warned that the author may not have intended to support it.
dup
CyclicArray!(T, capacity_) dup()
Undocumented in source. Be warned that the author may not have intended to support it.
length
size_t length()
Undocumented in source.
length
size_t length(size_t val)
Undocumented in source. Be warned that the author may not have intended to support it.
opApply
int opApply(int delegate(ref T) @(nogc) dg)
Undocumented in source. Be warned that the author may not have intended to support it.
opApply
int opApply(int delegate(size_t, ref T) @(nogc) dg)
Undocumented in source. Be warned that the author may not have intended to support it.
opBinary
auto opBinary(T rhs)
Undocumented in source. Be warned that the author may not have intended to support it.
opBinary
auto opBinary(T[n] rhs)
Undocumented in source. Be warned that the author may not have intended to support it.
opBinary
auto opBinary(Range rhs)
Undocumented in source. Be warned that the author may not have intended to support it.
opEquals
bool opEquals(CyclicArray!(T, capacity_) b)
Undocumented in source. Be warned that the author may not have intended to support it.
opEquals
bool opEquals(T[n] b)
Undocumented in source. Be warned that the author may not have intended to support it.
opEquals
bool opEquals(Range b)
Undocumented in source. Be warned that the author may not have intended to support it.
opOpAssign
void opOpAssign(T rhs)
Undocumented in source. Be warned that the author may not have intended to support it.
opOpAssign
void opOpAssign(T[n] rhs)
Undocumented in source. Be warned that the author may not have intended to support it.
opOpAssign
void opOpAssign(CyclicArray!(T, n) rhs)
Undocumented in source. Be warned that the author may not have intended to support it.
opOpAssign
void opOpAssign(Range rhs)
Undocumented in source. Be warned that the author may not have intended to support it.

Manifest constants

isDynamic
enum isDynamic;
Undocumented in source.

Mixins

__anonymous
mixin CyclicRangePrimitives!(T, q{ static if (capacity_ == size_t.max) auto copy = typeof(cast() this)(array.length); else typeof(cast() this) copy; })
Undocumented in source.

Mixed In Members

From mixin CyclicRangePrimitives!(T, q{ static if (capacity_ == size_t.max) auto copy = typeof(cast() this)(array.length); else typeof(cast() this) copy; })

capacity
size_t capacity()
Undocumented in source.
length
size_t length()
Undocumented in source.
put
void put(T val)
Undocumented in source. Be warned that the author may not have intended to support it.
put
void put(T val)
void put(T[n] rhs)
void put(Range rhs)
opOpAssign
alias opOpAssign(string op : "~") = put

ditto

insertBack
alias insertBack = put
Undocumented in source.
stableInsertBack
alias stableInsertBack = insertBack
Undocumented in source.
insertFront
void insertFront(T val)
Undocumented in source. Be warned that the author may not have intended to support it.
popFront
void popFront()
Undocumented in source. Be warned that the author may not have intended to support it.
save
auto save()
Undocumented in source. Be warned that the author may not have intended to support it.
empty
bool empty()
Undocumented in source. Be warned that the author may not have intended to support it.
front
auto ref front()
Undocumented in source. Be warned that the author may not have intended to support it.
popBack
void popBack()
Undocumented in source. Be warned that the author may not have intended to support it.
back
auto ref back()
Undocumented in source. Be warned that the author may not have intended to support it.
back
auto back()
Undocumented in source. Be warned that the author may not have intended to support it.
opDollar
size_t opDollar()
Undocumented in source. Be warned that the author may not have intended to support it.
opIndex
inout(T) opIndex(size_t v)
Undocumented in source. Be warned that the author may not have intended to support it.
opIndex
auto opIndex()
Undocumented in source. Be warned that the author may not have intended to support it.
opIndex
auto opIndex(size_t[2] range)
Undocumented in source. Be warned that the author may not have intended to support it.
opIndexUnary
void opIndexUnary()
Undocumented in source. Be warned that the author may not have intended to support it.
opIndexUnary
auto opIndexUnary(size_t i)
Undocumented in source. Be warned that the author may not have intended to support it.
opIndexUnary
void opIndexUnary(size_t[2] range)
Undocumented in source. Be warned that the author may not have intended to support it.
opIndexAssign
void opIndexAssign(U val)
Undocumented in source. Be warned that the author may not have intended to support it.
opIndexAssign
void opIndexAssign(U val, size_t i)
Undocumented in source. Be warned that the author may not have intended to support it.
opIndexAssign
void opIndexAssign(U val, size_t[2] range)
Undocumented in source. Be warned that the author may not have intended to support it.
opIndexOpAssign
void opIndexOpAssign(U val)
Undocumented in source. Be warned that the author may not have intended to support it.
opIndexOpAssign
void opIndexOpAssign(U val, size_t i)
Undocumented in source. Be warned that the author may not have intended to support it.
opIndexOpAssign
void opIndexOpAssign(U val, size_t[2] range)
Undocumented in source. Be warned that the author may not have intended to support it.
moveFront
T moveFront()
Undocumented in source. Be warned that the author may not have intended to support it.
moveBack
T moveBack()
Undocumented in source. Be warned that the author may not have intended to support it.
moveAt
T moveAt(size_t i)
Undocumented in source. Be warned that the author may not have intended to support it.
opSlice
size_t[2] opSlice()
Undocumented in source. Be warned that the author may not have intended to support it.
opSlice
size_t[2] opSlice(size_t from, size_t to)
Undocumented in source. Be warned that the author may not have intended to support it.
removeAny
T removeAny()

Removes the last element from the array and returns it. Both stable and non-stable versions behave the same and guarantee that ranges iterating over the array are never invalidated.

stableRemoveAny
alias stableRemoveAny = removeAny
Undocumented in source.
removeBack
void removeBack()
stableRemoveBack
alias stableRemoveBack = removeBack

Removes the value from the back of the array. Both stable and non-stable versions behave the same and guarantee that ranges iterating over the array are never invalidated.

removeBack
void removeBack(int howMany)
Undocumented in source. Be warned that the author may not have intended to support it.

See Also

nxt.container.sorted.Sorted.

Meta