Class: FlowSource

olympe.df. FlowSource

This class describes a flow source, that is the starting point of a data flow. It allows for fine control of a node in a data flow graph.


<package> new FlowSource(valueType [, debugName])

Parameters:
Name Type Argument Default Description
valueType function
debugName string <optional>
FlowSource

Members


<protected> node :olympe.df.Node.<T>

Type:

Methods


clear()

Clears the value of the FlowSource, either marking it as 'unresolved' or resetting it to its default value (if any). It this FlowSource has no default value, it is marked as 'unresovled', which prevents downstream nodes to be updated until this FlowSource gets a new value.

Returns:

This FlowSource

Type
olympe.df.FlowSource.<T>

getContext()

Get this 'FlowSource' Execution Context.

Returns:
Type
olympe.df.ExecutionContext

getFlow()

Gets this 'FlowSource' value as a data flow.

Returns:
Type
olympe.df.Proxy.<T> | T

obsolete()

Obsoletes the value of this FlowSource, marking it as 'unresolved', thus preventing downstream nodes to be updated until this source gets a new value. Contrary to clear it ignores the default value.

Returns:

This FlowSource

Type
olympe.df.FlowSource.<T>

repeat(proxy)

Connects this FlowSource to an existing data flow, making it a 'repeater' of that data flow. A subsequent update will discontinue that repetition.

Parameters:
Name Type Description
proxy olympe.df.Proxy.<T> | olympe.df.Node.<T>

Proxy or Node to use a repeater.

Returns:

This FlowSource

Type
olympe.df.FlowSource.<T>

setDefault(value)

Sets the default value for this FlowSource. Setting the default value to undefined is equivalent to 'no default value'.

Parameters:
Name Type Description
value T
Returns:

This FlowSource

Type
olympe.df.FlowSource.<T>

update(value)

Updates the value of this FlowSource.

Parameters:
Name Type Description
value T | olympe.df.Proxy.<T>
Returns:

This FlowSource

Type
olympe.df.FlowSource.<T>