Skip to content

Latest commit

 

History

History
1604 lines (1128 loc) · 61.9 KB

File metadata and controls

1604 lines (1128 loc) · 61.9 KB

Classes

DaggerBase

Base class for all Dagger objects.

DaggerSignal

This class acts as a simple emulation of the Qt signal/slot pattern. Objects derived from DaggerBase expose these as properties that can be connected to with callbacks (slots) to respond to certain Dagger events.

DaggerBasePinDaggerBase

The base class for all Dagger Pins - Dagger pins represent points between two nodes that can connected

DaggerGraphDaggerBase

Class that represents a collection of DaggerNodes interconnected via DaggerBasePins

DaggerInputPinDaggerBasePin

Class that represents a directed input into a DaggerNode

DaggerNodeDaggerBase

Class that represents a node (or vertex) which is the fundamental unit of which DaggerGraphs are formed. A DaggerNode can be shared with multiple topologies with each topology having two DaggerPinCollections per node (one for each direction).

DaggerOutputPinDaggerBasePin

Class that represents a directed output out of a DaggerNode

DaggerPinCollectionDaggerBase

Class that acts as a container for pins of one particular direction.

DaggerBase

Base class for all Dagger objects.

Kind: global class

new DaggerBase()

DaggerBase ctor

daggerBase.instanceID ⇒ string

Get the unique id for this instance

Kind: instance property of DaggerBase

daggerBase.parent ⇒ DaggerBase

Get the parent DaggerBase object this object belongs to

Kind: instance property of DaggerBase

daggerBase.parent

Set the parent DaggerBase object this object belongs to

Kind: instance property of DaggerBase

Param Type
p DaggerBase

DaggerSignal

This class acts as a simple emulation of the Qt signal/slot pattern. Objects derived from DaggerBase expose these as properties that can be connected to with callbacks (slots) to respond to certain Dagger events.

Kind: global class

new DaggerSignal(implementation)

DaggerSignal ctor

Param Type
implementation *

Example

var nodeAddedSlot = function (nodeID) {
  console.log("node added to graph" + nodeID);
  // now disconnect the slot
  graph.nodeAdded.disconnect(nodeAddedSlot);
 }
graph.nodeAdded.connect(nodeAddedSlot);

Example

var nodeAddedSlot = function (nodeID) {
 console.log("slot node added " + nodeID);
}

// calling connect on the signal will return a reference to
// the signal that one can call disconnect on directly when no
// longer needed:
var mysignal = graph.nodeAdded.connect(nodeAddedSlot);

// when not needed, call disconnect on the sig object
mysignal.disconnect();

daggerSignal.connect(slot)

Add a connection callback

Kind: instance method of DaggerSignal

Param Type
slot function

daggerSignal.disconnect(slot)

Remove a connection callback

Kind: instance method of DaggerSignal

Param Type
slot function

daggerSignal.disconnectAll()

Remova all connection callbacks

Kind: instance method of DaggerSignal

daggerSignal.emit()

Signal all connected callbacks

Kind: instance method of DaggerSignal

DaggerBasePin ⇐ DaggerBase

The base class for all Dagger Pins - Dagger pins represent points between two nodes that can connected

Kind: global class
Extends: DaggerBase

new DaggerBasePin()

DaggerBasePin ctor

daggerBasePin.direction ⇒ PinDirection

Get the direction of flow this pin represents

Kind: instance property of DaggerBasePin

daggerBasePin.pinName ⇒ string

Get the pin's name

Kind: instance property of DaggerBasePin

daggerBasePin.pinName

Set the pin's name

Kind: instance property of DaggerBasePin

Param Type
name string

daggerBasePin.parentNode ⇒ DaggerNode

Get the node this belongs to

Kind: instance property of DaggerBasePin

daggerBasePin.parentNode

Set the node this pin belongs to. This is informational only and does not re-parent the pin.

Kind: instance property of DaggerBasePin

Param Type
n DaggerNode

daggerBasePin.isInputPin ⇒ boolean

Get if this is an Input pin

Kind: instance property of DaggerBasePin

daggerBasePin.autoCloneRefCount ⇒ Number

Get the total number of times the pin was auto cloned. Used to generate cloned pin names

Kind: instance property of DaggerBasePin

daggerBasePin.autoCloneCount ⇒ Number

Get the number of times this pin was auto-cloned

Kind: instance property of DaggerBasePin

