FlowchartSimulator class
Flowchart family — class
Step-through execution of a flowchart. The simulator walks connection lines in port order; when a node has multiple outgoing edges (decisions, loops, forks) the optional BranchSelector chooses the branch (defaults to the first edge).
Members
| Member | Kind | Description |
|---|---|---|
SkiaComponent? CurrentNode | Property | Gets the node the simulation is currently on. |
bool IsFinished | Property | Gets a value indicating whether the simulation reached a terminal node. |
int StepCount | Property | Gets the number of steps executed since the last reset. |
List<string> Trace | Property | Gets the execution trace (node labels in visit order). |
Func<SkiaComponent, IReadOnlyList<SimulationEdge>, SimulationEdge?>? BranchSelector | Property | Optional branch selector for nodes with multiple outgoing edges. Return null to fall back to the first edge. |
event EventHandler<SimulationStepEventArgs>? Stepped | Event | Raised after each step. |
void Reset(IReadOnlyList<SkiaComponent> components, IReadOnlyList<IConnectionLine> lines) | Method | Resets the simulation to the entry node of the given diagram. |
bool Step() | Method | Advances the simulation by one node. Returns false when already finished. |
bool Run(int maxSteps = 1000) | Method | Runs until finished or the step cap is reached. True when the simulation finished naturally; false when capped. |