Caplin Trader 5.1.0

Class: module:ct-core/EmittingMap

module:ct-core/EmittingMap(properties)

new module:ct-core/EmittingMap(properties)

This class stores an Object along with getter and setter methods. The purpose of this class is to make an object "listenable". It provides a module:ct-core/EmittingMap#set method that triggers a property-changed event.

Parameters:
Name Type Description
properties Object

The Object to be made "listenable."

Mixes In:

Methods

get(name)

Parameters:
Name Type Description
name String

The property name.

Returns:

The given property's value.

set(name, value)

Sets the given property to the given value and notifies any listeners of the change.

Parameters:
Name Type Description
name String

The property name.

value *

The value to assign the given property.