Class PortMapper
For initialization of runtime ports (they need to have a graph-wide unique index) and optionally mapping them to an authoring unit port
The mapping enables debugging to display the recorded values on the right authoring ports and highlight the right authoring nodes
Given that node translation is not 1:1, this is required:
- 1 authoring node could get translated to N runtime nodes
- 1 port might be translated to 0 or 1 ports
Syntax
Properties
AllPorts
Declaration
public IEnumerable<KeyValuePair<IUnitPort, PortMapper.MappedPort>> AllPorts { get; }
Property Value
MappedPortModels
Declaration
public Dictionary<IUnitPort, PortMapper.MappedPort> MappedPortModels { get; }
Property Value
Methods
AddMultiPort<TMultiPort>(GraphBuilder, List<IUnitPort>, ref TMultiPort)
Declaration
public void AddMultiPort<TMultiPort>(GraphBuilder graphBuilder, List<IUnitPort> portModels, ref TMultiPort port)
where TMultiPort : IMultiPort
Parameters
Type Parameters
Name |
Description |
TMultiPort |
|
AddMultiPortIndexed<TMultiPort>(GraphBuilder, Func<Int32, IUnitPort>, ref TMultiPort, Func<UInt32, Nullable<Value>>)
Declaration
public void AddMultiPortIndexed<TMultiPort>(GraphBuilder graphBuilder, Func<int, IUnitPort> portModels, ref TMultiPort port, Func<uint, Value?> defaultValue = null)
where TMultiPort : IMultiPort
Parameters
Type Parameters
Name |
Description |
TMultiPort |
|
AddSinglePort<TPort>(GraphBuilder, IUnitPort, ref TPort, Nullable<Value>)
Declaration
public void AddSinglePort<TPort>(GraphBuilder graphBuilder, IUnitPort portModel, ref TPort port, Value? defaultValue = null)
where TPort : IPort
Parameters
Type Parameters
GetPortIndexOfPortModel(IUnitPort)
Declaration
public IPort GetPortIndexOfPortModel(IUnitPort portModel)
Parameters
Returns
Merge(PortMapper)
Declaration
public void Merge(PortMapper portToOffsetMapping)
Parameters
Type |
Name |
Description |
PortMapper |
portToOffsetMapping |
|
TryGetPortIndexOfPortModel(IUnitPort, out IPort)
Declaration
public bool TryGetPortIndexOfPortModel(IUnitPort portModel, out IPort port)
Parameters
Returns
Extension Methods