Search Results for

    Show / Hide Table of Contents

    Class RenderListBuffer

    Template for dynamic array with variable capacity that support concurrent elements appending (atomic add).

    Inheritance
    RenderListBuffer
    Inherited Members
    RenderListBuffer
    RenderListBuffer
    Assembly: FlaxEngine.dll
    File: Engine/Renderer/RenderListBuffer.h
    Syntax
    public class RenderListBuffer<T, AllocationType>
    Type Parameters
    T

    The type of elements in the array.

    AllocationType

    The type of memory allocator.

    Constructors

    ~RenderListBuffer()

    Finalizes an instance of the RenderListBuffer class.

    Declaration
    public ~RenderListBuffer()

    RenderListBuffer(const RenderListBuffer& other)

    Initializes a new instance of the RenderListBuffer class.

    Declaration
    public RenderListBuffer(const RenderListBuffer& other)
    Parameters
    RenderListBuffer other

    The other collection to copy.

    RenderListBuffer(const T* data, const int32 length)

    Initializes Array by copying elements.

    Declaration
    public RenderListBuffer(const T* data, const int32 length)
    Parameters
    T data

    The initial data.

    int32 length

    The amount of items.

    RenderListBuffer(RenderListBuffer&& other)

    Initializes a new instance of the RenderListBuffer class.

    Declaration
    public RenderListBuffer(RenderListBuffer&& other) noexcept
    Parameters
    RenderListBuffer other

    The other collection to move.

    Methods

    Add(const T& item)

    Adds the specified item to the collection.

    Declaration
    public int32 Add(const T& item)
    Parameters
    T item

    The item to add.

    Returns
    int32

    Index of the added element.

    Add(T&& item)

    Adds the specified item to the collection.

    Declaration
    public int32 Add(T&& item)
    Parameters
    T item

    The item to add.

    Returns
    int32

    Index of the added element.

    begin()

    Declaration
    public T* begin()
    Returns
    T

    Capacity()

    Gets the amount of the items that can be contained by collection without resizing.

    Declaration
    public int32 Capacity() const
    Returns
    int32

    Clear()

    Clear the collection without changing its capacity.

    Declaration
    public void Clear()

    Count()

    Gets the amount of the items in the collection.

    Declaration
    public int32 Count() const
    Returns
    int32

    end()

    Declaration
    public T* end()
    Returns
    T

    EnsureCapacity(const int32 minCapacity)

    Ensures the collection has given capacity (or more).

    Declaration
    public void EnsureCapacity(const int32 minCapacity)
    Parameters
    int32 minCapacity

    The minimum capacity.

    Get()

    Gets the pointer to the first item in the collection (linear allocation).

    Declaration
    public T* Get()
    Returns
    T

    Locker()

    Gets the critical section locking the collection during resizing.

    Declaration
    public CriticalSection Locker() const
    Returns
    CriticalSection

    operator[](const int32 index)

    Gets or sets the item at the given index.

    Declaration
    public T operator[](const int32 index)
    Parameters
    int32 index

    Returns
    T

    The reference to the item.

    operator=(const RenderListBuffer& other)

    The assignment operator that deletes the current collection of items and the copies items from the other array.

    Declaration
    public RenderListBuffer operator=(const RenderListBuffer& other) noexcept
    Parameters
    RenderListBuffer other

    The other collection to copy.

    Returns
    RenderListBuffer

    The reference to this.

    operator=(RenderListBuffer&& other)

    The move assignment operator that deletes the current collection of items and the moves items from the other array.

    Declaration
    public RenderListBuffer operator=(RenderListBuffer&& other) noexcept
    Parameters
    RenderListBuffer other

    The other collection to move.

    Returns
    RenderListBuffer

    The reference to this.

    RenderListBuffer()

    Initializes an empty RenderListBuffer without reserving any space.

    Declaration
    public RenderListBuffer()
    Returns
    FORCE_INLINE

    Resize(const int32 size, const bool preserveContents=true)

    Resizes the collection to the specified size. If the size is equal or less to the current capacity no additional memory reallocation in performed.

    Declaration
    public void Resize(const int32 size, const bool preserveContents=true)
    Parameters
    int32 size

    The new collection size.

    bool preserveContents

    True if preserve collection data when changing its size, otherwise collection after resize might not contain the previous data.

    SetCapacity(const int32 capacity, const bool preserveContents=true)

    Changes the capacity of the collection.

    Declaration
    public void SetCapacity(const int32 capacity, const bool preserveContents=true)
    Parameters
    int32 capacity

    The new capacity.

    bool preserveContents

    True if preserve collection data when changing its size, otherwise collection after resize will be empty.

    • Improve this Doc
    • View Source
    In This Article
    Back to top Copyright © 2012-2024 Wojciech Figat