Class SwitchUnit<T>
Inherited Members
Namespace: Ludiq.Bolt
Syntax
[TypeIcon(typeof(IBranchUnit))]
public abstract class SwitchUnit<T> : Unit, ISerializationCallbackReceiver, IBranchUnit, IUnit, IGraphElementWithDebugData, IGraphElement, IGraphChild, IObservableDisposable, IDisposable, INotifiedCollectionChild<IGraph>, ICollectionChild<IGraph>, IPrewarmable, IIdentifiable, INotifyPropertyChanged
Type Parameters
| Name | Description |
|---|---|
| T |
Properties
branches
Declaration
[DoNotSerialize]
public List<KeyValuePair<T, ControlOutput>> branches { get; }
Property Value
| Type | Description |
|---|---|
| List<KeyValuePair<T, ControlOutput>> |
canDefine
Declaration
public override bool canDefine { get; }
Property Value
| Type | Description |
|---|---|
| Boolean |
Overrides
Ludiq.Bolt.Unit<Ludiq.Bolt.FlowGraph>.canDefine
Implements
default
The branch to take if the input value does not match any other option.
Declaration
[DoNotSerialize]
public ControlOutput default { get; }
Property Value
| Type | Description |
|---|---|
| ControlOutput |
enter
The entry point for the switch.
Declaration
[DoNotSerialize]
[UnitPortDisplay(showLabel = false, showDocumentation = false)]
public ControlInput enter { get; }
Property Value
| Type | Description |
|---|---|
| ControlInput |
Implements
options
Declaration
[Inspectable]
[Serialize]
public List<T> options { get; set; }
Property Value
| Type | Description |
|---|---|
| List<T> |
selector
The value on which to switch.
Declaration
[DoNotSerialize]
[UnitPortDisplay(showLabel = false)]
public ValueInput selector { get; }
Property Value
| Type | Description |
|---|---|
| ValueInput |
Methods
Definition()
Declaration
protected override void Definition()
Overrides
Ludiq.Bolt.Unit<Ludiq.Bolt.FlowGraph>.Definition()
Enter(Flow)
Declaration
public ControlOutput Enter(Flow flow)
Parameters
| Type | Name | Description |
|---|---|---|
| Flow | flow |
Returns
| Type | Description |
|---|---|
| ControlOutput |
Matches(T, T)
Declaration
protected virtual bool Matches(T a, T b)
Parameters
| Type | Name | Description |
|---|---|---|
| T | a | |
| T | b |
Returns
| Type | Description |
|---|---|
| Boolean |