Global

Members

(constant) BinaryArrayHandler

A Proxy handler for the BinaryArray class to allow accessing its elements

.

A Proxy handler for the BinaryArray class to allow accessing its elements

Properties:
Name Type Description
get

Getter for the elements of the handled BinaryArray

set

Setter for the elements of the handled BinaryArray

Source:

(constant) Types

Types used by the binary decorator

.

Types used by the binary decorator

Properties:
Name Type Description
Float32
Float64
Int8
Int16
Int32
BigInt64
Uint8
Uint8Clamped

Not implemented

Uint16
Uint32
BigUint64
Array

Array type generator (type, length, padding=false)

Struct

Nested/composited struct generator (Class) which extends Binary

Text

Text generator (length, {encoding='utf8', zeroTerminated=true}={})

Source:

propertyDescriptor

Property definition returned from binary's returned decorator

.

Property definition returned from binary's returned decorator

Source:

propertyDescriptorGetter

Returns the value handled by this class member, defined at its Types

.

Returns the value handled by this class member, defined at its Types

Source:

propertyDescriptorSetter

Modifies the value handled by this class member, defined at its Types

.

Modifies the value handled by this class member, defined at its Types

Source:

Methods

BinaryArray(dv, type, offset, length) → {Proxy}

Proxy creator for BinaryArrayBase

.

Proxy creator for BinaryArrayBase

Parameters:
Name Type Description
dv DataView

The DataView handling the buffer where the data lives

type object

The type of the array members from Types

offset number

The offset before the first member of the array

length number

The length of the array

Source:
Returns:
Type
Proxy

binary(type) → {function}

Class member decorator generator for Binary class property

.

Class member decorator generator for Binary class property

Parameters:
Name Type Description
type object

Any element from the Types

Source:
Returns:
Type
function

(static) binarySize()

Allow getting the class size from outside

.

Allow getting the class size from outside

This:
Source:

(static) binarySize()

Allow getting the class binary props from outside

.

Allow getting the class binary props from outside

This:
Source:

decorator(target, name, descriptor) → {object}

The class member generated decorator

.

The class member generated decorator

Parameters:
Name Type Description
target object

object which will be assigned to the Class.prototype (extending Binary or decorated with withBinary)

name string

property name

descriptor object

as in Object.defineProperty(target, name, descriptor), like propertyDescriptor

Source:
Returns:
Type
object

(generator) iterator() → {any}

Make a generator iterator

.

Make a generator iterator

Source:
Yields:
- Each of this array elements of type Types
Type
any

withBinary(Class)

Decorator to add Binary behavior to a class containing @binary members, but without extending Binary class

.

Decorator to add Binary behavior to a class containing @binary members, but without extending Binary class

Parameters:
Name Type Description
Class class

A class not extending Binary containing @binary members

Source:
Returns:

wrapper A Class instantiator

Type Definitions

wrapper(binOrDV, initialOffset, args)

Class wrapper (object constructor)

.

Class wrapper (object constructor)

Parameters:
Name Type Description
binOrDV ArrayBuffer/SharedArrayBuffer/DataView

The buffer where the data lives

initialOffset number

Buffer offset before this object data start

args array

Any arguments passed to the class constructor

Source:
Returns:

Class instance