diff -r c17046b1b8a2 -r 760b7b504e37 src/ai/api/ai_stationlist_valuator.hpp --- a/src/ai/api/ai_stationlist_valuator.hpp Fri Jul 13 11:04:00 2007 +0000 +++ b/src/ai/api/ai_stationlist_valuator.hpp Fri Jul 13 13:49:39 2007 +0000 @@ -46,4 +46,27 @@ int32 Valuate(int32 station) const; }; +/** + * Get the cargo rating for entries in an AIStationList instance. + * @note resulting items are of the type percent + * @note the input items are of the type StationID + */ +class AIStationListCargoRating : public AIAbstractList::Valuator { +public: + /** + * The name of the class, needed by several sub-processes. + */ + static const char *GetClassName() { return "AIStationListCargoRating"; } + + /** + * Custom constructor, we want a cargo-type as parameter. + */ + AIStationListCargoRating(CargoID cargo_type) { this->cargo_type = cargo_type; } + +private: + CargoID cargo_type; + + int32 Valuate(int32 station) const; +}; + #endif /* AI_STATIONLIST_VALUATOR_HPP */