(svn r12226) [NoAI] -Fix: remove the dep for AIStationList_Vehicle on AIStationList, as Squirrel doesn't like it
/* $Id$ */
/** @file ai_townlist_valuator.hpp all the valuators for townlist */
#ifndef AI_TOWNLIST_VALUATOR_HPP
#define AI_TOWNLIST_VALUATOR_HPP
#include "ai_abstractlist.hpp"
/**
* Give a random value for the entries in an AITownList instance.
* @note resulting items are of the type int32
* @note the input items are of the type TownID
*/
class AITownListRandomize : public AIAbstractList::Valuator {
public:
/**
* The name of the class, needed by several sub-processes.
*/
static const char *GetClassName() { return "AITownListRandomize"; }
private:
int32 Valuate(int32 town) const;
};
/**
* Get the population for entries in an AITownList instance.
* @note resulting items are of the type int32
* @note the input items are of the type TownID
*/
class AITownListPopulation : public AIAbstractList::Valuator {
public:
/**
* The name of the class, needed by several sub-processes.
*/
static const char *GetClassName() { return "AITownListGetPopulation"; }
private:
int32 Valuate(int32 town) const;
};
/**
* Get the location for entries in an AITownList instance.
* @note resulting items are of the type TileIndex
* @note the input items are of the type TownID
*/
class AITownListLocation : public AIAbstractList::Valuator {
public:
/**
* The name of the class, needed by several sub-processes.
*/
static const char *GetClassName() { return "AITownListGetLocation"; }
private:
int32 Valuate(int32 town) const;
};
/**
* Get the manhattan distance to a tile for entries in an AITownList instance.
* @note resulting items are of the type distance
* @note the input items are of the type TownID
*/
class AITownListDistanceManhattanToTile : public AIAbstractList::Valuator {
public:
/**
* The name of the class, needed by several sub-processes.
*/
static const char *GetClassName() { return "AITownListDistanceManhattanToTile"; }
/**
* Custom constructor, we want a tile as parameter.
*/
AITownListDistanceManhattanToTile(TileIndex tile) { this->tile = tile; }
private:
TileIndex tile;
int32 Valuate(int32 station) const;
};
/**
* Get the sqsuare distance to a tile for entries in an AITownList instance.
* @note resulting items are of the type distance
* @note the input items are of the type TownID
*/
class AITownListDistanceSquareToTile : public AIAbstractList::Valuator {
public:
/**
* The name of the class, needed by several sub-processes.
*/
static const char *GetClassName() { return "AITownListDistanceSquareToTile"; }
/**
* Custom constructor, we want a tile as parameter.
*/
AITownListDistanceSquareToTile(TileIndex tile) { this->tile = tile; }
private:
TileIndex tile;
int32 Valuate(int32 station) const;
};
#endif /* AI_TOWNLIST_VALUATOR_HPP */