author | truelight |
Thu, 12 Jul 2007 15:05:24 +0000 | |
branch | noai |
changeset 9636 | 1005ffccf641 |
child 9648 | 760b7b504e37 |
permissions | -rw-r--r-- |
9636
1005ffccf641
(svn r10527) [NoAI] -Add: AIStationList(), which lists all your stations; useful to maintain routes
truelight
parents:
diff
changeset
|
1 |
/* $Id$ */ |
1005ffccf641
(svn r10527) [NoAI] -Add: AIStationList(), which lists all your stations; useful to maintain routes
truelight
parents:
diff
changeset
|
2 |
|
1005ffccf641
(svn r10527) [NoAI] -Add: AIStationList(), which lists all your stations; useful to maintain routes
truelight
parents:
diff
changeset
|
3 |
/** @file ai_stationlist_valuator.hpp all the valuators for stationlist */ |
1005ffccf641
(svn r10527) [NoAI] -Add: AIStationList(), which lists all your stations; useful to maintain routes
truelight
parents:
diff
changeset
|
4 |
|
1005ffccf641
(svn r10527) [NoAI] -Add: AIStationList(), which lists all your stations; useful to maintain routes
truelight
parents:
diff
changeset
|
5 |
#ifndef AI_STATIONLIST_VALUATOR_HPP |
1005ffccf641
(svn r10527) [NoAI] -Add: AIStationList(), which lists all your stations; useful to maintain routes
truelight
parents:
diff
changeset
|
6 |
#define AI_STATIONLIST_VALUATOR_HPP |
1005ffccf641
(svn r10527) [NoAI] -Add: AIStationList(), which lists all your stations; useful to maintain routes
truelight
parents:
diff
changeset
|
7 |
|
1005ffccf641
(svn r10527) [NoAI] -Add: AIStationList(), which lists all your stations; useful to maintain routes
truelight
parents:
diff
changeset
|
8 |
#include "ai_abstractlist.hpp" |
1005ffccf641
(svn r10527) [NoAI] -Add: AIStationList(), which lists all your stations; useful to maintain routes
truelight
parents:
diff
changeset
|
9 |
|
1005ffccf641
(svn r10527) [NoAI] -Add: AIStationList(), which lists all your stations; useful to maintain routes
truelight
parents:
diff
changeset
|
10 |
/** |
1005ffccf641
(svn r10527) [NoAI] -Add: AIStationList(), which lists all your stations; useful to maintain routes
truelight
parents:
diff
changeset
|
11 |
* Get the location for entries in an AIStationList instance. |
1005ffccf641
(svn r10527) [NoAI] -Add: AIStationList(), which lists all your stations; useful to maintain routes
truelight
parents:
diff
changeset
|
12 |
* @note resulting items are of the type TileIndex |
1005ffccf641
(svn r10527) [NoAI] -Add: AIStationList(), which lists all your stations; useful to maintain routes
truelight
parents:
diff
changeset
|
13 |
* @note the input items are of the type StationID |
1005ffccf641
(svn r10527) [NoAI] -Add: AIStationList(), which lists all your stations; useful to maintain routes
truelight
parents:
diff
changeset
|
14 |
*/ |
1005ffccf641
(svn r10527) [NoAI] -Add: AIStationList(), which lists all your stations; useful to maintain routes
truelight
parents:
diff
changeset
|
15 |
class AIStationListLocation : public AIAbstractList::Valuator { |
1005ffccf641
(svn r10527) [NoAI] -Add: AIStationList(), which lists all your stations; useful to maintain routes
truelight
parents:
diff
changeset
|
16 |
public: |
1005ffccf641
(svn r10527) [NoAI] -Add: AIStationList(), which lists all your stations; useful to maintain routes
truelight
parents:
diff
changeset
|
17 |
/** |
1005ffccf641
(svn r10527) [NoAI] -Add: AIStationList(), which lists all your stations; useful to maintain routes
truelight
parents:
diff
changeset
|
18 |
* The name of the class, needed by several sub-processes. |
1005ffccf641
(svn r10527) [NoAI] -Add: AIStationList(), which lists all your stations; useful to maintain routes
truelight
parents:
diff
changeset
|
19 |
*/ |
1005ffccf641
(svn r10527) [NoAI] -Add: AIStationList(), which lists all your stations; useful to maintain routes
truelight
parents:
diff
changeset
|
20 |
static const char *GetClassName() { return "AIStationListGetLocation"; } |
1005ffccf641
(svn r10527) [NoAI] -Add: AIStationList(), which lists all your stations; useful to maintain routes
truelight
parents:
diff
changeset
|
21 |
|
1005ffccf641
(svn r10527) [NoAI] -Add: AIStationList(), which lists all your stations; useful to maintain routes
truelight
parents:
diff
changeset
|
22 |
private: |
1005ffccf641
(svn r10527) [NoAI] -Add: AIStationList(), which lists all your stations; useful to maintain routes
truelight
parents:
diff
changeset
|
23 |
int32 Valuate(int32 station) const; |
1005ffccf641
(svn r10527) [NoAI] -Add: AIStationList(), which lists all your stations; useful to maintain routes
truelight
parents:
diff
changeset
|
24 |
}; |
1005ffccf641
(svn r10527) [NoAI] -Add: AIStationList(), which lists all your stations; useful to maintain routes
truelight
parents:
diff
changeset
|
25 |
|
1005ffccf641
(svn r10527) [NoAI] -Add: AIStationList(), which lists all your stations; useful to maintain routes
truelight
parents:
diff
changeset
|
26 |
/** |
1005ffccf641
(svn r10527) [NoAI] -Add: AIStationList(), which lists all your stations; useful to maintain routes
truelight
parents:
diff
changeset
|
27 |
* Get the cargo waiting for entries in an AIStationList instance. |
1005ffccf641
(svn r10527) [NoAI] -Add: AIStationList(), which lists all your stations; useful to maintain routes
truelight
parents:
diff
changeset
|
28 |
* @note resulting items are of the type units |
1005ffccf641
(svn r10527) [NoAI] -Add: AIStationList(), which lists all your stations; useful to maintain routes
truelight
parents:
diff
changeset
|
29 |
* @note the input items are of the type StationID |
1005ffccf641
(svn r10527) [NoAI] -Add: AIStationList(), which lists all your stations; useful to maintain routes
truelight
parents:
diff
changeset
|
30 |
*/ |
1005ffccf641
(svn r10527) [NoAI] -Add: AIStationList(), which lists all your stations; useful to maintain routes
truelight
parents:
diff
changeset
|
31 |
class AIStationListCargoWaiting : public AIAbstractList::Valuator { |
1005ffccf641
(svn r10527) [NoAI] -Add: AIStationList(), which lists all your stations; useful to maintain routes
truelight
parents:
diff
changeset
|
32 |
public: |
1005ffccf641
(svn r10527) [NoAI] -Add: AIStationList(), which lists all your stations; useful to maintain routes
truelight
parents:
diff
changeset
|
33 |
/** |
1005ffccf641
(svn r10527) [NoAI] -Add: AIStationList(), which lists all your stations; useful to maintain routes
truelight
parents:
diff
changeset
|
34 |
* The name of the class, needed by several sub-processes. |
1005ffccf641
(svn r10527) [NoAI] -Add: AIStationList(), which lists all your stations; useful to maintain routes
truelight
parents:
diff
changeset
|
35 |
*/ |
1005ffccf641
(svn r10527) [NoAI] -Add: AIStationList(), which lists all your stations; useful to maintain routes
truelight
parents:
diff
changeset
|
36 |
static const char *GetClassName() { return "AIStationListCargoWaiting"; } |
1005ffccf641
(svn r10527) [NoAI] -Add: AIStationList(), which lists all your stations; useful to maintain routes
truelight
parents:
diff
changeset
|
37 |
|
1005ffccf641
(svn r10527) [NoAI] -Add: AIStationList(), which lists all your stations; useful to maintain routes
truelight
parents:
diff
changeset
|
38 |
/** |
1005ffccf641
(svn r10527) [NoAI] -Add: AIStationList(), which lists all your stations; useful to maintain routes
truelight
parents:
diff
changeset
|
39 |
* Custom constructor, we want a cargo-type as parameter. |
1005ffccf641
(svn r10527) [NoAI] -Add: AIStationList(), which lists all your stations; useful to maintain routes
truelight
parents:
diff
changeset
|
40 |
*/ |
1005ffccf641
(svn r10527) [NoAI] -Add: AIStationList(), which lists all your stations; useful to maintain routes
truelight
parents:
diff
changeset
|
41 |
AIStationListCargoWaiting(CargoID cargo_type) { this->cargo_type = cargo_type; } |
1005ffccf641
(svn r10527) [NoAI] -Add: AIStationList(), which lists all your stations; useful to maintain routes
truelight
parents:
diff
changeset
|
42 |
|
1005ffccf641
(svn r10527) [NoAI] -Add: AIStationList(), which lists all your stations; useful to maintain routes
truelight
parents:
diff
changeset
|
43 |
private: |
1005ffccf641
(svn r10527) [NoAI] -Add: AIStationList(), which lists all your stations; useful to maintain routes
truelight
parents:
diff
changeset
|
44 |
CargoID cargo_type; |
1005ffccf641
(svn r10527) [NoAI] -Add: AIStationList(), which lists all your stations; useful to maintain routes
truelight
parents:
diff
changeset
|
45 |
|
1005ffccf641
(svn r10527) [NoAI] -Add: AIStationList(), which lists all your stations; useful to maintain routes
truelight
parents:
diff
changeset
|
46 |
int32 Valuate(int32 station) const; |
1005ffccf641
(svn r10527) [NoAI] -Add: AIStationList(), which lists all your stations; useful to maintain routes
truelight
parents:
diff
changeset
|
47 |
}; |
1005ffccf641
(svn r10527) [NoAI] -Add: AIStationList(), which lists all your stations; useful to maintain routes
truelight
parents:
diff
changeset
|
48 |
|
1005ffccf641
(svn r10527) [NoAI] -Add: AIStationList(), which lists all your stations; useful to maintain routes
truelight
parents:
diff
changeset
|
49 |
#endif /* AI_STATIONLIST_VALUATOR_HPP */ |