Hex Terrains Framework
Search Results for

    Show / Hide Table of Contents

    Class NativeHashSetDataLayer<TItem>

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

    Inheritance
    object
    DataLayer
    NativeHashSetDataLayer<TItem>
    Implements
    IDisposable
    ICommitChanges
    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 NativeHashSetDataLayer<TItem> : DataLayer, IDisposable, ICommitChanges where TItem : unmanaged, IEquatable<TItem>
    Type Parameters
    Name Description
    TItem

    type of data stored in the layer

    Fields

    _data

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

    Properties

    Data

    Container for data in the layer.

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

    Length

    Number of items in the layer

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

    Methods

    Add(TItem)

    Adds an item to the layer.

    Declaration
    public virtual bool Add(TItem value)
    Parameters
    Type Name Description
    TItem value

    data to add into the layer

    Returns
    Type Description
    bool

    true if data was added, otherwise - false

    Contains(TItem)

    Checks if the layer contains the specified item.

    Declaration
    public virtual bool Contains(TItem value)
    Parameters
    Type Name Description
    TItem value

    data to check if it is in the layer

    Returns
    Type Description
    bool

    true if data was found

    Dispose()

    Disposes the layer, calls 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 specified item if it is IDisposable.

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

    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
    Allocator allocator

    Remove(TItem)

    Removes an item from the layer.

    Declaration
    public virtual bool Remove(TItem value)
    Parameters
    Type Name Description
    TItem value

    data to remove from layer

    Returns
    Type Description
    bool

    true if data was in the layer

    SafeAdd(TItem)

    Adds an item to the layer if the layer is initialized.

    Declaration
    public virtual bool SafeAdd(TItem value)
    Parameters
    Type Name Description
    TItem value

    data to add into the layer

    Returns
    Type Description
    bool

    true if data was added

    SafeContains(TItem)

    Checks if the layer contains the specified item if the layer is initialized.

    Declaration
    public virtual bool SafeContains(TItem value)
    Parameters
    Type Name Description
    TItem value

    data to check if it is in the layer

    Returns
    Type Description
    bool

    true if data is in the layer

    SafeRemove(TItem)

    Removes an item from the layer if the layer is initialized.

    Declaration
    public virtual bool SafeRemove(TItem value)
    Parameters
    Type Name Description
    TItem value

    data to remove from layer

    Returns
    Type Description
    bool

    true if data was in the layer

    Implements

    IDisposable
    ICommitChanges

    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