Table of Contents

Class SimpleRingBuffer<T>

Namespace
HelixToolkit.SharpDX.Utilities
Assembly
HelixToolkit.SharpDX.dll

A simple curcular ring buffer implementation

public sealed class SimpleRingBuffer<T>

Type Parameters

T
Inheritance
SimpleRingBuffer<T>
Inherited Members

Constructors

SimpleRingBuffer(int)

Constructor

public SimpleRingBuffer(int size)

Parameters

size int

Properties

Count

public int Count { get; }

Property Value

int

First

Get first added element

public T? First { get; }

Property Value

T

this[int]

public T? this[int i] { get; }

Parameters

i int

Property Value

T

Last

Get last added element

public T? Last { get; }

Property Value

T

Methods

Add(T)

public void Add(T item)

Parameters

item T

Clear()

Reset

public void Clear()

IsEmpty()

If buffer is empty

public bool IsEmpty()

Returns

bool

IsFull()

If buffer is full

public bool IsFull()

Returns

bool

RemoveFirst()

Remove the first element added into the buffer

public bool RemoveFirst()

Returns

bool

RemoveLast()

Remove the last element added into the buffer

public bool RemoveLast()

Returns

bool