(svn r22410) -Document: some more bits ;)

This commit is contained in:
rubidium
2011-05-02 16:14:23 +00:00
parent e9837ff1ec
commit 4d5dbf5170
51 changed files with 241 additions and 39 deletions

View File

@@ -151,9 +151,12 @@ public:
return item;
}
/** The number of items. */
FORCEINLINE int TotalCount() {return m_arr.Length();}
/** Get a particular item. */
FORCEINLINE Titem_& ItemAt(int idx) {return m_arr[idx];}
/** Helper for creating output of this array. */
template <class D> void Dump(D &dmp) const
{
dmp.WriteStructT("m_arr", &m_arr);

View File

@@ -65,7 +65,7 @@ FindDepotData YapfRoadVehicleFindNearestDepot(const RoadVehicle *v, int max_pena
/**
* Used when user sends train to the nearest depot or if train needs servicing using YAPF.
* @param v train that needs to go to some depot
* @param max_penalty max distance (int pathfinder penalty) from the current train position
* @param max_distance max distance (int pathfinder penalty) from the current train position
* (used also as optimization - the pathfinder can stop path finding if max_penalty
* was reached and no depot was seen)
* @return the data about the depot

View File

@@ -12,7 +12,14 @@
#ifndef YAPF_COSTBASE_HPP
#define YAPF_COSTBASE_HPP
/** Base implementation for cost accounting. */
struct CYapfCostBase {
/**
* Does the given track direction on the given tile yeild an uphill penalty?
* @param tile The tile to check.
* @param td The track direction to check.
* @return True if there's a slope, otherwise false.
*/
FORCEINLINE static bool stSlopeCost(TileIndex tile, Trackdir td)
{
if (IsDiagonalTrackdir(td)) {
@@ -34,9 +41,4 @@ struct CYapfCostBase {
}
};
struct CostRailSettings {
/* look-ahead signal penalty */
};
#endif /* YAPF_COSTBASE_HPP */

View File

@@ -17,7 +17,6 @@
template <class Types>
class CYapfCostRailT
: public CYapfCostBase
, public CostRailSettings
{
public:
typedef typename Types::Tpf Tpf; ///< the pathfinder class (derived from THIS class)