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
Name | Type | Description |
---|---|---|
facRepo | FacilityRepository | The facility repository. |
bus | EventBus | The event bus. |
facWaypointCache | FacilityWaypointCache | A cache from which to retrieve facility waypoints. |
Returns
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
Name | Type |
---|---|
sub | HandlerSubscription <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
Name | Type |
---|---|
sub | HandlerSubscription <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
Name | Type | Description |
---|---|---|
sub | HandlerSubscription <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
Name | Type | Description |
---|---|---|
index | number | Thex 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
Name | Type | Description |
---|---|---|
sub | HandlerSubscription <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
Name | 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
Defined in
src/sdk/sub/AbstractSubscribableArray.ts:100
onSubDestroyed
▸ onSubDestroyed(sub
): void
Responds to when a subscription to this array is destroyed.
Parameters
Name | Type | Description |
---|---|---|
sub | HandlerSubscription <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
Name | Type | Default value |
---|---|---|
handler | SubscribableArrayHandler <FacilityWaypoint <UserFacility >> | undefined |
initialNotify | boolean | false |
paused | boolean | false |
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
Name | 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
Defined in
src/sdk/sub/AbstractSubscribableArray.ts:90
unsub
▸ unsub(handler
): void
Parameters
Name | Type |
---|---|
handler | SubscribableArrayHandler <FacilityWaypoint <UserFacility >> |
Returns
void
Inherit Doc
Inherited from
AbstractSubscribableArray.unsub
Defined in
src/sdk/sub/AbstractSubscribableArray.ts:56