Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Store

Store base class

interface

Hierarchy

Indexable

[k: string]: any

Store base class

interface

Index

Constructors

constructor

  • new Store(size?: number): Store

Properties

_defaultFields

_defaultFields: StoreField[]

_fields

_fields: StoreField[]

count

count: number

length

length: number

Methods

_init

  • _init(size: number): void
  • Initialize the store

    Parameters

    • size: number

      size to initialize

    Returns void

_initField

  • Initialize a field

    Parameters

    • name: string

      field name

    • size: number

      element size

    • type: TypedArrayString

      data type, one of int8, int16, int32, uint8, uint16, uint32, float32

    Returns void

addField

  • Add a field

    Parameters

    • name: string

      field name

    • size: number

      element size

    • type: TypedArrayString

      data type, one of int8, int16, int32, uint8, uint16, uint32, float32

    Returns void

clear

  • clear(): void

copyFrom

  • copyFrom(other: Store, thisOffset: number, otherOffset: number, length: number): void
  • Copy data from one store to another

    Parameters

    • other: Store

      store to copy from

    • thisOffset: number

      offset to start copying to

    • otherOffset: number

      offset to start copying from

    • length: number

      number of entries to copy

    Returns void

copyWithin

  • copyWithin(offsetTarget: number, offsetSource: number, length: number): void
  • Copy data within this store

    Parameters

    • offsetTarget: number
    • offsetSource: number
    • length: number

      number of entries to copy

    Returns void

dispose

  • dispose(): void

growIfFull

  • growIfFull(): void

resize

  • resize(size?: undefined | number): void
  • Resize the store to the new size

    Parameters

    • Optional size: undefined | number

      new size

    Returns void

sort

  • sort(compareFunction: (a: any, b: any) => number): void
  • Sort entries in the store given the compare function

    Parameters

    • compareFunction: (a: any, b: any) => number

      function to sort by

        • (a: any, b: any): number
        • Parameters

          • a: any
          • b: any

          Returns number

    Returns void

Generated using TypeDoc