Class AbstractEventsManager<ET, D>Abstract

This class is a Manager of events. It will be used by the Map/Marker/etc in order to support the listenning of the different events supported by the parent element. You can almost think of it, as the object that works underneath "document.addEventListener()" API - which will be equivalent to out "MapAPI.MapManager.Events.Subscribe()".

Export

Abstract

Type Parameters

  • ET

    type events that this manager will be handling (e.g. MapEventType, MarkerEventTypes, ...)

  • D

    this will be the type of Data to be passed, by default to the handlers.

Hierarchy-Diagram

UML class diagram of AbstractEventsManager
Legend
icon for a class in the UML class diagram class
icon for an abstract class in the UML class diagram abstract class
icon for a private property in the UML class diagram private property
icon for a public method in the UML class diagram public method
icon for a protected method in the UML class diagram protected method
italic abstract property/method

Hierarchy

Properties

_events: Map<ET, IEvent<D>>

Constructors

Methods

  • This method will check if a given EventType has assigned callbacks

    Returns

    boolean

    Memberof

    OSFramework.Event.AbstractEventsManager

    Parameters

    • eventType: ET

    Returns boolean

  • This method will trigger the callback assigned to the given eventType

    Memberof

    OSFramework.Event.AbstractEventsManager

    Parameters

    • eventType: ET
    • Optional data: D
    • Rest ...args: unknown[]

    Returns void

  • Protected

    This method will be responsible for creating the correct instance of the Event based in the EventType that is passed.

    Abstract

    Returns

    {IEvent} Instance of the event.

    Memberof

    OSFramework.Event.AbstractEventsManager

    Parameters

    • eventType: ET

      Type of the event that will we need an instance of.

    Returns IEvent<D>

Accessors