Public interface to create a PointerSet, also representing the first block of data.
Optional
rawFields: Rshifting UP to get a block id from a pointer always overflows in the same way, because we are converting from an int32 into a uint32
Allocate a new pointer in the set, associated with the supplied value parameter.
Any pointers passed in the refs
argument are assigned as pointers
stored in the associated fields
slab.
Any raw numeric values in the raws
argument are stored in the
associated rawFields
slab.
Optional
refs: RefSet<K>Optional
raw: RawSet<R>Mark a pointer location as free for re-use, delete its value from
the values
array, and set any refs and raw values to 0.
See also free()
for a faster version of this that does not set
the data in the fields/rawFields slabs to 0.
Mark a Pointer location as free for re-use, and delete its value
from the values
array.
Note that this does not delete raw values and references from the relevant data slabs, so it is still possible to dereference previously freed pointers, and get their former values.
See erase()
if you need this.
Get the raw data from the supplied pointer, in the specified rawField
Set the raw data from the supplied pointer, in the specified rawField
Get the raw data from the supplied pointer, in the supplied rawField, as a 2-word Uint16Array view. Editing the view will update the value.
Set the raw data for the supplied pointer, in the supplied rawField, to the values set in a 2-word Uint16Array. Returns a 2-word Uint16Array view. Editing the view will update the value.
Get the raw data from the supplied pointer, in the supplied rawField, as a 1-word Uint32Array view. Editing the view will update the value.
Set the raw data for the supplied pointer, in the supplied rawField, to the values set in a 1-word Uint32Array. Returns a 1-word Uint32Array view. Editing the view will update the value.
Get the raw data from the supplied pointer, in the supplied rawField, as a 4-byte Uint8Array view. Editing the view will update the value.
Set the raw data for the supplied pointer, in the supplied rawField, to the values set in a 4-byte Uint8Array. Returns a 4-byte Uint8Array view. Editing the view will update the value.
Get the reference from the supplied pointer, in the specified field
Set the reference from the supplied pointer, in the specified field
Generated using TypeDoc
Class representing the root block of and public interface to a PointerSet block store.