Class FlowGraphDataConnection<T>
Type Parameters
- T
Hierarchy (View Summary)
- FlowGraphConnection<FlowGraphBlock, FlowGraphDataConnection<T>>
- FlowGraphDataConnection
Constructors
constructor
-
new FlowGraphDataConnection<T>(
name: string,
connectionType: FlowGraphConnectionType,
ownerBlock: FlowGraphBlock,
richType: RichType<T>,
_defaultValue?: T,
_optional?: boolean,
): FlowGraphDataConnection<T>Create a new data connection point.
Type Parameters
- T
Parameters
- name: string
the name of the connection
- connectionType: FlowGraphConnectionType
the type of the connection
- ownerBlock: FlowGraphBlock
the block that owns this connection
- richType: RichType<T>
the type of the data in this block
- _defaultValue: T = richType.defaultValue
the default value of the connection
- _optional: boolean = false
if the connection is optional
Returns FlowGraphDataConnection<T>
Properties
_ owner Block
data Transformer
a data transformer function, if needed. This can be used, for example, to force seconds into milliseconds output, if it makes sense in your case.
Optionalmetadata
Optional host-format metadata associated with this connection.
name
The name of the connection.
on Value Changed Observable
An observable that is triggered when the value of the connection changes.
rich Type
the type of the data in this block
unique Id
A uniquely identifying string for the connection.
Accessors
connection Type
-
The type of the connection
Returns FlowGraphConnectionType
is Disabled
-
get isDisabled(): boolean
is this connection disabled If the connection is disabled you will not be able to connect anything to it.
Returns boolean
-
set isDisabled(value: boolean): void
Parameters
- value: boolean
Returns void
optional
-
get optional(): boolean
Whether or not the connection is optional. Currently only used for UI control.
Returns boolean
Methods
_ is Singular Connection
-
An output data block can connect to multiple input data blocks, but an input data block can only connect to one output data block.
Returns boolean
true if the connection is singular
connect To
-
Connect this point to another point.
Parameters
- point: FlowGraphDataConnection<T>
the point to connect to.
Returns void
- point: FlowGraphDataConnection<T>
deserialize
-
Deserialize from a object into this
Parameters
- serializationObject: any
the object to deserialize from.
Returns void
- serializationObject: any
disconnect From
-
Disconnects two connections.
Parameters
- point: FlowGraphDataConnection
the connection to disconnect from.
- removeFromLocal: boolean = true
if true, the connection will be removed from the local connection list.
Returns void
- point: FlowGraphDataConnection
disconnect From All
-
Disconnects all connected points.
Returns void
dispose
-
Disconnects this point from every connected point.
Returns void
get Class Name
-
Returns string
class name of the object.
get Value
-
Gets the value of the connection in a specific context.
Parameters
- context: FlowGraphContext
the context from which the value is retrieved
Returns T
the value of the connection
- context: FlowGraphContext
is Connected
-
Returns if a point is connected to any other point.
Returns boolean
boolean indicating if the point is connected.
reset To Default Value
-
Reset the value of the connection to the default value.
Parameters
- context: FlowGraphContext
the context in which the value is reset
Returns void
- context: FlowGraphContext
serialize
-
Serializes this object.
Parameters
- serializationObject: any = {}
the object to serialize to
Returns void
- serializationObject: any = {}
set Value
-
Set the value of the connection in a specific context.
Parameters
- value: T
the value to set
- context: FlowGraphContext
the context to which the value is set
Returns void
- value: T
Represents a connection point for data. An unconnected input point can have a default value. An output point will only have a value if it is connected to an input point. Furthermore, if the point belongs to a "function" node, the node will run its function to update the value.