diff -r 5dedb2fa1ab0 -r 814c3bbf8ecc src/ai/api/ai_vehiclelist_valuator.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/ai/api/ai_vehiclelist_valuator.hpp Fri May 04 19:55:35 2007 +0000 @@ -0,0 +1,139 @@ +/* $Id$ */ + +/** @file ai_vehiclelist_valuator.hpp all the valuators for vehiclelist */ + +#ifndef AI_VEHICLELIST_VALUATOR_HPP +#define AI_VEHICLELIST_VALUATOR_HPP + +#include "ai_abstractlist.hpp" + +/** + * Get the location for entries in an AIVehicleList instance. + * @note resulting items are of the type TileIndex + * @note the input items are of the type VehicleID + */ +class AIVehicleListLocation : public AIAbstractList::Valuator { +public: + /** + * The name of the class, needed by several sub-processes. + */ + static const char *GetClassName() { return "AIVehicleListGetLocation"; } + +private: + int32 Valuate(int32 town) const; +}; + +/** + * Get the engine-type for entries in an AIVehicleList instance. + * @note resulting items are of the type EngineID + * @note the input items are of the type VehicleID + */ +class AIVehicleListEngineType : public AIAbstractList::Valuator { +public: + /** + * The name of the class, needed by several sub-processes. + */ + static const char *GetClassName() { return "AIVehicleListEngineType"; } + +private: + int32 Valuate(int32 town) const; +}; + +/** + * Get the unit number for entries in an AIVehicleList instance. + * @note resulting items are of the type int32 + * @note the input items are of the type VehicleID + */ +class AIVehicleListUnitNumber : public AIAbstractList::Valuator { +public: + /** + * The name of the class, needed by several sub-processes. + */ + static const char *GetClassName() { return "AIVehicleListUnitNumber"; } + +private: + int32 Valuate(int32 town) const; +}; + +/** + * Get the age for entries in an AIVehicleList instance. + * @note resulting items are of the type int32 (age in days) + * @note the input items are of the type VehicleID + */ +class AIVehicleListAge : public AIAbstractList::Valuator { +public: + /** + * The name of the class, needed by several sub-processes. + */ + static const char *GetClassName() { return "AIVehicleListAge"; } + +private: + int32 Valuate(int32 town) const; +}; + +/** + * Get the max age for entries in an AIVehicleList instance. + * @note resulting items are of the type int32 (age in days) + * @note the input items are of the type VehicleID + */ +class AIVehicleListMaxAge : public AIAbstractList::Valuator { +public: + /** + * The name of the class, needed by several sub-processes. + */ + static const char *GetClassName() { return "AIVehicleListMaxAge"; } + +private: + int32 Valuate(int32 town) const; +}; + +/** + * Get the age left for the vehicle gets 'old' for entries in an AIVehicleList instance. + * @note resulting items are of the type int32 (age in days) + * @note the input items are of the type VehicleID + */ +class AIVehicleListAgeLeft : public AIAbstractList::Valuator { +public: + /** + * The name of the class, needed by several sub-processes. + */ + static const char *GetClassName() { return "AIVehicleListAgeLeft"; } + +private: + int32 Valuate(int32 town) const; +}; + +/** + * Get the profit of this year for entries in an AIVehicleList instance. + * @note resulting items are of the type int32 (age in days) + * @note the input items are of the type VehicleID + */ +class AIVehicleListProfitThisYear : public AIAbstractList::Valuator { +public: + /** + * The name of the class, needed by several sub-processes. + */ + static const char *GetClassName() { return "AIVehicleListProfitThisYear"; } + +private: + int32 Valuate(int32 town) const; +}; + +/** + * Get the profit of last year for entries in an AIVehicleList instance. + * @note resulting items are of the type int32 (age in days) + * @note the input items are of the type VehicleID + */ +class AIVehicleListProfitLastYear : public AIAbstractList::Valuator { +public: + /** + * The name of the class, needed by several sub-processes. + */ + static const char *GetClassName() { return "AIVehicleListProfitLastYear"; } + +private: + int32 Valuate(int32 town) const; +}; + + +#endif /* AI_VEHICLELIST_VALUATOR_HPP */