Struct FixedRingBuffer
struct FixedRingBuffer(T, ulong N = 0, bool INITIALIZE = true)
;
Constructors
Name | Description |
---|---|
this
(capacity)
|
Fields
Name | Type | Description |
---|---|---|
m_buffer
|
T[N] | |
m_fill
|
size_t | |
m_start
|
size_t |
Properties
Name | Type | Description |
---|---|---|
back [get]
|
inout(T) | |
capacity [get]
|
size_t | |
capacity [set]
|
size_t | |
empty [get]
|
bool | |
freeSpace [get]
|
size_t | |
front [get]
|
inout(T) | |
full [get]
|
bool | |
length [get]
|
size_t |
Methods
Name | Description |
---|---|
clear
()
|
|
dispose
()
|
Resets the capacity to zero and explicitly frees the memory for the buffer. |
mod
(n)
|
|
opApply
(del)
|
|
opApply
(del)
|
iterate through elements with index |
opDollar
()
|
|
opIndex
(idx)
|
|
opSlice
()
|
|
opSlice
(from, to)
|
|
peek
()
|
|
peekDst
()
|
|
popBack
()
|
|
popBackN
(n)
|
|
popFront
()
|
|
popFrontN
(n)
|
|
putBack
(itm)
|
|
putBack
(itms)
|
|
putBackN
(n)
|
|
putFront
(itm)
|
|
read
(dst)
|
|
removeAt
(r)
|
Inner structs
Name | Description |
---|---|
Range
|
Aliases
Name | Description |
---|---|
put
|
|
putN
|
TODO
clear ring buffer fields upon removal (to run struct destructors, if T is a struct)