Table of Contents

Class ArrayStorage

Namespace
HelixToolkit.SharpDX
Assembly
HelixToolkit.SharpDX.dll

A array buffer defined by its struct size.

To use it, caller must first call GetId() to obtain an unique id in order to modify the buffer. Caller must restrictly use this unique id to access the buffer.

Caller must call ReleaseId(int) to release the id once caller is no longer needed to use this buffer. The released id will be reused by an new caller.
public sealed class ArrayStorage : DisposeObject, IDisposable
Inheritance
ArrayStorage
Implements
Inherited Members

Constructors

ArrayStorage(int)

public ArrayStorage(int structSize)

Parameters

structSize int

Fields

MaxArraySizeExpoentialIncrement

public static int MaxArraySizeExpoentialIncrement

Field Value

int

MinArraySize

public static int MinArraySize

Field Value

int

Properties

StructSize

public int StructSize { get; }

Property Value

int

Methods

Clear(int)

public void Clear(int id)

Parameters

id int

GetArray()

public byte[] GetArray()

Returns

byte[]

GetId()

public int GetId()

Returns

int

GetOffSet(int)

public int GetOffSet(int id)

Parameters

id int

Returns

int

OnDispose(bool)

Disposes of object resources.

protected override void OnDispose(bool disposeManagedResources)

Parameters

disposeManagedResources bool

If true, managed resources should be disposed of in addition to unmanaged resources.

Read(int, int, nint, int)

public bool Read(int id, int offset, nint dest, int size)

Parameters

id int
offset int
dest nint
size int

Returns

bool

Read(int, nint)

public bool Read(int id, nint dest)

Parameters

id int
dest nint

Returns

bool

Read<T>(int, int, out T)

public bool Read<T>(int id, int offset, out T value) where T : unmanaged

Parameters

id int
offset int
value T

Returns

bool

Type Parameters

T

ReleaseId(int)

public void ReleaseId(int id)

Parameters

id int

Write(int, int, nint, int)

public bool Write(int id, int offset, nint data, int dataLength)

Parameters

id int
offset int
data nint
dataLength int

Returns

bool

Write<T>(int, int, ref T)

public bool Write<T>(int id, int offset, ref T value) where T : unmanaged

Parameters

id int
offset int
value T

Returns

bool

Type Parameters

T