(svn r12491) [NoAI] -Documentation: made parts of the comments more uniform (@file header and class header)
[NoAI] -Documentation: fixed the order of functions: SetNN before GetNN, Build after Set/Get, Remove after Build. This makes reading the docs more easy
[NoAI] -Documentation: Removed unneeded comments which were direct copy/paste all over the place
[NoAI] -Fix: missing $Id$ tags
/* $Id$ */
/** @file ai_cargo.hpp Everything to query cargos. */
#ifndef AI_CARGO_HPP
#define AI_CARGO_HPP
#include "ai_object.hpp"
/**
* Class that handles all cargo related functions.
*/
class AICargo : public AIObject {
public:
static const char *GetClassName() { return "AICargo"; }
/**
* Checks whether the given cargo type is valid.
* @param cargo_type the cargo to check.
* @return true if and only if the cargo type is valid.
*/
static bool IsValidCargo(CargoID cargo_type);
/**
* Gets the string representation of the cargo label.
* @param cargo_type to get the string representation of.
* @return the cargo label.
* @note the returned cargo label must be free'd (C++ only).
*/
static char *GetCargoLabel(CargoID cargo_type);
/**
* Checks whether the give cargo is a freight or not.
* @param cargo_type is this cargo freight or not?
* @return true if and only if the cargo is freight.
*/
static bool IsFreight(CargoID cargo_type);
/**
* Get the income for transporting a piece of cargo over the
* given distance within the specified time.
* @param cargo_type the cargo to transport.
* @param distance the distance the cargo travels from begin to end.
* @param days_in_transit amount of (game) days the cargo is in transit.
* @return the amount of money that would be earned by this trip.
*/
static int32 GetCargoIncome(CargoID cargo_type, uint32 distance, uint32 days_in_transit);
};
#endif /* AI_CARGO_HPP */