truelight@9636: /* $Id$ */ truelight@9636: truebrain@9778: /** @file ai_stationlist_valuator.hpp all the valuators for AIStationList */ truelight@9636: truelight@9636: #ifndef AI_STATIONLIST_VALUATOR_HPP truelight@9636: #define AI_STATIONLIST_VALUATOR_HPP truelight@9636: truelight@9636: #include "ai_abstractlist.hpp" truelight@9636: truelight@9636: /** truebrain@9756: * Get the location for entries in an AIStationList instance. truebrain@9778: * @note Resulting items are of the type TileIndex. truebrain@9778: * @note Can only operate on an AIStationList instance. truebrain@9778: * @ingroup AIStationList truelight@9636: */ truebrain@9753: class AIStationList_vLocation : public AIAbstractList::Valuator { truelight@9636: public: truebrain@9753: static const char *GetClassName() { return "AIStationList_vGetLocation"; } truelight@9636: truelight@9636: private: truebrain@9772: const char *GetListName() const { return "AIStationList"; } truebrain@9778: int32 Valuate(int32 station_id) const; truelight@9636: }; truelight@9636: truelight@9636: /** truebrain@9778: * Get the cargo-waiting for entries in an AIStationList instance. truebrain@9778: * @note Resulting items are of the type uint32 (units of cargo). truebrain@9778: * @note Can only operate on an AIStationList instance. truebrain@9778: * @ingroup AIStationList truelight@9636: */ truebrain@9753: class AIStationList_vCargoWaiting : public AIAbstractList::Valuator { truelight@9636: public: truebrain@9753: static const char *GetClassName() { return "AIStationList_vCargoWaiting"; } truelight@9636: truelight@9636: /** truebrain@9778: * @param cargo_id The cargo of which you want to get the amount of units waiting for. truelight@9636: */ truebrain@9778: AIStationList_vCargoWaiting(CargoID cargo_id) : truebrain@9778: cargo_id(cargo_id) truebrain@9778: {} truelight@9636: truelight@9636: private: truebrain@9778: CargoID cargo_id; truelight@9636: truebrain@9772: const char *GetListName() const { return "AIStationList"; } truebrain@9778: int32 Valuate(int32 station_id) const; truelight@9636: }; truelight@9636: truelight@9648: /** truebrain@9756: * Get the cargo rating for entries in an AIStationList instance. truebrain@9778: * @note Resulting items are of the type int32 (percent). truebrain@9778: * @note Can only operate on an AIStationList instance. truebrain@9778: * @ingroup AIStationList truelight@9648: */ truebrain@9753: class AIStationList_vCargoRating : public AIAbstractList::Valuator { truelight@9648: public: truebrain@9753: static const char *GetClassName() { return "AIStationList_vCargoRating"; } truelight@9648: truelight@9648: /** truebrain@9778: * @param cargo_id The cargo of which you want to get the rating of. truelight@9648: */ truebrain@9778: AIStationList_vCargoRating(CargoID cargo_id) : truebrain@9778: cargo_id(cargo_id) truebrain@9778: {} truelight@9648: truelight@9648: private: truebrain@9778: CargoID cargo_id; truelight@9648: truebrain@9772: const char *GetListName() const { return "AIStationList"; } truebrain@9778: int32 Valuate(int32 station_id) const; truelight@9648: }; truelight@9648: truelight@9655: /** truebrain@9756: * Get the manhattan distance to a tile for entries in an AIStationList instance. truebrain@9778: * @note Resulting items are of the type uint32. truebrain@9778: * @note Can only operate on an AIStationList instance. truebrain@9778: * @ingroup AIStationList truelight@9655: */ truebrain@9753: class AIStationList_vDistanceManhattanToTile : public AIAbstractList::Valuator { truelight@9655: public: truebrain@9753: static const char *GetClassName() { return "AIStationList_vDistanceManhattanToTile"; } truelight@9655: truelight@9655: /** truebrain@9778: * @param tile The tile to get the distances to. truelight@9655: */ truebrain@9778: AIStationList_vDistanceManhattanToTile(TileIndex tile) : truebrain@9778: tile(tile) truebrain@9778: {} truelight@9655: truelight@9655: private: truelight@9655: TileIndex tile; truelight@9655: truebrain@9772: const char *GetListName() const { return "AIStationList"; } truebrain@9778: int32 Valuate(int32 station_id) const; truelight@9655: }; truelight@9655: truelight@9655: /** truebrain@9781: * Get the square distance to a tile for entries in an AIStationList instance. truebrain@9778: * @note Resulting items are of the type uint32. truebrain@9778: * @note Can only operate on an AIStationList instance. truebrain@9778: * @ingroup AIStationList truelight@9655: */ truebrain@9753: class AIStationList_vDistanceSquareToTile : public AIAbstractList::Valuator { truelight@9655: public: truebrain@9753: static const char *GetClassName() { return "AIStationList_vDistanceSquareToTile"; } truelight@9655: truelight@9655: /** truebrain@9778: * @param tile The tile to get the distances to. truelight@9655: */ truebrain@9778: AIStationList_vDistanceSquareToTile(TileIndex tile) : truebrain@9778: tile(tile) truebrain@9778: {} truelight@9655: truelight@9655: private: truelight@9655: TileIndex tile; truelight@9655: truebrain@9772: const char *GetListName() const { return "AIStationList"; } truebrain@9778: int32 Valuate(int32 station_id) const; truelight@9655: }; truelight@9655: truelight@9636: #endif /* AI_STATIONLIST_VALUATOR_HPP */