Struct ElementPool<T>
Syntax
public struct ElementPool<T> : IDisposable where T : struct, IPoolElement
Type Parameters
Constructors
ElementPool(Int32, Allocator)
Declaration
public ElementPool(int capacity, Allocator allocator)
Parameters
Type |
Name |
Description |
System.Int32 |
capacity |
|
Allocator |
allocator |
|
ElementPool(Void*, Int32)
Declaration
public ElementPool(void *userBuffer, int capacity)
Parameters
Type |
Name |
Description |
System.Void* |
userBuffer |
|
System.Int32 |
capacity |
|
Properties
Capacity
Declaration
public int Capacity { get; }
Property Value
Type |
Description |
System.Int32 |
|
Elements
Declaration
public ElementPool<T>.ElementEnumerable Elements { get; }
Property Value
Indices
Declaration
public ElementPool<T>.IndexEnumerable Indices { get; }
Property Value
Item[Int32]
Declaration
public T this[int index] { get; set; }
Parameters
Type |
Name |
Description |
System.Int32 |
index |
|
Property Value
PeakCount
Declaration
public int PeakCount { get; }
Property Value
Type |
Description |
System.Int32 |
|
Methods
Allocate(T)
Declaration
public int Allocate(T element)
Parameters
Type |
Name |
Description |
T |
element |
|
Returns
Type |
Description |
System.Int32 |
|
Clear()
Declaration
CopyFrom(Void*, Int32)
Declaration
public void CopyFrom(void *buffer, int length)
Parameters
Type |
Name |
Description |
System.Void* |
buffer |
|
System.Int32 |
length |
|
CopyFrom(ElementPool<T>)
Declaration
public void CopyFrom(ElementPool<T> other)
Parameters
Dispose()
Declaration
GetFirstIndex()
Declaration
public int GetFirstIndex()
Returns
Type |
Description |
System.Int32 |
|
GetNextIndex(Int32)
Declaration
public int GetNextIndex(int index)
Parameters
Type |
Name |
Description |
System.Int32 |
index |
|
Returns
Type |
Description |
System.Int32 |
|
Release(Int32)
Declaration
public void Release(int index)
Parameters
Type |
Name |
Description |
System.Int32 |
index |
|