Skip to main content

Class: ExistingUserWaypointsArray

An array of all existing user waypoints. Each instance of this class is automatically updated to contain all existing user waypoints in the order in which they were added.

Hierarchy

  • AbstractSubscribableArray<FacilityWaypoint<UserFacility>>

    ExistingUserWaypointsArray

Constructors

constructor

new ExistingUserWaypointsArray(facRepo, bus, facWaypointCache): ExistingUserWaypointsArray

Constructor.

Parameters

NameTypeDescription
facRepoFacilityRepositoryThe facility repository.
busEventBusThe event bus.
facWaypointCacheFacilityWaypointCacheA cache from which to retrieve facility waypoints.

Returns

ExistingUserWaypointsArray

Overrides

AbstractSubscribableArray\<FacilityWaypoint\<UserFacility\>\>.constructor

Defined in

src/workingtitle-instruments-g3000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG3000/Shared/Navigation/ExistingUserWaypointsArray.ts:27

Properties

initialNotifyFunc

Protected Readonly initialNotifyFunc: (sub: HandlerSubscription<SubscribableArrayHandler<FacilityWaypoint<UserFacility>>>) => void

A function which sends initial notifications to subscriptions.

Type declaration

▸ (sub): void

A function which sends initial notifications to subscriptions.

Parameters
NameType
subHandlerSubscription<SubscribableArrayHandler<FacilityWaypoint<UserFacility>>>
Returns

void

Inherited from

AbstractSubscribableArray.initialNotifyFunc

Defined in

src/sdk/sub/AbstractSubscribableArray.ts:20


notifyDepth

Protected notifyDepth: number = 0

Inherited from

AbstractSubscribableArray.notifyDepth

Defined in

src/sdk/sub/AbstractSubscribableArray.ts:17


onSubDestroyedFunc

Protected Readonly onSubDestroyedFunc: (sub: HandlerSubscription<SubscribableArrayHandler<FacilityWaypoint<UserFacility>>>) => void

A function which responds to when a subscription to this subscribable is destroyed.

Type declaration

▸ (sub): void

A function which responds to when a subscription to this subscribable is destroyed.

Parameters
NameType
subHandlerSubscription<SubscribableArrayHandler<FacilityWaypoint<UserFacility>>>
Returns

void

Inherited from

AbstractSubscribableArray.onSubDestroyedFunc

Defined in

src/sdk/sub/AbstractSubscribableArray.ts:23


singletonSub

Protected Optional singletonSub: HandlerSubscription<SubscribableArrayHandler<FacilityWaypoint<UserFacility>>>

Inherited from

AbstractSubscribableArray.singletonSub

Defined in

src/sdk/sub/AbstractSubscribableArray.ts:14


subs

Protected Optional subs: HandlerSubscription<SubscribableArrayHandler<FacilityWaypoint<UserFacility>>>[]

Inherited from

AbstractSubscribableArray.subs

Defined in

src/sdk/sub/AbstractSubscribableArray.ts:16

Accessors

length

get length(): number

Returns

number

Inherit Doc

Overrides

AbstractSubscribableArray.length

Defined in

src/workingtitle-instruments-g3000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG3000/Shared/Navigation/ExistingUserWaypointsArray.ts:15

Methods

addSubscription

addSubscription(sub): void

Adds a subscription to this array.

Parameters

NameTypeDescription
subHandlerSubscription<SubscribableArrayHandler<FacilityWaypoint<UserFacility>>>The subscription to add.

Returns

void

Inherited from

AbstractSubscribableArray.addSubscription

Defined in

src/sdk/sub/AbstractSubscribableArray.ts:29


destroy

destroy(): void

Destroys this array. Once destroyed, the state of the array will no longer reflect all existing user waypoints.

Returns

void

Defined in

src/workingtitle-instruments-g3000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG3000/Shared/Navigation/ExistingUserWaypointsArray.ts:70


get

get(index): FacilityWaypoint<UserFacility>

Gets an item from the array.

Parameters

NameTypeDescription
indexnumberThex index of the item to get.

Returns

FacilityWaypoint<UserFacility>

An item.

Throws

Inherited from

AbstractSubscribableArray.get

Defined in

src/sdk/sub/AbstractSubscribableArray.ts:77


getArray

getArray(): readonly FacilityWaypoint<UserFacility>[]

Returns

readonly FacilityWaypoint<UserFacility>[]

Inherit Doc

Overrides

AbstractSubscribableArray.getArray

Defined in

src/workingtitle-instruments-g3000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG3000/Shared/Navigation/ExistingUserWaypointsArray.ts:41


initialNotify

initialNotify(sub): void

Notifies a subscription of this array's current state.

Parameters

NameTypeDescription
subHandlerSubscription<SubscribableArrayHandler<FacilityWaypoint<UserFacility>>>The subscription to notify.

Returns

void

Inherited from

AbstractSubscribableArray.initialNotify

Defined in

src/sdk/sub/AbstractSubscribableArray.ts:176


notify

notify(index, type, modifiedItem?): void

Notifies subscriptions of a change in the array.

Parameters

NameTypeDescription
indexnumberThe index that was changed.
typeSubscribableArrayEventTypeThe type of subject event.
modifiedItem?FacilityWaypoint<UserFacility> | readonly FacilityWaypoint<UserFacility>[]The item modified by the operation.

Returns

void

Inherited from

AbstractSubscribableArray.notify

Defined in

src/sdk/sub/AbstractSubscribableArray.ts:100


onSubDestroyed

onSubDestroyed(sub): void

Responds to when a subscription to this array is destroyed.

Parameters

NameTypeDescription
subHandlerSubscription<SubscribableArrayHandler<FacilityWaypoint<UserFacility>>>The destroyed subscription.

Returns

void

Inherited from

AbstractSubscribableArray.onSubDestroyed

Defined in

src/sdk/sub/AbstractSubscribableArray.ts:185


sub

sub(handler, initialNotify?, paused?): Subscription

Parameters

NameTypeDefault value
handlerSubscribableArrayHandler<FacilityWaypoint<UserFacility>>undefined
initialNotifybooleanfalse
pausedbooleanfalse

Returns

Subscription

Inherit Doc

Inherited from

AbstractSubscribableArray.sub

Defined in

src/sdk/sub/AbstractSubscribableArray.ts:41


tryGet

tryGet(index): undefined | FacilityWaypoint<UserFacility>

Tries to get the value from the array.

Parameters

NameTypeDescription
indexnumberThe index of the item to get.

Returns

undefined | FacilityWaypoint<UserFacility>

The value or undefined if not found.

Inherited from

AbstractSubscribableArray.tryGet

Defined in

src/sdk/sub/AbstractSubscribableArray.ts:90


unsub

unsub(handler): void

Parameters

NameType
handlerSubscribableArrayHandler<FacilityWaypoint<UserFacility>>

Returns

void

Inherit Doc

Inherited from

AbstractSubscribableArray.unsub

Defined in

src/sdk/sub/AbstractSubscribableArray.ts:56