daggerBasePin.maxAutoClone ⇒ Number

Get the maximum number of times this pin can be auto-cloned (or -1 for unlimited)

Kind: instance property of DaggerBasePin

daggerBasePin.autoCloneNameTemplate ⇒ string

Get the template that is used for creating a unique name for cloned pins ie. 'myPin %'

Kind: instance property of DaggerBasePin

daggerBasePin.index ⇒ Number

Get the index of this pin within it's pin collection (or -1 if not known)

Kind: instance property of DaggerBasePin

daggerBasePin.autoCloneMaster ⇒ DaggerBasePin

Get the pin that this pin will clone from when connected

Kind: instance property of DaggerBasePin

daggerBasePin.isAutoCloned ⇒ boolean

Get if this pin is an auto-cloned pin.

Kind: instance property of DaggerBasePin

daggerBasePin.canRename ⇒ boolean

Get if this pin can be renamed. Pin's should rarely be allowed to be renamed as every pin in a DaggerPinCollection MUST have a unique name

Kind: instance property of DaggerBasePin

daggerBasePin.canRename

Set if the pin can be renamed.

Kind: instance property of DaggerBasePin

Param Type
val boolean

daggerBasePin.topologySystem ⇒ boolean

Get the topology system this pin belongs to.

Kind: instance property of DaggerBasePin

daggerBasePin.isConnected ⇒ boolean

Get if this pin has a connection to another pin

Kind: instance property of DaggerBasePin

daggerBasePin.originalName ⇒ string

Get the original name of pin if the pin was renamed

Kind: instance property of DaggerBasePin

daggerBasePin.instanceID ⇒ string

Get the unique id for this instance

Kind: instance property of DaggerBasePin

daggerBasePin.parent ⇒ DaggerBase

Get the parent DaggerBase object this object belongs to

Kind: instance property of DaggerBasePin
Overrides: parent

daggerBasePin.canConnectToPin(pin) ⇒ boolean

Test if this pin can connect to the given pin

Kind: instance method of DaggerBasePin

Param Type Description
pin DaggerBasePin the pin to test connectability

daggerBasePin.getAutoClone() ⇒ boolean

Get if this pin auto-clones when connected

Kind: instance method of DaggerBasePin

daggerBasePin.setAutoClone(maxAutoCloneCount, autoCloneNameTemplate)

Set if this pin auto-clones when connected

Kind: instance method of DaggerBasePin

