Class: ExistingUserWaypointsArray
Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/Navigation/ExistingUserWaypointsArray.ts:10
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.
Extends
AbstractSubscribableArray<FacilityWaypoint<UserFacility>>
Constructors
Constructor
new ExistingUserWaypointsArray(
facRepo,bus,facWaypointCache):ExistingUserWaypointsArray
Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/Navigation/ExistingUserWaypointsArray.ts:27
Constructor.
Parameters
| Parameter | Type | Description |
|---|---|---|
facRepo | FacilityRepository | The facility repository. |
bus | EventBus | The event bus. |
facWaypointCache | FacilityWaypointCache | A cache from which to retrieve facility waypoints. |
Returns
ExistingUserWaypointsArray
Overrides
AbstractSubscribableArray<FacilityWaypoint<UserFacility>>.constructor
Properties
initialNotifyFunc()
protectedreadonlyinitialNotifyFunc: (sub) =>void
Defined in: src/sdk/sub/AbstractSubscribableArray.ts:20
A function which sends initial notifications to subscriptions.
Notifies a subscription of this array's current state.
Parameters
| Parameter | Type | Description |
|---|---|---|
sub | HandlerSubscription<SubscribableArrayHandler<FacilityWaypoint<UserFacility>>> | The subscription to notify. |
Returns
void
Inherited from
AbstractSubscribableArray.initialNotifyFunc
notifyDepth
protectednotifyDepth:number=0
Defined in: src/sdk/sub/AbstractSubscribableArray.ts:17
Inherited from
AbstractSubscribableArray.notifyDepth
onSubDestroyedFunc()
protectedreadonlyonSubDestroyedFunc: (sub) =>void
Defined in: src/sdk/sub/AbstractSubscribableArray.ts:23
A function which responds to when a subscription to this subscribable is destroyed.
Responds to when a subscription to this array is destroyed.
Parameters
| Parameter | Type | Description |
|---|---|---|
sub | HandlerSubscription<SubscribableArrayHandler<FacilityWaypoint<UserFacility>>> | The destroyed subscription. |
Returns
void
Inherited from
AbstractSubscribableArray.onSubDestroyedFunc
singletonSub?
protectedoptionalsingletonSub:HandlerSubscription<SubscribableArrayHandler<FacilityWaypoint<UserFacility>>>
Defined in: src/sdk/sub/AbstractSubscribableArray.ts:14
Inherited from
AbstractSubscribableArray.singletonSub
subs?
protectedoptionalsubs:HandlerSubscription<SubscribableArrayHandler<FacilityWaypoint<UserFacility>>>[]
Defined in: src/sdk/sub/AbstractSubscribableArray.ts:16
Inherited from
AbstractSubscribableArray.subs
Accessors
length
Get Signature
get length():
number
Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/Navigation/ExistingUserWaypointsArray.ts:15
Inherit Doc
Returns
number
Overrides
AbstractSubscribableArray.length
Methods
addSubscription()
protectedaddSubscription(sub):void
Defined in: src/sdk/sub/AbstractSubscribableArray.ts:29
Adds a subscription to this array.
Parameters
| Parameter | Type | Description |
|---|---|---|
sub | HandlerSubscription<SubscribableArrayHandler<FacilityWaypoint<UserFacility>>> | The subscription to add. |
Returns
void
Inherited from
AbstractSubscribableArray.addSubscription
destroy()
destroy():
void
Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/Navigation/ExistingUserWaypointsArray.ts:70
Destroys this array. Once destroyed, the state of the array will no longer reflect all existing user waypoints.
Returns
void
get()
get(
index):FacilityWaypoint
Defined in: src/sdk/sub/AbstractSubscribableArray.ts:77
Gets an item from the array.
Parameters
| Parameter | Type | Description |
|---|---|---|
index | number | Thex index of the item to get. |
Returns
FacilityWaypoint
An item.
Throws
Inherited from
AbstractSubscribableArray.get
getArray()
getArray(): readonly
FacilityWaypoint<UserFacility>[]
Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/Navigation/ExistingUserWaypointsArray.ts:41
Returns
readonly FacilityWaypoint<UserFacility>[]
Inherit Doc
Overrides
AbstractSubscribableArray.getArray
initialNotify()
protectedinitialNotify(sub):void
Defined in: src/sdk/sub/AbstractSubscribableArray.ts:176
Notifies a subscription of this array's current state.
Parameters
| Parameter | Type | Description |
|---|---|---|
sub | HandlerSubscription<SubscribableArrayHandler<FacilityWaypoint<UserFacility>>> | The subscription to notify. |
Returns
void
Inherited from
AbstractSubscribableArray.initialNotify
notify()
protectednotify(index,type,modifiedItem?):void
Defined in: src/sdk/sub/AbstractSubscribableArray.ts:100
Notifies subscriptions of a change in the array.
Parameters
| Parameter | Type | Description |
|---|---|---|
index | number | The index that was changed. |
type | SubscribableArrayEventType | The type of subject event. |
modifiedItem? | FacilityWaypoint<UserFacility> | readonly FacilityWaypoint<UserFacility>[] | The item modified by the operation. |
Returns
void
Inherited from
AbstractSubscribableArray.notify
onSubDestroyed()
protectedonSubDestroyed(sub):void
Defined in: src/sdk/sub/AbstractSubscribableArray.ts:185
Responds to when a subscription to this array is destroyed.
Parameters
| Parameter | Type | Description |
|---|---|---|
sub | HandlerSubscription<SubscribableArrayHandler<FacilityWaypoint<UserFacility>>> | The destroyed subscription. |
Returns
void
Inherited from
AbstractSubscribableArray.onSubDestroyed
sub()
sub(
handler,initialNotify,paused):Subscription
Defined in: src/sdk/sub/AbstractSubscribableArray.ts:41
Parameters
| Parameter | Type | Default value |
|---|---|---|
handler | SubscribableArrayHandler<FacilityWaypoint<UserFacility>> | undefined |
initialNotify | boolean | false |
paused | boolean | false |
Returns
Subscription
Inherit Doc
Inherited from
AbstractSubscribableArray.sub
tryGet()
tryGet(
index):undefined|FacilityWaypoint<UserFacility>
Defined in: src/sdk/sub/AbstractSubscribableArray.ts:90
Tries to get the value from the array.
Parameters
| Parameter | Type | Description |
|---|---|---|
index | number | The index of the item to get. |
Returns
undefined | FacilityWaypoint<UserFacility>
The value or undefined if not found.
Inherited from
AbstractSubscribableArray.tryGet
unsub()
unsub(
handler):void
Defined in: src/sdk/sub/AbstractSubscribableArray.ts:56
Parameters
| Parameter | Type |
|---|---|
handler | SubscribableArrayHandler<FacilityWaypoint<UserFacility>> |
Returns
void
Inherit Doc
Inherited from
AbstractSubscribableArray.unsub