Skip to main content

NodeInstance

Classes

NodeInstance

Represents a node instance in a graph, its main purpose is to provide connection medium for the graph. A useful analogy is that of a "class" and an "object", there can be multiple instances (objects) of the same class. In this analogy NodeInstance is the object, and NodeDescription is a class. There can be multiple NodeInstances referencing the same NodeDescription.

Members

id_counter : number
parameterChanged : Signal.<string, *, *>
parameterAdded : Signal.<string, *>
parameterRemoved : Signal.<string, *>
descriptionChanged : Signal.<NodeDescription, NodeDescription, NodeInstance>

fires: (newDescription:NodeDescription, oldDescription:NodeDescription|null, this)

NodeInstance

Represents a node instance in a graph, its main purpose is to provide connection medium for the graph. A useful analogy is that of a "class" and an "object", there can be multiple instances (objects) of the same class. In this analogy NodeInstance is the object, and NodeDescription is a class. There can be multiple NodeInstances referencing the same NodeDescription.

Kind: global class

nodeInstance.id : number

Unique identifier

Kind: instance property of NodeInstance
Read only: true

nodeInstance.description : NodeDescription

Kind: instance property of NodeInstance

nodeInstance.endpoints : Array.<NodeInstancePortReference>

Kind: instance property of NodeInstance

nodeInstance.parameters : Object

Internal instance data

Kind: instance property of NodeInstance

nodeInstance.outputsValues : Array

Kind: instance property of NodeInstance
Transient:

nodeInstance.connections : List.<Connection>

Kind: instance property of NodeInstance
Read only: true

nodeInstance.dynamicPorts : Array.<Port>

Extra ports that are present just on this instance, these exist in addition to ports from the description IDs of these ports must not collide with IDs of ports on the description TODO implement functionality

Kind: instance property of NodeInstance
Access: protected

nodeInstance.on

Kind: instance property of NodeInstance
Read only: true

nodeInstance.outEndpoints ⇒ Array.<NodeInstancePortReference>

Output port references

Kind: instance property of NodeInstance

nodeInstance.inEndpoints ⇒ Array.<NodeInstancePortReference>

Input port references

Kind: instance property of NodeInstance

nodeInstance.outConnections ⇒ Array.<Connection>

Outgoing connections from this node

Kind: instance property of NodeInstance

nodeInstance.inConnections ⇒ Array.<Connection>

Incoming connections to this node

Kind: instance property of NodeInstance

nodeInstance.isNodeInstance : boolean

Kind: instance property of NodeInstance
Read only: true

nodeInstance.getConnectionsByPort(port_id, direction, result) ⇒ number

Kind: instance method of NodeInstance
Returns: number - number of connections matched

ParamType
port_idnumber
directionPortDirection
resultArray.<Connection>

nodeInstance.setOutputValue(id, value)

Kind: instance method of NodeInstance

ParamType
idnumber
value*

nodeInstance.getOutputValue(id) ⇒ *

Kind: instance method of NodeInstance

ParamType
idnumber

nodeInstance.getParameterValue(id) ⇒ T | undefined

Kind: instance method of NodeInstance

ParamType
idstring

nodeInstance.setParameterValue(id, value)

Kind: instance method of NodeInstance

ParamType
idstring
valueT

nodeInstance.hasParameter(id) ⇒ boolean

Kind: instance method of NodeInstance

ParamType
idstring

nodeInstance.deleteParameter(id) ⇒ boolean

Kind: instance method of NodeInstance

ParamType
idstring

nodeInstance.setParameters(partial_hash)

Will overwrite only those properties that are present in the hash

Kind: instance method of NodeInstance

ParamType
partial_hashObject

nodeInstance.setDescription(description)

Kind: instance method of NodeInstance

ParamType
descriptionNodeDescription

nodeInstance.getEndpoint(port_id) ⇒ NodeInstancePortReference | undefined

Kind: instance method of NodeInstance

ParamTypeDescription
port_idnumberPort ID

nodeInstance.getFirstEndpointByName(name) ⇒ undefined | NodeInstancePortReference

Kind: instance method of NodeInstance

ParamType
namestring

nodeInstance.hash() ⇒ number

Kind: instance method of NodeInstance

nodeInstance.equals(other) ⇒ boolean

Kind: instance method of NodeInstance

ParamType
otherNodeInstance

id_counter : number

Kind: global variable

parameterChanged : Signal.<string, *, *>

Kind: global variable
Read only: true

parameterAdded : Signal.<string, *>

Kind: global variable
Read only: true

parameterRemoved : Signal.<string, *>

Kind: global variable
Read only: true

descriptionChanged : Signal.<NodeDescription, NodeDescription, NodeInstance>

fires: (newDescription:NodeDescription, oldDescription:NodeDescription|null, this)

Kind: global variable
Read only: true