Class GraphBuilder
Syntax
public class GraphBuilder
Constructors
GraphBuilder(FlowGraphContext, TranslationOptions)
Declaration
public GraphBuilder(FlowGraphContext mContext, TranslationOptions options = TranslationOptions.CodegenApiNodes)
Parameters
Fields
NodeTable
Declaration
public readonly Dictionary<NodeId, (INode node, PortMapper mapper)> NodeTable
Field Value
Properties
Options
Declaration
public TranslationOptions Options { get; }
Property Value
UnitsToCodegen
Declaration
public IEnumerable<IUnit> UnitsToCodegen { get; }
Property Value
Methods
AddNodeFromModel(IUnit, INode, PortMapper)
Declaration
public void AddNodeFromModel(IUnit nodeModel, INode node, PortMapper portToOffsetMapping)
Parameters
AddReflectedMember(Member)
Declaration
public uint AddReflectedMember(Member member)
Parameters
Type |
Name |
Description |
Member |
member |
|
Returns
AddUnitToCodegen(IUnit)
Declaration
public void AddUnitToCodegen(IUnit unit)
Parameters
Type |
Name |
Description |
IUnit |
unit |
|
AddVariableUnit(UnifiedVariableUnit, BindingId)
Declaration
public void AddVariableUnit(UnifiedVariableUnit unifiedVariableUnit, BindingId bindingId)
Parameters
AllocateDataIndex()
Declaration
public uint AllocateDataIndex()
Returns
AssignPortIndex(INode, FieldInfo, out PortDirection, out PortType, out String)
Declaration
public void AssignPortIndex(INode node, FieldInfo fieldInfo, out PortDirection direction, out PortType type, out string name)
Parameters
AssignPortIndex<TPort>(ref TPort)
Declaration
public void AssignPortIndex<TPort>(ref TPort port)
where TPort : IPort
Parameters
Type |
Name |
Description |
TPort |
port |
|
Type Parameters
AutoAssignPortIndicesAndMapPorts(INode, PortMapper, Dictionary<IUnitPort, FieldInfo>)
Assigns all ports of the node and add them all to the mapper. Any port present in the dictionary will be
mapped to the unit port there. The dictionary can contain only some ports.
Declaration
[MustUseReturnValue]
public INode AutoAssignPortIndicesAndMapPorts(INode inode, PortMapper mapping, Dictionary<IUnitPort, FieldInfo> portModelToRuntimeField = null)
Parameters
Returns
AutoAssignPortIndicesAndMapPorts(IUnit, INode)
Declaration
public PortMapper AutoAssignPortIndicesAndMapPorts(IUnit unit, INode node)
Parameters
Returns
BindVariableToDataIndex(BindingId, Nullable<UInt32>)
Declaration
public GraphBuilder.VariableHandle BindVariableToDataIndex(BindingId variableId, uint? dataIndex = null)
Parameters
Returns
Build()
Builds the runtime graph from everything added to the builder. It guarantees node ids and port ids will be
sequential, even if nodes/ports have been removed.
Declaration
public GraphBuilder.BoltCompilationResult Build()
Returns
CreateDebugData()
Declaration
public RuntimeGraphDebugData CreateDebugData()
Returns
CreateEdge(OutputDataPort, IUnitPort)
Declaration
public void CreateEdge(OutputDataPort outputPort, IUnitPort inputPortModel)
Parameters
CreateEdge(IUnitPort, IUnitPort)
Declaration
public void CreateEdge(IUnitPort outputPortModel, IUnitPort inputPortModel)
Parameters
DeclareVariable(VariableType, ValueType, BindingId, String, Nullable<Value>)
Declaration
public GraphBuilder.VariableHandle DeclareVariable(VariableType type, ValueType valueType, BindingId bindingId, string name = null, Value? initValue = null)
Parameters
Returns
GetNextNodeId()
Declaration
public NodeId GetNextNodeId()
Returns
GetTranslatedGraphAsset(SubgraphUnit)
Declaration
public ScriptGraphAssetIndex GetTranslatedGraphAsset(SubgraphUnit superUnit)
Parameters
Returns
GetVariableDataIndex(UnifiedVariableUnit)
Declaration
public GraphBuilder.VariableHandle GetVariableDataIndex(UnifiedVariableUnit variableModelDeclarationModel)
Parameters
Returns
RemoveNode(NodeId, INode)
Declaration
public void RemoveNode(NodeId oldNodeId, INode oldNode)
Parameters
Extension Methods