src/ai/api/ai_stationlist_valuator.hpp
branchnoai
changeset 9648 760b7b504e37
parent 9636 1005ffccf641
child 9655 e8e43f333832
equal deleted inserted replaced
9647:c17046b1b8a2 9648:760b7b504e37
    44 	CargoID cargo_type;
    44 	CargoID cargo_type;
    45 
    45 
    46 	int32 Valuate(int32 station) const;
    46 	int32 Valuate(int32 station) const;
    47 };
    47 };
    48 
    48 
       
    49 /**
       
    50  * Get the cargo rating for entries in an AIStationList instance.
       
    51  * @note resulting items are of the type percent
       
    52  * @note the input items are of the type StationID
       
    53  */
       
    54 class AIStationListCargoRating : public AIAbstractList::Valuator {
       
    55 public:
       
    56 	/**
       
    57 	 * The name of the class, needed by several sub-processes.
       
    58 	 */
       
    59 	static const char *GetClassName() { return "AIStationListCargoRating"; }
       
    60 
       
    61 	/**
       
    62 	 * Custom constructor, we want a cargo-type as parameter.
       
    63 	 */
       
    64 	AIStationListCargoRating(CargoID cargo_type) { this->cargo_type = cargo_type; }
       
    65 
       
    66 private:
       
    67 	CargoID cargo_type;
       
    68 
       
    69 	int32 Valuate(int32 station) const;
       
    70 };
       
    71 
    49 #endif /* AI_STATIONLIST_VALUATOR_HPP */
    72 #endif /* AI_STATIONLIST_VALUATOR_HPP */