ABB Ability™ History UI SDK - Client API Reference
    Preparing search index...

    The base class for Mia classes. Provides an event mechanism and a dispose method for class objects.

    Hierarchy (View Summary)

    Implements

    Index

    Constructors

    • Construct a new class base instance.

      Returns cClassBase

    Properties

    DisposeEvent: IManualEvent<void>

    Dispose Event signaled when the object is being disposed. NOTE: Inheriting classes should use AddDisposeHandler instead.

    Events: IEvents

    cClassBase event API

    Accessors

    • get CanDispose(): boolean

      The object can be disposed

      Returns boolean

    • set CanDispose(value: boolean): void

      Parameters

      • value: boolean

      Returns void

    Methods

    • Create function that can abort asynchronous code in case the function is called again or the owner instance have been disposed. This is useful with problematic cases where for example server request is sent and the return is handled asynchronously (with a callback). Meanwhile the configuration may have changed making the code in the callback unnecessary or even harmful. *

      Type Parameters

      • TArgs extends unknown[] = []

      Parameters

      • func: TAsyncAbortable<TArgs>

        A function with first parameter as function to check the abort state: Can be used in the function: if(abort()) return; //abort

      • disposeonly: boolean = false

        Check only the dispose state - don't check subsequent calls to the function.

      Returns TAsyncAbortableReturn<TArgs>

    • Add a dispose handler called when this object is being disposed. The dispose handlers are called in reverse order (the latest first).

      Parameters

      • disposer: () => void

        The dispose handler - should make any manual clean up necessary when the object is being disposed.

      Returns void

    • Automatically dispose the given objects when this object is disposed.

      Parameters

      Returns void

    • Disposes the class object.

      Returns void

    • Gets the dispose state of the current class object.

      Returns boolean

      True, if the component is disposed.

    • Enable events for detecting when an event listener is added or removed

      Parameters

      Returns void