Namespace Fwt.Core.DataLayers
Classes
ArrayChunkedDataLayer<TItem>
Base class for data layers that use array as a data storage and track changes per chunk.
ArrayDataLayer<TItem>
Base class for all data layers that use an array as a data container.
ChunkedDataLayer
Base class for all chunked data layers (DataLayer). Chunked data layer is a container for data that tracks changes per chunk. When intializing the data layer, it creates a grid of chunks. Each cell in this grid is a dirty flag for the chunk. When a cell is modified, the corresponding chunk is marked as dirty and also the whole layer is marked as dirty. The layer contains a dirty flags per chunk in ChunkDirtyGrid NativeList. The layer contains indexes of dirty chunks in DirtyChunks NativeParallelHashSet. To divide a layer into chunks, the layer must be initialized with a size of the layer (width and height) and a size of the chunks.
DataLayer
Base class for all data layers. Data Layer is a container for data that can be read and written to. Data Layer allows for parallel reading and writing of data. It tracks dependencies for reading and writing jobs.
If you want to read data immediately, call DataLayer.OpenToRead() before reading. If you want to write data immediately, call DataLayer.OpenToWrite() before writing. If you want to schedule a job that reads data, call DataLayer.PrepareToRead() before scheduling the job (returns a JobHandle to use as dependency in your job) If you want to schedule a job that writes data, call DataLayer.PrepareToWrite() before scheduling the job (returns a JobHandle to use as dependency in your job)
DictionaryDataLayer<TKey, TItem>
Base class for all data layers that use a dictionary as a data structure.
HashSetDataLayer<TItem>
Base class for all data layers that use HashSet as a data structure.
ListChunkedDataLayer<TItem>
Base class for data layers that use Array{T} as a data storage and track changes per chunk.
ListDataLayer<TItem>
Base class for all data layers that are based on Array{T}.
NativeArrayChunkedDataLayer<TItem>
Base class for data layers that use NativeArray{T} as a data storage and track changes per chunk.
NativeArrayDataLayer<TItem>
Base class for all data layers that are based on NativeArray{T}.
NativeHashMapDataLayer<TKey, TItem>
Base class for all data layers that are based on NativeHashMap{TItem, TItem}.
NativeHashSetDataLayer<TItem>
Base class for all data layers that are based on NativeHashSet{T}.
NativeListChunkedDataLayer<TItem>
Base class for all data layers that are based on NativeList{T}.
NativeListDataLayer<TItem>
Base class for all data layers that are based on NativeList{T}.
NativeParallelHashMapDataLayer<TKey, TItem>
Base class for all data layers that are based on NativeParallelHashMap{TItem, TItem}.
NativeParallelHashSetDataLayer<TItem>
Base class for all data layers that are based on NativeParallelHashSet{T}.
NativeParallelMultiHashMapDataLayer<TKey, TItem>
Base class for all data layers that are based on NativeParallelMultiHashMap{TItem, TItem}.
Structs
ClearNativeParallelHashSetJob<TItem>
Job that clears the dirty chunks hash set. Used to schedule this operation after all jobs that read/write to the data layer are completed
FillDirtyChunksJob
Job that fills the dirty chunks list with chunk indexes.
MergeDataLayerDirtyGridsJob1
Job that merges dirty grids from 1 source into a target grid. If the source or target grid is dirty, the target grid is marked as dirty.
MergeDataLayerDirtyGridsJob2
Job that merges dirty grids from 2 sources into a target grid. If any of the source/target grids is dirty, the target grid is marked as dirty.
MergeDataLayerDirtyGridsJob3
Job that merges dirty grids from 3 sources into a target grid. If any of the source/target grids is dirty, the target grid is marked as dirty.
MergeDataLayerDirtyGridsJob4
Job that merges dirty grids from 4 sources into a target grid. If any of the source/target grids is dirty, the target grid is marked as dirty.
SetChunksDirtyJob
Job that sets the dirty flag for the chunks with indexes provided in DirtyChunks collection.
Interfaces
IListDataLayer<TItem>
Interface for all the data layers that have length and allows to get/set value.