Options
All
  • Public
  • Public/Protected
  • All
Menu

Stores all aggregators for every module that has an AggregatorValue.

Hierarchy

  • AggregatorCollection

Index

Constructors

constructor

  • Parameters

    • eventEmitter: EventEmitter

      The EventEmitter singleton that lives server-side.

    Returns AggregatorCollection

Properties

Private aggregatorMap

aggregatorMap: Map<string, AggregatorModel>

Stores AggregatorModels in a map. Can be a accessed with an AggregatorValue's unique Id.

Private eventEmitter

eventEmitter: EventEmitter

Singleton to send and receive data across objects on server side. Here: Informs the app about updated variables.

Private id

id: string

Unique Id.

Methods

add

  • add(key: string, numDatapoints?: number): void
  • Generate a new AggregatorModel for an AggregatorValue and store it in this collection.

    Parameters

    • key: string

      Unique Id of the AggregatorValue that is about to be added to the collection.

    • Optional numDatapoints: number

      Number of datapoints that are stored to calculate Running Average or Median.

    Returns void

addPlayerValue

  • Adds user input to an AggregatorModel.

    Parameters

    Returns void

addValue

  • addValue(key: string, value: number): void
  • Adds a value to an AggregatorModel.

    Parameters

    • key: string

      Unique Id of the AggregatorValue that receives the value.

    • value: number

      The number that is added to the AggregatorModel.

    Returns void

delete

  • delete(key: string): void
  • Delete an AggregatorModel from this collection.

    Parameters

    • key: string

      Unique Id of the AggregatorValue that is about to be deleted from the collection.

    Returns void

getValue

  • Retrieve an aggregated value from an AggregatorModel.

    Parameters

    • key: string

      The AggregatorValue that is requested.

    • method: AggregatorMethod

      The method of interest that is about to be returned.

    Returns undefined | number

Generated using TypeDoc