Microscopic Traffic Simulator

- Main Page
- Packages
- Classes
- Files

- File List

ForwardCellWalker.cs
Go to the documentation of this file.
1 using System.Collections.Generic;
2
3 namespace Microscopic_Traffic_Simulator___Model.CellularTopologyObjects.CellWalkers
4 {
8 class ForwardCellWalker : CellWalker
9 {
14 internal ForwardCellWalker(Cell cell) : base(cell) { }
15
20 internal override IEnumerable<Cell> GetNext()
21 {
22 if (cell != null)
23 {
24 yield return cell;
25 while (cell.FollowingCell != null)
26 {
27 cell = cell.FollowingCell;
28 yield return cell;
29 }
30 }
31 }
32 }
33 }
System
Microscopic_Traffic_Simulator___Model.CellularTopologyObjects.Cell
Class representing cell.
Definition: Cell.cs:9
Microscopic_Traffic_Simulator___Model.CellularTopologyObjects.Cell.FollowingCell
Cell FollowingCell
Link to following cell.
Definition: Cell.cs:57
Microscopic_Traffic_Simulator___Model.CellularTopologyObjects.CellWalkers.CellWalker
Abstract class for returning cells by walking through topology.
Definition: CellWalker.cs:8
Microscopic_Traffic_Simulator___Model.CellularTopologyObjects.CellWalkers.ForwardCellWalker
Cell walker in forward direction.
Definition: ForwardCellWalker.cs:8
Microscopic_Traffic_Simulator___Model