Hex Terrains Framework
Search Results for

    Show / Hide Table of Contents

    Class NativeParallelHashSetDataLayer<TItem>

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

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

    Type of the items stored in the data layer

    Fields

    _data

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

    Properties

    Data

    Container for data in the layer

    Declaration
    public NativeParallelHashSet<TItem> Data { get; }
    Property Value
    Type Description
    NativeParallelHashSet<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

    Add(TItem)

    Adds an item to the data layer.

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

    item to add to the layer

    Returns
    Type Description
    bool

    true if value 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

    item to check if in the layer

    Returns
    Type Description
    bool

    true if item is present in the layer, otherwise - false

    Dispose()

    Disposes the data layer, calls DisposeAllItems() DisposeAllItems()

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

    DisposeAllItems()

    Disposes every item in the data layer by calling DisposeDataItem() DisposeDataItem(TItem).

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

    DisposeDataItem(TItem)

    Disposes the 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. Requires a layer size to be set because NativeParallelHashSet can't be resized in Jobs.

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

    max amount of items in the layer

    Allocator allocator

    allocator to create internal collections with

    Remove(TItem)

    Removes an item from the data layer.

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

    value to remove from layer

    Returns
    Type Description
    bool

    true if value was in the layer, otherwise - false

    SafeAdd(TItem)

    Adds an item to the data layer if the layer is created.

    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, otherwise - false

    SafeContains(TItem)

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

    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 present in the layer, otherwise - false

    SafeRemove(TItem)

    Removes an item from the data layer if the layer is created.

    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, otherwise - false

    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