Microscopic Traffic Simulator
Main Page
Packages
Classes
Files
File List
BackwardCellWalker.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
BackwardCellWalker
:
CellWalker
9
{
14
internal
BackwardCellWalker
(
Cell
cell) : base(cell) { }
15
20
internal
override
IEnumerable<Cell> GetNext()
21
{
22
if
(cell != null)
23
{
24
yield
return
cell;
25
while
(cell.PreviousCell != null)
26
{
27
cell = cell.
PreviousCell
;
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.CellWalkers.CellWalker
Abstract class for returning cells by walking through topology.
Definition:
CellWalker.cs:8
Microscopic_Traffic_Simulator___Model.CellularTopologyObjects.CellWalkers.BackwardCellWalker
Cell walker in backward direction.
Definition:
BackwardCellWalker.cs:8
Microscopic_Traffic_Simulator___Model.CellularTopologyObjects.Cell.PreviousCell
Cell PreviousCell
Link to previous cell.
Definition:
Cell.cs:48
Microscopic_Traffic_Simulator___Model
Microscopic Traffic Simulator - Model
CellularTopologyObjects
CellWalkers
BackwardCellWalker.cs
Generated by
1.8.11