Hex Terrains Framework
Search Results for

    Show / Hide Table of Contents

    Class NativeListDataLayer<TItem>

    Base class for all data layers that are based on NativeList{T}.

    Inheritance
    object
    DataLayer
    NativeListDataLayer<TItem>
    ByteAreaSizesDataLayer
    Implements
    IDisposable
    ICommitChanges
    IListDataLayer<TItem>
    Inherited Members
    DataLayer.IsDisposableItems
    DataLayer._readJobsDependency
    DataLayer.ReadDependency
    DataLayer._writeJobsDependency
    DataLayer.WriteDependency
    DataLayer.CombinedDependency
    DataLayer._isDirty
    DataLayer.IsDirty
    DataLayer._version
    DataLayer.Version
    DataLayer.AddReadDependency(JobHandle)
    DataLayer.AddWriteDependency(JobHandle)
    DataLayer.SetReadDependency(JobHandle)
    DataLayer.SetWriteDependency(JobHandle)
    DataLayer.PrepareToWrite()
    DataLayer.PrepareToRead()
    DataLayer.OpenToRead()
    DataLayer.OpenToWrite()
    DataLayer.CompleteReadJobs()
    DataLayer.CompleteWriteJobs()
    DataLayer.CompleteAllJobs()
    DataLayer.CommitChanges()
    DataLayer.SetDirty(bool)
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Fwt.Core.DataLayers
    Assembly: fwt.core.dll
    Syntax
    public abstract class NativeListDataLayer<TItem> : DataLayer, IDisposable, ICommitChanges, IListDataLayer<TItem> where TItem : unmanaged
    Type Parameters
    Name Description
    TItem

    Fields

    _data

    Declaration
    protected NativeList<TItem> _data
    Field Value
    Type Description
    NativeList<TItem>

    Properties

    Data

    Container for data in the layer.

    Declaration
    public NativeList<TItem> Data { get; }
    Property Value
    Type Description
    NativeList<TItem>

    Length

    Returns the number of items in the layer.

    Declaration
    public override int Length { get; }
    Property Value
    Type Description
    int
    Overrides
    DataLayer.Length

    Methods

    Dispose()

    Disposes the data layer and all items in it by calling DisposeAllItems() DisposeAllItems()

    Declaration
    public override void Dispose()
    Overrides
    DataLayer.Dispose()

    DisposeAllItems()

    Disposes all items in the layer by calling DisposeDataItem() for each DisposeDataItem(TItem)

    Declaration
    public override void DisposeAllItems()
    Overrides
    DataLayer.DisposeAllItems()

    DisposeDataItem(TItem)

    Disposes the data item if it is IDisposable.

    Declaration
    protected virtual void DisposeDataItem(TItem item)
    Parameters
    Type Name Description
    TItem item

    DisposeExcessItems(int)

    When layer is resized, this method is called to dispose items in cells of index greater than layerSize.

    Declaration
    public virtual void DisposeExcessItems(int layerSize)
    Parameters
    Type Name Description
    int layerSize

    GetData(int)

    Gets the data at the specified index.

    Declaration
    public virtual TItem GetData(int index)
    Parameters
    Type Name Description
    int index

    index to get data under

    Returns
    Type Description
    TItem

    data from the cell at provided index

    Init(int, Allocator)

    Initializes/Reinitializes the data layer with the specified size.

    Declaration
    public virtual void Init(int layerSize, Allocator allocator = Allocator.Persistent)
    Parameters
    Type Name Description
    int layerSize

    items count in the layer

    Allocator allocator

    allocator to create internal collections under.

    SetData(int, TItem)

    Sets the data at the specified index.

    Declaration
    public virtual bool SetData(int index, TItem data)
    Parameters
    Type Name Description
    int index

    cell index to put data in

    TItem data

    data to put into the cell at provided index

    Returns
    Type Description
    bool

    TryGetData(int, out TItem)

    Tries to get the data at the specified index.

    Declaration
    public virtual bool TryGetData(int index, out TItem data)
    Parameters
    Type Name Description
    int index

    cell index to put data in

    TItem data

    data to put into the cell at provided index

    Returns
    Type Description
    bool

    true if data was added, otherwise - false

    TrySetData(int, TItem)

    Tries to set the data at the specified index.

    Declaration
    public bool TrySetData(int index, TItem data)
    Parameters
    Type Name Description
    int index

    cell index to put data in

    TItem data

    data to put into the cell at provided index

    Returns
    Type Description
    bool

    true if data was set, otherwise - false

    Implements

    IDisposable
    ICommitChanges
    IListDataLayer<TItem>

    Extension Methods

    HashExtensions.GetHashCode_RefType<TValue>(TValue, int)
    HashExtensions.GetHashCode_RefType<TValue>(TValue, int)
    Extensions_UnityObject.SmartDestroy(object)
    Extensions_UnityObject.SmartDestroy(object)
    Extensions_UnityObject.SmartGetComponent<TComponent>(object)
    Extensions_UnityObject.SmartGetComponent<TComponent>(object)
    Extensions_UnityObject.SmartGetGameGameObject(object)
    Extensions_UnityObject.SmartGetGameGameObject(object)
    In this article
    Back to top Generated by DocFX