Click or drag to resize

RingBufferT Class

Represents a generic ring buffer. This class is not thread safe.
Inheritance Hierarchy
SystemObject
  Altaxo.CollectionsRingBufferT

Namespace: Altaxo.Collections
Assembly: AltaxoCore (in AltaxoCore.dll) Version: 4.8.3179.0 (4.8.3179.0)
Syntax
C#
public class RingBuffer<T>

Type Parameters

T
Type of elements to store in the ring buffer.

The RingBufferT type exposes the following members.

Constructors
 NameDescription
Public methodRingBufferT Initializes a new instance of the RingBufferT class.
Top
Properties
 NameDescription
Public propertyCount Gets the number of elements in the ring buffer.
Public propertyIsEmpty Gets a value indicating whether this instance is empty.
Top
Methods
 NameDescription
Public methodAdd(FuncT, Int32, Int32, Int32) Adds items to the buffer by using a read function that reads such items. For instance, Read(Byte, Int32, Int32) is such a function.
Public methodAdd(T) Adds the specified item to the buffer.
Public methodClear Clears (empties) the ring buffer.
Public methodEnumerateFourItems Enumerates four items at a time. The forward step is nevertheless 1, i.e. in the next yield the second item is now the first one.
Public methodEnumerateFourItems(Int32) Enumerates four items at a time.
Public methodEnumerateOneItem Enumerates one single item at a time.
Public methodEnumerateOneItem(Int32) Enumerates one single item at a time.
Public methodEnumerateThreeItems Enumerates three items at a time. The forward step is nevertheless 1, i.e. in the next yield the second item is now the first one.
Public methodEnumerateThreeItems(Int32) Enumerates three items at a time.
Public methodEnumerateTwoItems Enumerates two items at a time. The forward step is nevertheless 1, i.e. in the next yield the second item is now the first one.
Public methodEnumerateTwoItems(Int32) Enumerates two items at a time.
Public methodEqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
Public methodFourItemsAt Gets the four items at index, index+1, index+2, and index+3.
Public methodGetHashCodeServes as the default hash function.
(Inherited from Object)
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Public methodItemAt Gets the item at index. The index zero refers to the oldest item in the buffer, 1 to the second oldest item, etc.
Protected methodMemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
Public methodRemoveItems Removes the n oldest items from the buffer.
Public methodThreeItemsAt Gets the three items at index, index+1, and index+2.
Public methodToStringReturns a string that represents the current object.
(Inherited from Object)
Public methodTryPeek Try the peek an item.
Public methodTryRemove Try the remove an item from the buffer.
Public methodTwoItemsAt Gets the two items at index index and index+1.
Top
See Also