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, andNodeDescription
is a class. There can be multipleNodeInstance
s referencing the sameNodeDescription
.
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 NodeInstance
s referencing the same NodeDescription
.
Kind: global class
- NodeInstance
- .id :
number
- .description :
NodeDescription
- .endpoints :
Array.<NodeInstancePortReference>
- .parameters :
Object
- .outputsValues :
Array
- .connections :
List.<Connection>
- .dynamicPorts :
Array.<Port>
- .on
- .outEndpoints ⇒
Array.<NodeInstancePortReference>
- .inEndpoints ⇒
Array.<NodeInstancePortReference>
- .outConnections ⇒
Array.<Connection>
- .inConnections ⇒
Array.<Connection>
- .isNodeInstance :
boolean
- .getConnectionsByPort(port_id, direction, result) ⇒
number
- .setOutputValue(id, value)
- .getOutputValue(id) ⇒
*
- .getParameterValue(id) ⇒
T
|undefined
- .setParameterValue(id, value)
- .hasParameter(id) ⇒
boolean
- .deleteParameter(id) ⇒
boolean
- .setParameters(partial_hash)
- .setDescription(description)
- .getEndpoint(port_id) ⇒
NodeInstancePortReference
|undefined
- .getFirstEndpointByName(name) ⇒
undefined
|NodeInstancePortReference
- .hash() ⇒
number
- .equals(other) ⇒
boolean
- .id :
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
Param | Type |
---|---|
port_id | number |
direction | PortDirection |
result | Array.<Connection> |
nodeInstance.setOutputValue(id, value)
Kind: instance method of NodeInstance
Param | Type |
---|---|
id | number |
value | * |
nodeInstance.getOutputValue(id) ⇒ *
Kind: instance method of NodeInstance
Param | Type |
---|---|
id | number |
nodeInstance.getParameterValue(id) ⇒ T
| undefined
Kind: instance method of NodeInstance
Param | Type |
---|---|
id | string |
nodeInstance.setParameterValue(id, value)
Kind: instance method of NodeInstance
Param | Type |
---|---|
id | string |
value | T |
nodeInstance.hasParameter(id) ⇒ boolean
Kind: instance method of NodeInstance
Param | Type |
---|---|
id | string |
nodeInstance.deleteParameter(id) ⇒ boolean
Kind: instance method of NodeInstance
Param | Type |
---|---|
id | string |
nodeInstance.setParameters(partial_hash)
Will overwrite only those properties that are present in the hash
Kind: instance method of NodeInstance
Param | Type |
---|---|
partial_hash | Object |
nodeInstance.setDescription(description)
Kind: instance method of NodeInstance
Param | Type |
---|---|
description | NodeDescription |
nodeInstance.getEndpoint(port_id) ⇒ NodeInstancePortReference
| undefined
Kind: instance method of NodeInstance
Param | Type | Description |
---|---|---|
port_id | number | Port ID |
nodeInstance.getFirstEndpointByName(name) ⇒ undefined
| NodeInstancePortReference
Kind: instance method of NodeInstance
Param | Type |
---|---|
name | string |
nodeInstance.hash() ⇒ number
Kind: instance method of NodeInstance
nodeInstance.equals(other) ⇒ boolean
Kind: instance method of NodeInstance
Param | Type |
---|---|
other | NodeInstance |
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