truelight@9649: /* $Id$ */ truelight@9649: truelight@9649: /** @file ai_industrylist_valuator.hpp all the valuators for industrylist */ truelight@9649: truelight@9649: #ifndef AI_INDUSTRYLIST_VALUATOR_HPP truelight@9649: #define AI_INDUSTRYLIST_VALUATOR_HPP truelight@9649: truelight@9649: #include "ai_abstractlist.hpp" truelight@9649: truelight@9649: /** truelight@9649: * Get the production of the cargo for entries in an AIIndustryList instance. truelight@9649: * @note resulting items are of the type int32 truelight@9649: * @note the input items are of the type IndustryID truelight@9649: */ truelight@9649: class AIIndustryListProduction : public AIAbstractList::Valuator { truelight@9649: public: truelight@9649: /** truelight@9649: * The name of the class, needed by several sub-processes. truelight@9649: */ truelight@9649: static const char *GetClassName() { return "AIIndustryListProduction"; } truelight@9649: truelight@9649: /** truelight@9649: * Custom constructor, we want a cargo-type as parameter. truelight@9649: */ truelight@9649: AIIndustryListProduction(CargoID cargo_type) { this->cargo_type = cargo_type; } truelight@9649: truelight@9649: private: truelight@9649: CargoID cargo_type; truelight@9649: truelight@9649: int32 Valuate(int32 industry) const; truelight@9649: }; truelight@9649: truelight@9649: /** truelight@9710: * See which entries in the AIIndustryList instance accepts a certain cargo. truelight@9710: * @note resulting items are of the type bool truelight@9710: * @note the input items are of the type IndustryID truelight@9710: */ truelight@9710: class AIIndustryListCargoAccepted : public AIAbstractList::Valuator { truelight@9710: public: truelight@9710: /** truelight@9710: * The name of the class, needed by several sub-processes. truelight@9710: */ truelight@9710: static const char *GetClassName() { return "AIIndustryListCargoAccepted"; } truelight@9710: truelight@9710: /** truelight@9710: * Custom constructor, we want a cargo-type as parameter. truelight@9710: */ truelight@9710: AIIndustryListCargoAccepted(CargoID cargo_type) { this->cargo_type = cargo_type; } truelight@9710: truelight@9710: private: truelight@9710: CargoID cargo_type; truelight@9710: truelight@9710: int32 Valuate(int32 industry) const; truelight@9710: }; truelight@9710: truelight@9710: /** truelight@9649: * Get the location for entries in an AIIndustryList instance. truelight@9649: * @note resulting items are of the type TileIndex truelight@9649: * @note the input items are of the type IndustryID truelight@9649: */ truelight@9649: class AIIndustryListLocation : public AIAbstractList::Valuator { truelight@9649: public: truelight@9649: /** truelight@9649: * The name of the class, needed by several sub-processes. truelight@9649: */ truelight@9649: static const char *GetClassName() { return "AIIndustryListGetLocation"; } truelight@9649: truelight@9649: private: truelight@9649: int32 Valuate(int32 industry) const; truelight@9649: }; truelight@9649: truelight@9655: /** truelight@9655: * Get the manhattan distance to a tile for entries in an AIIndustryList instance. truelight@9655: * @note resulting items are of the type distance truelight@9655: * @note the input items are of the type TileIndex truelight@9655: */ truelight@9655: class AIIndustryListDistanceManhattanToTile : public AIAbstractList::Valuator { truelight@9655: public: truelight@9655: /** truelight@9655: * The name of the class, needed by several sub-processes. truelight@9655: */ truelight@9655: static const char *GetClassName() { return "AIIndustryListDistanceManhattanToTile"; } truelight@9655: truelight@9655: /** truelight@9655: * Custom constructor, we want a tile as parameter. truelight@9655: */ truelight@9655: AIIndustryListDistanceManhattanToTile(TileIndex tile) { this->tile = tile; } truelight@9655: truelight@9655: private: truelight@9655: TileIndex tile; truelight@9655: truelight@9655: int32 Valuate(int32 station) const; truelight@9655: }; truelight@9655: truelight@9655: /** truelight@9655: * Get the sqsuare distance to a tile for entries in an AIIndustryList instance. truelight@9655: * @note resulting items are of the type distance truelight@9655: * @note the input items are of the type TileIndex truelight@9655: */ truelight@9655: class AIIndustryListDistanceSquareToTile : public AIAbstractList::Valuator { truelight@9655: public: truelight@9655: /** truelight@9655: * The name of the class, needed by several sub-processes. truelight@9655: */ truelight@9655: static const char *GetClassName() { return "AIIndustryListDistanceSquareToTile"; } truelight@9655: truelight@9655: /** truelight@9655: * Custom constructor, we want a tile as parameter. truelight@9655: */ truelight@9655: AIIndustryListDistanceSquareToTile(TileIndex tile) { this->tile = tile; } truelight@9655: truelight@9655: private: truelight@9655: TileIndex tile; truelight@9655: truelight@9655: int32 Valuate(int32 station) const; truelight@9655: }; truelight@9655: truelight@9649: #endif /* AI_INDUSTRYLIST_VALUATOR_HPP */