|
OpenTTD Source 20251117-master-g7398d2e290
|
Functions and type for generating vehicle lists. More...
Go to the source code of this file.
Functions | |
| template<class VehiclePredicate , class OrderPredicate , class VehicleFunc > | |
| void | FindVehiclesWithOrder (VehiclePredicate veh_pred, OrderPredicate ord_pred, VehicleFunc veh_func) |
| Find vehicles matching an order. | |
Functions and type for generating vehicle lists.
Definition in file vehiclelist_func.h.
| void FindVehiclesWithOrder | ( | VehiclePredicate | veh_pred, |
| OrderPredicate | ord_pred, | ||
| VehicleFunc | veh_func | ||
| ) |
Find vehicles matching an order.
This can be used, e.g. to find all vehicles that stop at a particular station.
| veh_pred | Vehicle selection predicate. This is called only for the first vehicle using the order list. |
| ord_pred | Order selection predicate. |
| veh_func | Called for each vehicle that matches both vehicle and order predicates. |
Definition at line 24 of file vehiclelist_func.h.
References Pool< Titem, Tindex, Tgrowth_step, Tpool_type, Tcache >::PoolItem<&_orderlist_pool >::Iterate(), and Vehicle::NextShared().
Referenced by GenerateVehicleSortList(), and RemoveRoadStop().