src/ai/api/ai_stationlist_valuator.hpp
branchnoai
changeset 9636 1005ffccf641
child 9648 760b7b504e37
equal deleted inserted replaced
9635:9ee82e091af7 9636:1005ffccf641
       
     1 /* $Id$ */
       
     2 
       
     3 /** @file ai_stationlist_valuator.hpp all the valuators for stationlist */
       
     4 
       
     5 #ifndef AI_STATIONLIST_VALUATOR_HPP
       
     6 #define AI_STATIONLIST_VALUATOR_HPP
       
     7 
       
     8 #include "ai_abstractlist.hpp"
       
     9 
       
    10 /**
       
    11  * Get the location for entries in an AIStationList instance.
       
    12  * @note resulting items are of the type TileIndex
       
    13  * @note the input items are of the type StationID
       
    14  */
       
    15 class AIStationListLocation : public AIAbstractList::Valuator {
       
    16 public:
       
    17 	/**
       
    18 	 * The name of the class, needed by several sub-processes.
       
    19 	 */
       
    20 	static const char *GetClassName() { return "AIStationListGetLocation"; }
       
    21 
       
    22 private:
       
    23 	int32 Valuate(int32 station) const;
       
    24 };
       
    25 
       
    26 /**
       
    27  * Get the cargo waiting for entries in an AIStationList instance.
       
    28  * @note resulting items are of the type units
       
    29  * @note the input items are of the type StationID
       
    30  */
       
    31 class AIStationListCargoWaiting : public AIAbstractList::Valuator {
       
    32 public:
       
    33 	/**
       
    34 	 * The name of the class, needed by several sub-processes.
       
    35 	 */
       
    36 	static const char *GetClassName() { return "AIStationListCargoWaiting"; }
       
    37 
       
    38 	/**
       
    39 	 * Custom constructor, we want a cargo-type as parameter.
       
    40 	 */
       
    41 	AIStationListCargoWaiting(CargoID cargo_type) { this->cargo_type = cargo_type; }
       
    42 
       
    43 private:
       
    44 	CargoID cargo_type;
       
    45 
       
    46 	int32 Valuate(int32 station) const;
       
    47 };
       
    48 
       
    49 #endif /* AI_STATIONLIST_VALUATOR_HPP */