| 1222 | * A row being displayed in the cargo view (as opposed to being "hidden" behind a plus sign). |
| 1223 | */ |
| 1224 | struct RowDisplay { |
| 1225 | RowDisplay(CargoDataEntry *f, StationID n) : filter(f), next_station(n) {} |
| 1226 | RowDisplay(CargoDataEntry *f, CargoType n) : filter(f), next_cargo(n) {} |
| 1227 | |
| 1228 | /** |
| 1229 | * Parent of the cargo entry belonging to the row. |
| 1230 | */ |
| 1231 | CargoDataEntry *filter; |
| 1232 | union { |
| 1233 | /** |
| 1234 | * ID of the station belonging to the entry actually displayed if it's to/from/via. |
| 1235 | */ |
| 1236 | StationID next_station; |
| 1237 | |
| 1238 | /** |
| 1239 | * ID of the cargo belonging to the entry actually displayed if it's cargo. |
| 1240 | */ |
| 1241 | CargoType next_cargo; |
| 1242 | }; |
| 1243 | }; |
| 1244 | |
| 1245 | typedef std::vector<RowDisplay> CargoDataVector; |
| 1246 | |