Param Type Description
maxAutoCloneCount Number number of times the pin can be cloned (or -1 for unlimited
autoCloneNameTemplate string template to use for generating a unique name for clned pins

daggerBasePin.cloned(fromMaster)

called after a pin was cloned. Override to copy needed values from the given pin. Subclasses MUST always call the super class.

Kind: instance method of DaggerBasePin

Param Type
fromMaster DaggerBasePin

daggerBasePin._clone()

called from the dagger graph when a pin that is clonable is connected. we can call new on 'this.constructor' to create a new instance of whatever subclass this is.

Kind: instance method of DaggerBasePin

daggerBasePin.onRemoved()

Called by the pin collection when the pin is removed. Override to provide cleanup for a pin.

Kind: instance method of DaggerBasePin

daggerBasePin.purgeAll()

Clean up when object hierarchy is unraveled. Subclasses should always super.

Kind: instance method of DaggerBasePin

DaggerBasePin.PinDirection

Enum PinDirection

Kind: static property of DaggerBasePin

DaggerGraph ⇐ DaggerBase

Class that represents a collection of DaggerNodes interconnected via DaggerBasePins

Kind: global class
Extends: DaggerBase

new DaggerGraph()

DaggerGraph ctor

daggerGraph.nodes ⇒ array

Get all the nodes in the graph

Kind: instance property of DaggerGraph

daggerGraph.instanceID ⇒ string

Get the unique id for this instance

Kind: instance property of DaggerGraph

daggerGraph.parent ⇒ DaggerBase

Get the parent DaggerBase object this object belongs to

Kind: instance property of DaggerGraph
Overrides: parent

daggerGraph.topLevelNodes(topology_system)

Get list of all nodes that have no connected input pins with the given topology

Kind: instance method of DaggerGraph

Param Type Default
topology_system Number 0

daggerGraph.calculateTopology()

Called internally every time an action alters the topology of the graph.

Kind: instance method of DaggerGraph

daggerGraph.maxOrdinal(topology_system) ⇒ Number

Get the highest ordinal for the given topology system

Kind: instance method of DaggerGraph

Param Type Default
topology_system Number 0

daggerGraph.subGraphCount(topology_system) ⇒ Number

Get the number of subgraphs in the DaggerGraph

Kind: instance method of DaggerGraph

Param Type Default
topology_system Number 0

daggerGraph.beforePinsConnected(connectFrom, connectTo) ⇒ boolean

Called before two pins are disconnected to test if they are currently allowed to disconnect. Override to provide logic for cases when pins are not allowed to disconnect (ie, data is being processed). If the method returns false, the pins will fail to disconnect.

Kind: instance method of DaggerGraph

Param Type
connectFrom DaggerBasePin
connectTo DaggerBasePin

daggerGraph.afterPinsConnected(connectFrom, connectTo)

Called after two pins are connected to test if either needs to be cloned.

Kind: instance method of DaggerGraph

Param Type
connectFrom DaggerBasePin
connectTo DaggerBasePin

daggerGraph.topLevelNodes(topology_system) ⇒ array

Get list of all nodes that have no connected input pins

Kind: instance method of DaggerGraph

Param Type Default
topology_system Number 0

daggerGraph.bottomLevelNodes(topology_system) ⇒ array

Get list of all nodes that have no connected output pins

Kind: instance method of DaggerGraph

Param Type Default
topology_system Number 0

daggerGraph.getSubGraphNodes(index, topology_system) ⇒ array

Returns a list of nodes in a certain subgraph with the given topology system

Kind: instance method of DaggerGraph

Param Type Default
index Number
topology_system Number 0

daggerGraph.getSubGraphs(topology_system) ⇒ array

Return an array containing arrays of nodes for each subgraph in the graph

Kind: instance method of DaggerGraph

Param Type Default
topology_system Number 0

daggerGraph.getNodesWithName(name) ⇒ array

Get a list of all nodes with the given name.

Kind: instance method of DaggerGraph

Param Type
name string

daggerGraph.getPinWithInstanceID(pinInstanceID) ⇒ DaggerBasePin

Find and return a pin that has the given instanceID

Kind: instance method of DaggerGraph

Param Type
pinInstanceID string

daggerGraph.getNodeWithInstanceID(nodeInstanceID) ⇒ DaggerNode

Find and return a node with the given instanceID

Kind: instance method of DaggerGraph

Param Type
nodeInstanceID string

daggerGraph.allConnections(topology_system) ⇒ array

Get an array of all DaggerInputPins that are connected

Kind: instance method of DaggerGraph

Param Type Default
topology_system number 0

daggerGraph.removeNode(node) ⇒ boolean

Remove a node from the graph. If the node has any connections, they are disconnected first

Kind: instance method of DaggerGraph

Param Type
node DaggerNode

daggerGraph.addNode(node) ⇒ boolean

Add a node to the graph

Kind: instance method of DaggerGraph

Param Type
node DaggerNode

DaggerInputPin ⇐ DaggerBasePin

Class that represents a directed input into a DaggerNode

Kind: global class
Extends: DaggerBasePin

new DaggerInputPin()

DaggerInputPin ctor

daggerInputPin.direction ⇒ DaggerBasePin.PinDirection.Input

Get the pin's direction

Kind: instance property of DaggerInputPin
Overrides: direction

daggerInputPin.connectedTo ⇒ DaggerOutputPin

Get the DaggerOutputPin this pin is connected to

Kind: instance property of DaggerInputPin

daggerInputPin.connectedToUUID ⇒ string

Get the instance ID of the DaggerOutputPin this pin is connected to.

Kind: instance property of DaggerInputPin

daggerInputPin.isConnected ⇒ boolean

Get if this pin is connected

Kind: instance property of DaggerInputPin
Overrides: isConnected

daggerInputPin.pinName ⇒ string

Get the pin's name

Kind: instance property of DaggerInputPin
Overrides: pinName

daggerInputPin.parentNode ⇒ DaggerNode

Get the node this belongs to

Kind: instance property of DaggerInputPin
Overrides: parentNode

daggerInputPin.isInputPin ⇒ boolean

Get if this is an Input pin

Kind: instance property of DaggerInputPin

daggerInputPin.autoCloneRefCount ⇒ Number

Get the total number of times the pin was auto cloned. Used to generate cloned pin names

Kind: instance property of DaggerInputPin

daggerInputPin.autoCloneCount ⇒ Number

Get the number of times this pin was auto-cloned

Kind: instance property of DaggerInputPin

daggerInputPin.maxAutoClone ⇒ Number

Get the maximum number of times this pin can be auto-cloned (or -1 for unlimited)

Kind: instance property of DaggerInputPin

daggerInputPin.autoCloneNameTemplate ⇒ string

Get the template that is used for creating a unique name for cloned pins ie. 'myPin %'

Kind: instance property of DaggerInputPin

daggerInputPin.index ⇒ Number

Get the index of this pin within it's pin collection (or -1 if not known)

Kind: instance property of DaggerInputPin

daggerInputPin.autoCloneMaster ⇒ DaggerBasePin

Get the pin that this pin will clone from when connected

Kind: instance property of DaggerInputPin

daggerInputPin.isAutoCloned ⇒ boolean

Get if this pin is an auto-cloned pin.

Kind: instance property of DaggerInputPin

daggerInputPin.canRename ⇒ boolean

Get if this pin can be renamed. Pin's should rarely be allowed to be renamed as every pin in a DaggerPinCollection MUST have a unique name

Kind: instance property of DaggerInputPin
Overrides: canRename

daggerInputPin.topologySystem ⇒ boolean

Get the topology system this pin belongs to.

Kind: instance property of DaggerInputPin

daggerInputPin.originalName ⇒ string

Get the original name of pin if the pin was renamed

Kind: instance property of DaggerInputPin

daggerInputPin.instanceID ⇒ string

Get the unique id for this instance

Kind: instance property of DaggerInputPin

daggerInputPin.parent ⇒ DaggerBase

Get the parent DaggerBase object this object belongs to

Kind: instance property of DaggerInputPin

daggerInputPin.canConnectToPin(pin)

Returns true if this pin can connect to the given DaggerOutputPin

Kind: instance method of DaggerInputPin
Overrides: canConnectToPin

Param Type
pin DaggerOutputPin

daggerInputPin.disconnectPin(forceDisconnect)

Disconnects this pin.

Kind: instance method of DaggerInputPin

Param Type Default Description
forceDisconnect boolean false when true, the pin will disconnect regardless if the topology says it shouldn't

daggerInputPin.purgeAll()

Clean up when object hierarchy is unraveled. Subclasses should always super.

Kind: instance method of DaggerInputPin
Overrides: purgeAll

daggerInputPin.getAutoClone() ⇒ boolean

Get if this pin auto-clones when connected

Kind: instance method of DaggerInputPin

daggerInputPin.setAutoClone(maxAutoCloneCount, autoCloneNameTemplate)

Set if this pin auto-clones when connected

Kind: instance method of DaggerInputPin

Param Type Description
maxAutoCloneCount Number number of times the pin can be cloned (or -1 for unlimited
autoCloneNameTemplate string template to use for generating a unique name for clned pins

daggerInputPin.cloned(fromMaster)

called after a pin was cloned. Override to copy needed values from the given pin. Subclasses MUST always call the super class.

Kind: instance method of DaggerInputPin

Param Type
fromMaster DaggerBasePin

daggerInputPin._clone()

called from the dagger graph when a pin that is clonable is connected. we can call new on 'this.constructor' to create a new instance of whatever subclass this is.

Kind: instance method of DaggerInputPin

daggerInputPin.onRemoved()

Called by the pin collection when the pin is removed. Override to provide cleanup for a pin.

Kind: instance method of DaggerInputPin

DaggerNode ⇐ DaggerBase

Class that represents a node (or vertex) which is the fundamental unit of which DaggerGraphs are formed. A DaggerNode can be shared with multiple topologies with each topology having two DaggerPinCollections per node (one for each direction).

Kind: global class
Extends: DaggerBase

new DaggerNode()

DaggerNode ctor

daggerNode.parentGraph ⇒ DaggerGraph

Get the graph this node belongs to

Kind: instance property of DaggerNode

daggerNode.name

Get the name for this node.

Kind: instance property of DaggerNode

daggerNode.name

Set the name for this node.

Kind: instance property of DaggerNode

daggerNode.instanceID ⇒ string

Get the unique id for this instance

Kind: instance property of DaggerNode

daggerNode.parent ⇒ DaggerBase

Get the parent DaggerBase object this object belongs to

Kind: instance property of DaggerNode
Overrides: parent

daggerNode.ordinal(topology_system) ⇒ number

Get the order of causality for the given topology that this node represents.

Kind: instance method of DaggerNode

Param Type Default
topology_system number 0

daggerNode.subgraphAffiliation(topology_system) ⇒ number

Get the index of the subgraph this node belongs to.

Kind: instance method of DaggerNode

Param Type Default
topology_system number 0

daggerNode.inputPins(topology_system) ⇒ DaggerPinCollection

Get the DaggerPinCollection for the input pins of the given topology.

Kind: instance method of DaggerNode

Param Type Default
topology_system number 0

daggerNode.outputPins(topology_system) ⇒ DaggerPinCollection

Get the DaggerPinCollection for the output pins of the given topology.

Kind: instance method of DaggerNode

Param Type Default
topology_system number 0

daggerNode.descendents(topology_system) ⇒ array

Get the list of nodes that the 'cause' of this node will 'effect'

Kind: instance method of DaggerNode

Param Type Default
topology_system number 0

daggerNode.ascendents(topology_system) ⇒ array

Get the list of nodes that 'cause' this node.

Kind: instance method of DaggerNode

Param Type Default
topology_system number 0

daggerNode.isTopLevel(topology_system) ⇒ boolean

Get if this node has no connected input pins for the given topology.

Kind: instance method of DaggerNode

Param Type Default
topology_system number 0

daggerNode.isBottomLevel(topology_system) ⇒ boolean

Get if this node has no connected output pins for the given topology.

Kind: instance method of DaggerNode

Param Type Default
topology_system number 0

daggerNode.disconnectAllPins()

Disconnect all this node's pins on all of it's topologies.

Kind: instance method of DaggerNode

daggerNode.getDaggerOutputPin(withName, topology_system) ⇒ DaggerOutputPin

Find and return the DaggerOutputPin with the given name.

Kind: instance method of DaggerNode

Param Type Default
withName string
topology_system number 0

daggerNode.getDaggerInputPin(withName, topology_system) ⇒ DaggerOutputPin

Find and return the DaggerInput with the given name.

Kind: instance method of DaggerNode

Param Type Default
withName string
topology_system number 0

daggerNode.isTrueSource(topology_system)

Returns true if this node has no input pins.

Kind: instance method of DaggerNode

Param Type Default
topology_system number 0

daggerNode.isTrueDest(topology_system)

Returns true if this node has no output pins.

Kind: instance method of DaggerNode

Param Type Default
topology_system number 0

daggerNode.shouldClonePin(pin) ⇒ boolean

Called by DaggerGraph after pins are connected to see if a pin should be cloned. When subclassing DaggerNode the subclass SHOULD call super.shouldClonePin.

Kind: instance method of DaggerNode

Param Type
pin DaggerBasePin

daggerNode.renamePin(pin, pinName) ⇒ boolean

rename a given pin. Fails if pin is not flagged with canRename. Rarely should a pin be renamed.

Kind: instance method of DaggerNode

Param Type
pin DaggerBasePin
pinName string

daggerNode.clonePin(pin, forceAutoCloneMaster) ⇒ DaggerBasePin

called by DaggerGraph after pins are connected to clone a pin if forceAutoCloneMaster is not null, the pin will be cloned from forceAutoCloneMaster instead of it's own autoCloneMaster property.

Kind: instance method of DaggerNode

Param Type Default
pin DaggerBasePin
forceAutoCloneMaster DaggerBasePin

daggerNode.shouldRemoveClonePin(pin) ⇒ boolean

Called by DaggerGraph after pins are disconnected to determine if an autocloned pin should be removed

Kind: instance method of DaggerNode

Param Type
pin DaggerBasePin

daggerNode.removeClonePin(pin) ⇒ boolean

Called by DaggerGraph to remove a cloned pin (The pin that is removed might not be the one that is requested).

Kind: instance method of DaggerNode

Param Type
pin DaggerBasePin

daggerNode.canRemovePin(pin) ⇒ boolean

Override to allow a node to be able to decide if a pin can actually be removed. Also usefull to detect that a pin is about to be removed.

Kind: instance method of DaggerNode

Param Type
pin DaggerBasePin

daggerNode.addedToGraph()

Override to add logic for a node to respond to being parented to a graph

Kind: instance method of DaggerNode

daggerNode.purgeAll()

Clean up when object hierarchy is unraveled. Subclasses should always super.

Kind: instance method of DaggerNode

DaggerOutputPin ⇐ DaggerBasePin

Class that represents a directed output out of a DaggerNode

Kind: global class
Extends: DaggerBasePin

new DaggerOutputPin()

DaggerOutputPin ctor

daggerOutputPin.direction ⇒ DaggerBasePin.PinDirection.Output

Get the pin's direction

Kind: instance property of DaggerOutputPin
Overrides: direction

daggerOutputPin.connectedTo ⇒ array

Get list of all DaggerInputPins this pin is connected to.

Kind: instance property of DaggerOutputPin

daggerOutputPin.allowMultiConnect ⇒ boolean

Get if this output pin allows for multiple connections (typically true)

Kind: instance property of DaggerOutputPin

daggerOutputPin.allowMultiConnect

Set if this output pin allows for multiple connections.

Kind: instance property of DaggerOutputPin

daggerOutputPin.isConnected ⇒ boolean

Get if this pin has any connections.

Kind: instance property of DaggerOutputPin
Overrides: isConnected

daggerOutputPin.connectedToUUIDs ⇒ array

Get a list of instance IDs for each DaggerInputPin this pin is connected to.

Kind: instance property of DaggerOutputPin

daggerOutputPin.pinName ⇒ string

Get the pin's name

Kind: instance property of DaggerOutputPin
Overrides: pinName

daggerOutputPin.parentNode ⇒ DaggerNode

Get the node this belongs to

Kind: instance property of DaggerOutputPin
Overrides: parentNode

daggerOutputPin.isInputPin ⇒ boolean

Get if this is an Input pin

Kind: instance property of DaggerOutputPin

daggerOutputPin.autoCloneRefCount ⇒ Number

Get the total number of times the pin was auto cloned. Used to generate cloned pin names

Kind: instance property of DaggerOutputPin

daggerOutputPin.autoCloneCount ⇒ Number

Get the number of times this pin was auto-cloned

Kind: instance property of DaggerOutputPin

daggerOutputPin.maxAutoClone ⇒ Number

Get the maximum number of times this pin can be auto-cloned (or -1 for unlimited)

Kind: instance property of DaggerOutputPin

daggerOutputPin.autoCloneNameTemplate ⇒ string

Get the template that is used for creating a unique name for cloned pins ie. 'myPin %'

Kind: instance property of DaggerOutputPin

daggerOutputPin.index ⇒ Number

Get the index of this pin within it's pin collection (or -1 if not known)

Kind: instance property of DaggerOutputPin

daggerOutputPin.autoCloneMaster ⇒ DaggerBasePin

Get the pin that this pin will clone from when connected

Kind: instance property of DaggerOutputPin

daggerOutputPin.isAutoCloned ⇒ boolean

Get if this pin is an auto-cloned pin.

Kind: instance property of DaggerOutputPin

daggerOutputPin.canRename ⇒ boolean

Get if this pin can be renamed. Pin's should rarely be allowed to be renamed as every pin in a DaggerPinCollection MUST have a unique name

Kind: instance property of DaggerOutputPin
Overrides: canRename

daggerOutputPin.topologySystem ⇒ boolean

Get the topology system this pin belongs to.

Kind: instance property of DaggerOutputPin

daggerOutputPin.originalName ⇒ string

Get the original name of pin if the pin was renamed

Kind: instance property of DaggerOutputPin

daggerOutputPin.instanceID ⇒ string

Get the unique id for this instance

Kind: instance property of DaggerOutputPin

daggerOutputPin.parent ⇒ DaggerBase

Get the parent DaggerBase object this object belongs to

Kind: instance property of DaggerOutputPin

daggerOutputPin.connectToInput(input) ⇒ boolean

Connect this pin to the given DaggerInputPin

Kind: instance method of DaggerOutputPin

Param Type
input DaggerInputPin

daggerOutputPin.canConnectToPin(pin) ⇒ boolean

Get if this pin can connect to the given DaggerInputPin

Kind: instance method of DaggerOutputPin
Overrides: canConnectToPin

Param Type
pin DaggerInputPin

daggerOutputPin.disconnectPin(ipin, forceDisconnect) ⇒ boolean

Disconnect this pin from the given DaggerInputPin

Kind: instance method of DaggerOutputPin

Param Type Description
ipin DaggerInputPin
forceDisconnect boolean when true, the pin will disconnect regardless if the topology says it shouldn't

daggerOutputPin.disconnectAll(forceDisconnect) ⇒ boolean

Disconnect this pin from all DaggerInputPins.

Kind: instance method of DaggerOutputPin

Param Type Description
forceDisconnect boolean when true, the pin will disconnect regardless if the topology says it shouldn't

daggerOutputPin.purgeAll()

Clean up when object hierarchy is unraveled. Subclasses should always super.

Kind: instance method of DaggerOutputPin
Overrides: purgeAll

daggerOutputPin.getAutoClone() ⇒ boolean

Get if this pin auto-clones when connected

Kind: instance method of DaggerOutputPin

daggerOutputPin.setAutoClone(maxAutoCloneCount, autoCloneNameTemplate)

Set if this pin auto-clones when connected

Kind: instance method of DaggerOutputPin

Param Type Description
maxAutoCloneCount Number number of times the pin can be cloned (or -1 for unlimited
autoCloneNameTemplate string template to use for generating a unique name for clned pins

daggerOutputPin.cloned(fromMaster)

called after a pin was cloned. Override to copy needed values from the given pin. Subclasses MUST always call the super class.

Kind: instance method of DaggerOutputPin

Param Type
fromMaster DaggerBasePin

daggerOutputPin._clone()

called from the dagger graph when a pin that is clonable is connected. we can call new on 'this.constructor' to create a new instance of whatever subclass this is.

Kind: instance method of DaggerOutputPin

daggerOutputPin.onRemoved()

Called by the pin collection when the pin is removed. Override to provide cleanup for a pin.

Kind: instance method of DaggerOutputPin

DaggerPinCollection ⇐ DaggerBase

Class that acts as a container for pins of one particular direction.

Kind: global class
Extends: DaggerBase

new DaggerPinCollection(parentNode, direction, topology_system)

DaggerPinCollection ctor

Param Type
parentNode DaggerNode
direction PinDirection
topology_system number

daggerPinCollection.topologySystem ⇒ number

Get the topology system this pin collection belongs to.

Kind: instance property of DaggerPinCollection

daggerPinCollection.parentNode

get the parent node (same result as DaggerBase.parent)

Kind: instance property of DaggerPinCollection

daggerPinCollection.pinDirection

get the direction of pins in this collection

Kind: instance property of DaggerPinCollection

daggerPinCollection.allPins ⇒ array

Get list of all the pins in the collection

Kind: instance property of DaggerPinCollection

daggerPinCollection.allNonConnectedPins ⇒ array

Get list of all pins in the collection that are not connected.

Kind: instance property of DaggerPinCollection

daggerPinCollection.allConnectedPins ⇒ array

Get list of all pins in the collection that are connected.

Kind: instance property of DaggerPinCollection

daggerPinCollection.firstUnconnectedPin ⇒ DaggerBasePin

Find the first unconnected pin or null if no pins are unconnected.

Kind: instance property of DaggerPinCollection

daggerPinCollection.instanceID ⇒ string

Get the unique id for this instance

Kind: instance property of DaggerPinCollection

daggerPinCollection.parent ⇒ DaggerBase

Get the parent DaggerBase object this object belongs to

Kind: instance property of DaggerPinCollection
Overrides: parent

daggerPinCollection.pin(withName) ⇒ DaggerBasePin

Find and return a pin with the given name.

Kind: instance method of DaggerPinCollection

Param Type
withName string

daggerPinCollection.addPin(pin, name) ⇒ boolean

Add a given pin to this collection.

Kind: instance method of DaggerPinCollection

Param Type
pin DaggerBasePin
name string

daggerPinCollection.setPinName(pin, name) ⇒ boolean

Set the name for a given pin. If the pin's name has already been set, and the pin isn't allowed to be renamed, this will return 'false'

Kind: instance method of DaggerPinCollection

Param Type
pin DaggerBasePin
name string

daggerPinCollection.removePin(pin)

Remove a given pin from this collection.

Kind: instance method of DaggerPinCollection

Param Type
pin DaggerBasePin

daggerPinCollection.index(pin) ⇒ number

Get the index of the given pin in the collection

Kind: instance method of DaggerPinCollection

Param Type
pin DaggerBasePin

daggerPinCollection.purgeAll()

Clean up when object hierarchy is unraveled. Subclasses should always super.

Kind: instance method of DaggerPinCollection