(svn r11298) [NoAI] -Add: added EngineList + Valuators for all common functions. This should replace all FindXXXEngine, which will be removed soon
/* $Id$ */
/** @file ai_enginelist_valuator.hpp all the valuators for enginelist */
#ifndef AI_ENGINELIST_VALUATOR_HPP
#define AI_ENGINELIST_VALUATOR_HPP
#include "ai_abstractlist.hpp"
/**
* Get the cargo-type for entries in an AIEngineList instance.
* @note resulting items are of the type CargoID
* @note the input items are of the type EngineID
*/
class AIEngineListCargoType : public AIAbstractList::Valuator {
public:
/**
* The name of the class, needed by several sub-processes.
*/
static const char *GetClassName() { return "AIEngineListCargoType"; }
private:
int32 Valuate(int32 engine) const;
};
/**
* Get the capacity for entries in an AIEngineList instance.
* @note resulting items are of the type int32
* @note the input items are of the type EngineID
*/
class AIEngineListCapacity : public AIAbstractList::Valuator {
public:
/**
* The name of the class, needed by several sub-processes.
*/
static const char *GetClassName() { return "AIEngineListCapacity"; }
private:
int32 Valuate(int32 engine) const;
};
/**
* Get the reliability for entries in an AIEngineList instance.
* @note resulting items are of the type int32
* @note the input items are of the type EngineID
*/
class AIEngineListReliability : public AIAbstractList::Valuator {
public:
/**
* The name of the class, needed by several sub-processes.
*/
static const char *GetClassName() { return "AIEngineListReliability"; }
private:
int32 Valuate(int32 engine) const;
};
/**
* Get the max speed for entries in an AIEngineList instance.
* @note resulting items are of the type int32
* @note the input items are of the type EngineID
*/
class AIEngineListMaxSpeed : public AIAbstractList::Valuator {
public:
/**
* The name of the class, needed by several sub-processes.
*/
static const char *GetClassName() { return "AIEngineListMaxSpeed"; }
private:
int32 Valuate(int32 engine) const;
};
/**
* Get the price for entries in an AIEngineList instance.
* @note resulting items are of the type int32
* @note the input items are of the type EngineID
*/
class AIEngineListPrice : public AIAbstractList::Valuator {
public:
/**
* The name of the class, needed by several sub-processes.
*/
static const char *GetClassName() { return "AIEngineListPrice"; }
private:
int32 Valuate(int32 engine) const;
};
#endif /* AI_ENGINELIST_VALUATOR_HPP */