ARCS logo.js Augmented Reality Component System

Class: Connection

Connection

new Connection(source, signal, destination, slot)

Defines a connection between two components
Parameters:
Name Type Description
source object component at the source
signal string name of the signal emitting data
destination object component at the destination
slot string name of the signal receiving data

Methods

<static> cast(obj, context)

Helper function that casts a connection from a description
Parameters:
Name Type Description
obj object a raw description of the connection
context object the context in which this connection takes place.
Returns:
a connection

disconnect()

Disconnects a signal/slot connection between the two components described in this object.

getDestination() → {Component}

Returns the destination of a connection
Returns:
destination component of the connection
Type
Component

getSignal() → {String}

Returns the signal name of a connection
Returns:
signal name
Type
String

getSlot() → {String}

Returns the slot name of a connection
Returns:
slot name
Type
String

getSource() → {Component}

Returns the source of a connection
Returns:
source component of the connection
Type
Component