src/ai/api/ai_vehiclelist_valuator.hpp
author truebrain
Fri, 22 Feb 2008 12:30:17 +0000
branchnoai
changeset 9737 ee408edf3851
parent 9684 623970482fb2
child 9753 7209db94ad12
permissions -rw-r--r--
(svn r12216) [NoAI] -Codechange: made most functions 'static', which removes the need to create an instance to get, for example, engine information, and therefor heavily simplifying AI creation (Morloth)
/* $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 vehicle_id) 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 vehicle_id) 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 vehicle_id) 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 vehicle_id) 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 vehicle_id) 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 vehicle_id) 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 vehicle_id) 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 vehicle_id) const;
};

/**
 * Get the ype of the vehicle for entries in an AIVehicleList instance.
 * @note resulting items are of the type AIVehicle::VehicleType
 * @note the input items are of the type VehicleID
 */
class AIVehicleListVehicleType : public AIAbstractList::Valuator {
public:
	/**
	 * The name of the class, needed by several sub-processes.
	 */
	static const char *GetClassName() { return "AIVehicleListVehicleType"; }

private:
	int32 Valuate(int32 vehicle_id) const;
};


#endif /* AI_VEHICLELIST_VALUATOR_HPP */