- 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.
- DaggerBasePin ⇐
DaggerBase The base class for all Dagger Pins - Dagger pins represent points between two nodes that can connected
- DaggerGraph ⇐
DaggerBase Class that represents a collection of DaggerNodes interconnected via DaggerBasePins
- DaggerInputPin ⇐
DaggerBasePin Class that represents a directed input into a DaggerNode
- 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).
- DaggerOutputPin ⇐
DaggerBasePin Class that represents a directed output out of a DaggerNode
- DaggerPinCollection ⇐
DaggerBase Class that acts as a container for pins of one particular direction.
Base class for all Dagger objects.
Kind: global class
- DaggerBase
- new DaggerBase()
- .instanceID ⇒
string - .parent ⇒
DaggerBase - .parent
DaggerBase ctor
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
Set the parent DaggerBase object this object belongs to
Kind: instance property of DaggerBase
| Param | Type |
|---|---|
| p | DaggerBase |
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
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();Add a connection callback
Kind: instance method of DaggerSignal
| Param | Type |
|---|---|
| slot | function |
Remove a connection callback
Kind: instance method of DaggerSignal
| Param | Type |
|---|---|
| slot | function |
Remova all connection callbacks
Kind: instance method of DaggerSignal
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
- DaggerBasePin ⇐
DaggerBase- new DaggerBasePin()
- instance
- .direction ⇒
PinDirection - .pinName ⇒
string - .pinName
- .parentNode ⇒
DaggerNode - .parentNode
- .isInputPin ⇒
boolean - .autoCloneRefCount ⇒
Number - .autoCloneCount ⇒
Number - .maxAutoClone ⇒
Number - .autoCloneNameTemplate ⇒
string - .index ⇒
Number - .autoCloneMaster ⇒
DaggerBasePin - .isAutoCloned ⇒
boolean - .canRename ⇒
boolean - .canRename
- .topologySystem ⇒
boolean - .isConnected ⇒
boolean - .originalName ⇒
string - .instanceID ⇒
string - .parent ⇒
DaggerBase - .canConnectToPin(pin) ⇒
boolean - .getAutoClone() ⇒
boolean - .setAutoClone(maxAutoCloneCount, autoCloneNameTemplate)
- .cloned(fromMaster)
- ._clone()
- .onRemoved()
- .purgeAll()
- .direction ⇒
- static
DaggerBasePin ctor
daggerBasePin.direction ⇒ PinDirection
Get the direction of flow this pin represents
Kind: instance property of DaggerBasePin
Get the pin's name
Kind: instance property of DaggerBasePin
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
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 |
Get if this is an Input pin
Kind: instance property of DaggerBasePin
Get the total number of times the pin was auto cloned. Used to generate cloned pin names
Kind: instance property of DaggerBasePin
Get the number of times this pin was auto-cloned
Kind: instance property of DaggerBasePin
Get the maximum number of times this pin can be auto-cloned (or -1 for unlimited)
Kind: instance property of DaggerBasePin
Get the template that is used for creating a unique name for cloned pins ie. 'myPin %'
Kind: instance property of DaggerBasePin
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
Get if this pin is an auto-cloned pin.
Kind: instance property of DaggerBasePin
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
Set if the pin can be renamed.
Kind: instance property of DaggerBasePin
| Param | Type |
|---|---|
| val | boolean |
Get the topology system this pin belongs to.
Kind: instance property of DaggerBasePin
Get if this pin has a connection to another pin
Kind: instance property of DaggerBasePin
Get the original name of pin if the pin was renamed
Kind: instance property of DaggerBasePin
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
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 |
Get if this pin auto-clones when connected
Kind: instance method of DaggerBasePin
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 |
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 |
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
Called by the pin collection when the pin is removed. Override to provide cleanup for a pin.
Kind: instance method of DaggerBasePin
Clean up when object hierarchy is unraveled. Subclasses should always super.
Kind: instance method of DaggerBasePin
Enum PinDirection
Kind: static property of DaggerBasePin
DaggerGraph ⇐ DaggerBase
Class that represents a collection of DaggerNodes interconnected via DaggerBasePins
Kind: global class
Extends: DaggerBase
- DaggerGraph ⇐
DaggerBase- new DaggerGraph()
- .nodes ⇒
array - .instanceID ⇒
string - .parent ⇒
DaggerBase - .topLevelNodes(topology_system)
- .calculateTopology()
- .maxOrdinal(topology_system) ⇒
Number - .subGraphCount(topology_system) ⇒
Number - .beforePinsConnected(connectFrom, connectTo) ⇒
boolean - .afterPinsConnected(connectFrom, connectTo)
- .topLevelNodes(topology_system) ⇒
array - .bottomLevelNodes(topology_system) ⇒
array - .getSubGraphNodes(index, topology_system) ⇒
array - .getSubGraphs(topology_system) ⇒
array - .getNodesWithName(name) ⇒
array - .getPinWithInstanceID(pinInstanceID) ⇒
DaggerBasePin - .getNodeWithInstanceID(nodeInstanceID) ⇒
DaggerNode - .allConnections(topology_system) ⇒
array - .removeNode(node) ⇒
boolean - .addNode(node) ⇒
boolean
DaggerGraph ctor
Get all the nodes in the graph
Kind: instance property of DaggerGraph
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
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 |
Called internally every time an action alters the topology of the graph.
Kind: instance method of DaggerGraph
Get the highest ordinal for the given topology system
Kind: instance method of DaggerGraph
| Param | Type | Default |
|---|---|---|
| topology_system | Number |
0 |
Get the number of subgraphs in the DaggerGraph
Kind: instance method of DaggerGraph
| Param | Type | Default |
|---|---|---|
| topology_system | Number |
0 |
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 |
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 |
Get list of all nodes that have no connected input pins
Kind: instance method of DaggerGraph
| Param | Type | Default |
|---|---|---|
| topology_system | Number |
0 |
Get list of all nodes that have no connected output pins
Kind: instance method of DaggerGraph
| Param | Type | Default |
|---|---|---|
| topology_system | Number |
0 |
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 |
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 |
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 |
Get an array of all DaggerInputPins that are connected
Kind: instance method of DaggerGraph
| Param | Type | Default |
|---|---|---|
| topology_system | number |
0 |
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 |
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
- DaggerInputPin ⇐
DaggerBasePin- new DaggerInputPin()
- .direction ⇒
DaggerBasePin.PinDirection.Input - .connectedTo ⇒
DaggerOutputPin - .connectedToUUID ⇒
string - .isConnected ⇒
boolean - .pinName ⇒
string - .parentNode ⇒
DaggerNode - .isInputPin ⇒
boolean - .autoCloneRefCount ⇒
Number - .autoCloneCount ⇒
Number - .maxAutoClone ⇒
Number - .autoCloneNameTemplate ⇒
string - .index ⇒
Number - .autoCloneMaster ⇒
DaggerBasePin - .isAutoCloned ⇒
boolean - .canRename ⇒
boolean - .topologySystem ⇒
boolean - .originalName ⇒
string - .instanceID ⇒
string - .parent ⇒
DaggerBase - .canConnectToPin(pin)
- .disconnectPin(forceDisconnect)
- .purgeAll()
- .getAutoClone() ⇒
boolean - .setAutoClone(maxAutoCloneCount, autoCloneNameTemplate)
- .cloned(fromMaster)
- ._clone()
- .onRemoved()
DaggerInputPin ctor
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
Get the instance ID of the DaggerOutputPin this pin is connected to.
Kind: instance property of DaggerInputPin
Get if this pin is connected
Kind: instance property of DaggerInputPin
Overrides: isConnected
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
Get if this is an Input pin
Kind: instance property of DaggerInputPin
Get the total number of times the pin was auto cloned. Used to generate cloned pin names
Kind: instance property of DaggerInputPin
Get the number of times this pin was auto-cloned
Kind: instance property of DaggerInputPin
Get the maximum number of times this pin can be auto-cloned (or -1 for unlimited)
Kind: instance property of DaggerInputPin
Get the template that is used for creating a unique name for cloned pins ie. 'myPin %'
Kind: instance property of DaggerInputPin
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
Get if this pin is an auto-cloned pin.
Kind: instance property of DaggerInputPin
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
Get the topology system this pin belongs to.
Kind: instance property of DaggerInputPin
Get the original name of pin if the pin was renamed
Kind: instance property of DaggerInputPin
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
Returns true if this pin can connect to the given DaggerOutputPin
Kind: instance method of DaggerInputPin
Overrides: canConnectToPin
| Param | Type |
|---|---|
| pin | DaggerOutputPin |
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 |
Clean up when object hierarchy is unraveled. Subclasses should always super.
Kind: instance method of DaggerInputPin
Overrides: purgeAll
Get if this pin auto-clones when connected
Kind: instance method of DaggerInputPin
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 |
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 |
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
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
- DaggerNode ⇐
DaggerBase- new DaggerNode()
- .parentGraph ⇒
DaggerGraph - .name
- .name
- .instanceID ⇒
string - .parent ⇒
DaggerBase - .ordinal(topology_system) ⇒
number - .subgraphAffiliation(topology_system) ⇒
number - .inputPins(topology_system) ⇒
DaggerPinCollection - .outputPins(topology_system) ⇒
DaggerPinCollection - .descendents(topology_system) ⇒
array - .ascendents(topology_system) ⇒
array - .isTopLevel(topology_system) ⇒
boolean - .isBottomLevel(topology_system) ⇒
boolean - .disconnectAllPins()
- .getDaggerOutputPin(withName, topology_system) ⇒
DaggerOutputPin - .getDaggerInputPin(withName, topology_system) ⇒
DaggerOutputPin - .isTrueSource(topology_system)
- .isTrueDest(topology_system)
- .shouldClonePin(pin) ⇒
boolean - .renamePin(pin, pinName) ⇒
boolean - .clonePin(pin, forceAutoCloneMaster) ⇒
DaggerBasePin - .shouldRemoveClonePin(pin) ⇒
boolean - .removeClonePin(pin) ⇒
boolean - .canRemovePin(pin) ⇒
boolean - .addedToGraph()
- .purgeAll()
DaggerNode ctor
daggerNode.parentGraph ⇒ DaggerGraph
Get the graph this node belongs to
Kind: instance property of DaggerNode
Get the name for this node.
Kind: instance property of DaggerNode
Set the name for this node.
Kind: instance property of DaggerNode
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
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 |
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 |
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 |
Get the list of nodes that 'cause' this node.
Kind: instance method of DaggerNode
| Param | Type | Default |
|---|---|---|
| topology_system | number |
0 |
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 |
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 |
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 |
Returns true if this node has no input pins.
Kind: instance method of DaggerNode
| Param | Type | Default |
|---|---|---|
| topology_system | number |
0 |
Returns true if this node has no output pins.
Kind: instance method of DaggerNode
| Param | Type | Default |
|---|---|---|
| topology_system | number |
0 |
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 |
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 |
|
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 |
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 |
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 |
Override to add logic for a node to respond to being parented to a graph
Kind: instance method of DaggerNode
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
- DaggerOutputPin ⇐
DaggerBasePin- new DaggerOutputPin()
- .direction ⇒
DaggerBasePin.PinDirection.Output - .connectedTo ⇒
array - .allowMultiConnect ⇒
boolean - .allowMultiConnect
- .isConnected ⇒
boolean - .connectedToUUIDs ⇒
array - .pinName ⇒
string - .parentNode ⇒
DaggerNode - .isInputPin ⇒
boolean - .autoCloneRefCount ⇒
Number - .autoCloneCount ⇒
Number - .maxAutoClone ⇒
Number - .autoCloneNameTemplate ⇒
string - .index ⇒
Number - .autoCloneMaster ⇒
DaggerBasePin - .isAutoCloned ⇒
boolean - .canRename ⇒
boolean - .topologySystem ⇒
boolean - .originalName ⇒
string - .instanceID ⇒
string - .parent ⇒
DaggerBase - .connectToInput(input) ⇒
boolean - .canConnectToPin(pin) ⇒
boolean - .disconnectPin(ipin, forceDisconnect) ⇒
boolean - .disconnectAll(forceDisconnect) ⇒
boolean - .purgeAll()
- .getAutoClone() ⇒
boolean - .setAutoClone(maxAutoCloneCount, autoCloneNameTemplate)
- .cloned(fromMaster)
- ._clone()
- .onRemoved()
DaggerOutputPin ctor
Get the pin's direction
Kind: instance property of DaggerOutputPin
Overrides: direction
Get list of all DaggerInputPins this pin is connected to.
Kind: instance property of DaggerOutputPin
Get if this output pin allows for multiple connections (typically true)
Kind: instance property of DaggerOutputPin
Set if this output pin allows for multiple connections.
Kind: instance property of DaggerOutputPin
Get if this pin has any connections.
Kind: instance property of DaggerOutputPin
Overrides: isConnected
Get a list of instance IDs for each DaggerInputPin this pin is connected to.
Kind: instance property of DaggerOutputPin
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
Get if this is an Input pin
Kind: instance property of DaggerOutputPin
Get the total number of times the pin was auto cloned. Used to generate cloned pin names
Kind: instance property of DaggerOutputPin
Get the number of times this pin was auto-cloned
Kind: instance property of DaggerOutputPin
Get the maximum number of times this pin can be auto-cloned (or -1 for unlimited)
Kind: instance property of DaggerOutputPin
Get the template that is used for creating a unique name for cloned pins ie. 'myPin %'
Kind: instance property of DaggerOutputPin
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
Get if this pin is an auto-cloned pin.
Kind: instance property of DaggerOutputPin
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
Get the topology system this pin belongs to.
Kind: instance property of DaggerOutputPin
Get the original name of pin if the pin was renamed
Kind: instance property of DaggerOutputPin
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
Connect this pin to the given DaggerInputPin
Kind: instance method of DaggerOutputPin
| Param | Type |
|---|---|
| input | DaggerInputPin |
Get if this pin can connect to the given DaggerInputPin
Kind: instance method of DaggerOutputPin
Overrides: canConnectToPin
| Param | Type |
|---|---|
| pin | DaggerInputPin |
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 |
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 |
Clean up when object hierarchy is unraveled. Subclasses should always super.
Kind: instance method of DaggerOutputPin
Overrides: purgeAll
Get if this pin auto-clones when connected
Kind: instance method of DaggerOutputPin
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 |
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 |
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
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
- DaggerPinCollection ⇐
DaggerBase- new DaggerPinCollection(parentNode, direction, topology_system)
- .topologySystem ⇒
number - .parentNode
- .pinDirection
- .allPins ⇒
array - .allNonConnectedPins ⇒
array - .allConnectedPins ⇒
array - .firstUnconnectedPin ⇒
DaggerBasePin - .instanceID ⇒
string - .parent ⇒
DaggerBase - .pin(withName) ⇒
DaggerBasePin - .addPin(pin, name) ⇒
boolean - .setPinName(pin, name) ⇒
boolean - .removePin(pin)
- .index(pin) ⇒
number - .purgeAll()
DaggerPinCollection ctor
| Param | Type |
|---|---|
| parentNode | DaggerNode |
| direction | PinDirection |
| topology_system | number |
Get the topology system this pin collection belongs to.
Kind: instance property of DaggerPinCollection
get the parent node (same result as DaggerBase.parent)
Kind: instance property of DaggerPinCollection
get the direction of pins in this collection
Kind: instance property of DaggerPinCollection
Get list of all the pins in the collection
Kind: instance property of DaggerPinCollection
Get list of all pins in the collection that are not connected.
Kind: instance property of DaggerPinCollection
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
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 |
Add a given pin to this collection.
Kind: instance method of DaggerPinCollection
| Param | Type |
|---|---|
| pin | DaggerBasePin |
| name | string |
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 |
Remove a given pin from this collection.
Kind: instance method of DaggerPinCollection
| Param | Type |
|---|---|
| pin | DaggerBasePin |
Get the index of the given pin in the collection
Kind: instance method of DaggerPinCollection
| Param | Type |
|---|---|
| pin | DaggerBasePin |
Clean up when object hierarchy is unraveled. Subclasses should always super.
Kind: instance method of DaggerPinCollection