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