Class: ExistingUserWaypointsArray
Defined in: src/sdk/navigation/ExistingUserWaypointsArray.ts:27
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
Constructors
Constructor
new ExistingUserWaypointsArray(
facRepo
,bus
,facWaypointCache
,options?
):ExistingUserWaypointsArray
Defined in: src/sdk/navigation/ExistingUserWaypointsArray.ts:47
Creates a new instance of ExistingUserWaypointsArray.
Parameters
Parameter | Type | Description |
---|---|---|
facRepo | FacilityRepository | The facility repository. |
bus | EventBus | The event bus. |
facWaypointCache | FacilityWaypointCache | A cache from which to retrieve facility waypoints. |
options? | Readonly <ExistingUserWaypointsArrayOptions > | Options with which to configure the array. |
Returns
ExistingUserWaypointsArray
Overrides
AbstractSubscribableArray
.constructor
Properties
initialNotifyFunc()
protected
readonly
initialNotifyFunc: (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
protected
notifyDepth:number
=0
Defined in: src/sdk/sub/AbstractSubscribableArray.ts:17
Inherited from
AbstractSubscribableArray
.notifyDepth
onSubDestroyedFunc()
protected
readonly
onSubDestroyedFunc: (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?
protected
optional
singletonSub:HandlerSubscription
<SubscribableArrayHandler
<FacilityWaypoint
<UserFacility
>>>
Defined in: src/sdk/sub/AbstractSubscribableArray.ts:14
Inherited from
AbstractSubscribableArray
.singletonSub
subs?
protected
optional
subs: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/sdk/navigation/ExistingUserWaypointsArray.ts:34
The length of this array.
Returns
number
The length of this array.
Overrides
AbstractSubscribableArray
.length
Methods
addSubscription()
protected
addSubscription(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/sdk/navigation/ExistingUserWaypointsArray.ts:110
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:64
Gets an item from the array.
Parameters
Parameter | Type | Description |
---|---|---|
index | number | Thex index of the item to get. |
Returns
An item.
Throws
Inherited from
getArray()
getArray(): readonly
FacilityWaypoint
<UserFacility
>[]
Defined in: src/sdk/navigation/ExistingUserWaypointsArray.ts:72
Gets a read-only version of this array.
Returns
readonly FacilityWaypoint
<UserFacility
>[]
a read-only version of this array.
Overrides
AbstractSubscribableArray
.getArray
initialNotify()
protected
initialNotify(sub
):void
Defined in: src/sdk/sub/AbstractSubscribableArray.ts:163
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()
protected
notify(index
,type
,modifiedItem?
):void
Defined in: src/sdk/sub/AbstractSubscribableArray.ts:87
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()
protected
onSubDestroyed(sub
):void
Defined in: src/sdk/sub/AbstractSubscribableArray.ts:172
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
Subscribes to changes in this array's state.
Parameters
Parameter | Type | Default value | Description |
---|---|---|---|
handler | SubscribableArrayHandler <FacilityWaypoint <UserFacility >> | undefined | A function which is called when this array's state changes. |
initialNotify | boolean | false | Whether to immediately invoke the callback function with this array's current state. Defaults to false . This argument is ignored if the subscription is initialized as paused. |
paused | boolean | false | Whether the new subscription should be initialized as paused. Defaults to false . |
Returns
The new subscription.
Inherited from
tryGet()
tryGet(
index
):undefined
|FacilityWaypoint
<UserFacility
>
Defined in: src/sdk/sub/AbstractSubscribableArray.ts:77
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.