Search Results for

    Show / Hide Table of Contents

    Struct ConcurrentCircularBuffer<T>

    A concurrent sized buffer which loops back over itself as elements are used.

    Namespace: GDX.Collections.Generic
    Syntax
    [VisualScriptingCompatible((short)1)]
    public struct ConcurrentCircularBuffer<T>
    Type Parameters
    Name Description
    T

    The type of System.Objects contained within.

    Constructors

    | Improve this Doc View Source

    ConcurrentCircularBuffer(Int32)

    Create a ConcurrentCircularBuffer<T> with a capacity.

    Declaration
    public ConcurrentCircularBuffer(int capacity)
    Parameters
    Type Name Description
    System.Int32 capacity

    The maximum number of items allowed in the ConcurrentCircularBuffer<T>

    | Improve this Doc View Source

    ConcurrentCircularBuffer(Int32, T[])

    Create a ConcurrentCircularBuffer<T> with a capacity, filling with targetItems.

    Declaration
    public ConcurrentCircularBuffer(int capacity, T[] targetItems)
    Parameters
    Type Name Description
    System.Int32 capacity

    The maximum number of items allowed in the ConcurrentCircularBuffer<T>

    T[] targetItems

    An array of values to fill the ConcurrentCircularBuffer<T> with.

    Exceptions
    Type Condition
    System.ArgumentException

    Invalid number of entries provided to the ConcurrentCircularBuffer<T> constructor.

    System.ArgumentNullException

    No items were provided to the ConcurrentCircularBuffer<T> constructor.

    Fields

    | Improve this Doc View Source

    Array

    Internal array of backed data for the ConcurrentCircularBuffer<T>.

    Declaration
    public readonly T[] Array
    Field Value
    Type Description
    T[]
    | Improve this Doc View Source

    Capacity

    The cached array length for Array.

    Declaration
    public readonly int Capacity
    Field Value
    Type Description
    System.Int32
    | Improve this Doc View Source

    Count

    The current size of occupied elements in the ConcurrentCircularBuffer<T>.

    Declaration
    public int Count
    Field Value
    Type Description
    System.Int32
    Remarks

    CAUTION! Changing this will alter the understanding of the data.

    | Improve this Doc View Source

    EndIndex

    The index of the last item in Array.

    Declaration
    public int EndIndex
    Field Value
    Type Description
    System.Int32
    Remarks

    CAUTION! Changing this will alter the understanding of the data.

    | Improve this Doc View Source

    StartIndex

    The index of the first item in Array.

    Declaration
    public int StartIndex
    Field Value
    Type Description
    System.Int32
    Remarks

    CAUTION! Changing this will alter the understanding of the data.

    Properties

    | Improve this Doc View Source

    Item[Int32]

    Access item at pseudoIndex.

    Declaration
    public T this[int pseudoIndex] { get; set; }
    Parameters
    Type Name Description
    System.Int32 pseudoIndex
    Property Value
    Type Description
    T
    Exceptions
    Type Condition
    System.IndexOutOfRangeException

    Provided index is out of buffers range.

    Methods

    | Improve this Doc View Source

    Add(T)

    Add an item to the Array.

    Declaration
    public void Add(T item)
    Parameters
    Type Name Description
    T item

    The typed System.Object to add.

    | Improve this Doc View Source

    Clear()

    Clear all values of the Array.

    Declaration
    public void Clear()
    | Improve this Doc View Source

    GetBack()

    Get the last item in the Array.

    Declaration
    public T GetBack()
    Returns
    Type Description
    T

    The last typed object in Array.

    | Improve this Doc View Source

    GetFront()

    Get the first item in the Array.

    Declaration
    public T GetFront()
    Returns
    Type Description
    T

    The first typed object in Array.

    | Improve this Doc View Source

    IsEmpty()

    Does the Array have any items in it?

    Declaration
    public bool IsEmpty()
    Returns
    Type Description
    System.Boolean

    true/false

    | Improve this Doc View Source

    IsFull()

    Is the Array at capacity?

    Declaration
    public bool IsFull()
    Returns
    Type Description
    System.Boolean

    true/false

    | Improve this Doc View Source

    PopBack()

    Remove an item from the end of the Array.

    Declaration
    public void PopBack()
    | Improve this Doc View Source

    PopFront()

    Remove an item from the start of the Array.

    Declaration
    public void PopFront()
    | Improve this Doc View Source

    PushBack(T)

    Add an item to the end of the Array.

    Declaration
    public void PushBack(T targetItem)
    Parameters
    Type Name Description
    T targetItem

    The item to add to the end of Array.

    | Improve this Doc View Source

    PushFront(T)

    Add an item to the start of the Array.

    Declaration
    public void PushFront(T targetItem)
    Parameters
    Type Name Description
    T targetItem

    The item to add to the start of Array.

    | Improve this Doc View Source

    ToArray()

    Copy Array to an array of the same type.

    Declaration
    public T[] ToArray()
    Returns
    Type Description
    T[]

    A copied version of the Array as an array.

    • Improve this Doc
    • View Source
    In This Article
    Back to top Built on 2024-01-01 against 1f69a68.
    Generated by Dox+DocFX.