Struct CircularBuffer

Public

Implements an efficient circular buffer that can be appended to in both directions.

Public Methods

AddRange (items)
Public
CircularBuffer (initialCapacity)
Public
CircularBuffer (backingArray)
Public
Clear ()
Public
GetAbsolute (index)

Indexes the buffer using absolute indices.

Public
GetBoundaryValue (start)

Return either the first element or the last element.

Public
Grow ()
Public
MakeContiguous (data, startIndex)

Rotates the data (if necessary) so that all items are contiguous in memory.

Public
Pool ()

Release the backing array of this buffer back into an array pool.

Public
Pop (fromStart)

Pops either from the start or from the end of the buffer.

Public
PopEnd ()

Removes and returns the last element.

Public
PopStart ()

Removes and returns the first element.

Public
Push (item, toStart)

Pushes a new item to the start or the end of the buffer.

Public
PushEnd (item)

Pushes a new item to the end of the buffer.

Public
PushStart (item)

Pushes a new item to the start of the buffer.

Public

Public Variables

AbsoluteEndIndex
Public
AbsoluteStartIndex
Public
First
Public
Last
Public
Length
Public
data
Public
head
Public
length
Public
this[int index]

Indexes the buffer, with index 0 being the first element.

Public