--- a/src/ai/api/ai_industrylist_valuator.hpp Tue Feb 26 16:03:39 2008 +0000
+++ b/src/ai/api/ai_industrylist_valuator.hpp Tue Feb 26 18:32:35 2008 +0000
@@ -1,6 +1,6 @@
/* $Id$ */
-/** @file ai_industrylist_valuator.hpp all the valuators for industrylist */
+/** @file ai_industrylist_valuator.hpp all the valuators for AIIndustryList */
#ifndef AI_INDUSTRYLIST_VALUATOR_HPP
#define AI_INDUSTRYLIST_VALUATOR_HPP
@@ -8,135 +8,114 @@
#include "ai_abstractlist.hpp"
/**
- * Get the production of the cargo for entries in an AIIndustryList instance.
- * @note resulting items are of the type int32
- * @note the input items are of the type IndustryID
+ * Get the production rate of the cargo for entries in an AIIndustryList
+ * instance. This is the amount of production you can expect in a month.
+ * @note Resulting items are of the type int32.
+ * @note Can only operate on an AIIndustryList instance.
+ * @ingroup AIIndustryList
*/
class AIIndustryList_vProduction : public AIAbstractList::Valuator {
public:
- /**
- * The name of the class, needed by several sub-processes.
- */
static const char *GetClassName() { return "AIIndustryList_vProduction"; }
/**
- * Custom constructor, we want a cargo-type as parameter.
+ * @param cargo_id The cargo to check the production rate of.
*/
- AIIndustryList_vProduction(CargoID cargo_type) { this->cargo_type = cargo_type; }
+ AIIndustryList_vProduction(CargoID cargo_id) :
+ cargo_id(cargo_id)
+ {}
private:
- CargoID cargo_type;
+ CargoID cargo_id;
- /**
- * The name of this list, to check if we can be used with a List.
- */
const char *GetListName() const { return "AIIndustryList"; }
-
int32 Valuate(int32 industry) const;
};
/**
- * See which entries in the AIIndustryList instance accepts a certain cargo.
- * @note resulting items are of the type bool
- * @note the input items are of the type IndustryID
+ * See which entries in the AIIndustryList instance accepts a given cargo.
+ * @note Resulting items are of the type bool.
+ * @note Can only operate on an AIIndustryList instance.
+ * @ingroup AIIndustryList
*/
class AIIndustryList_vCargoAccepted : public AIAbstractList::Valuator {
public:
- /**
- * The name of the class, needed by several sub-processes.
- */
static const char *GetClassName() { return "AIIndustryList_vCargoAccepted"; }
/**
- * Custom constructor, we want a cargo-type as parameter.
+ * @param cargo_id Check if this cargo is accepted.
*/
- AIIndustryList_vCargoAccepted(CargoID cargo_type) { this->cargo_type = cargo_type; }
+ AIIndustryList_vCargoAccepted(CargoID cargo_id) :
+ cargo_id(cargo_id)
+ {}
private:
- CargoID cargo_type;
+ CargoID cargo_id;
- /**
- * The name of this list, to check if we can be used with a List.
- */
const char *GetListName() const { return "AIIndustryList"; }
-
int32 Valuate(int32 industry) const;
};
/**
* Get the location for entries in an AIIndustryList instance.
- * @note resulting items are of the type TileIndex
- * @note the input items are of the type IndustryID
+ * @note Resulting items are of the type TileIndex.
+ * @note Can only operate on an AIIndustryList instance.
+ * @ingroup AIIndustryList
*/
class AIIndustryList_vLocation : public AIAbstractList::Valuator {
public:
- /**
- * The name of the class, needed by several sub-processes.
- */
static const char *GetClassName() { return "AIIndustryList_vGetLocation"; }
private:
- /**
- * The name of this list, to check if we can be used with a List.
- */
const char *GetListName() const { return "AIIndustryList"; }
-
int32 Valuate(int32 industry) const;
};
/**
* Get the manhattan distance to a tile for entries in an AIIndustryList instance.
- * @note resulting items are of the type distance
- * @note the input items are of the type TileIndex
+ * @note Resulting items are of the type uint32.
+ * @note Can only operate on an AIIndustryList instance.
+ * @ingroup AIIndustryList
*/
class AIIndustryList_vDistanceManhattanToTile : public AIAbstractList::Valuator {
public:
- /**
- * The name of the class, needed by several sub-processes.
- */
static const char *GetClassName() { return "AIIndustryList_vDistanceManhattanToTile"; }
/**
- * Custom constructor, we want a tile as parameter.
+ * @param tile The tile to get the distance to.
*/
- AIIndustryList_vDistanceManhattanToTile(TileIndex tile) { this->tile = tile; }
+ AIIndustryList_vDistanceManhattanToTile(TileIndex tile) :
+ tile(tile)
+ {}
private:
TileIndex tile;
- /**
- * The name of this list, to check if we can be used with a List.
- */
const char *GetListName() const { return "AIIndustryList"; }
-
int32 Valuate(int32 station) const;
};
/**
* Get the sqsuare distance to a tile for entries in an AIIndustryList instance.
- * @note resulting items are of the type distance
- * @note the input items are of the type TileIndex
+ * @note Resulting items are of the type uint32.
+ * @note Can only operate on an AIIndustryList instance.
+ * @ingroup AIIndustryList
*/
class AIIndustryList_vDistanceSquareToTile : public AIAbstractList::Valuator {
public:
- /**
- * The name of the class, needed by several sub-processes.
- */
static const char *GetClassName() { return "AIIndustryList_vDistanceSquareToTile"; }
/**
- * Custom constructor, we want a tile as parameter.
+ * @param tile The tile to get the distance to.
*/
- AIIndustryList_vDistanceSquareToTile(TileIndex tile) { this->tile = tile; }
+ AIIndustryList_vDistanceSquareToTile(TileIndex tile) :
+ tile(tile)
+ {}
private:
TileIndex tile;
- /**
- * The name of this list, to check if we can be used with a List.
- */
const char *GetListName() const { return "AIIndustryList"; }
-
int32 Valuate(int32 station) const;
};