src/ai/api/ai_vehiclelist_valuator.hpp
branchnoai
changeset 9778 38560cd27070
parent 9772 c1035f0ac732
child 9780 37eb5460ff2e
equal deleted inserted replaced
9777:053e53a1650e 9778:38560cd27070
     1 /* $Id$ */
     1 /* $Id$ */
     2 
     2 
     3 /** @file ai_vehiclelist_valuator.hpp all the valuators for vehiclelist */
     3 /** @file ai_vehiclelist_valuator.hpp all the valuators for AIVehicleList */
     4 
     4 
     5 #ifndef AI_VEHICLELIST_VALUATOR_HPP
     5 #ifndef AI_VEHICLELIST_VALUATOR_HPP
     6 #define AI_VEHICLELIST_VALUATOR_HPP
     6 #define AI_VEHICLELIST_VALUATOR_HPP
     7 
     7 
     8 #include "ai_abstractlist.hpp"
     8 #include "ai_abstractlist.hpp"
     9 
     9 
    10 /**
    10 /**
    11  * Get the location for entries in an AIVehicleList instance.
    11  * Get the location for entries in an AIVehicleList instance.
    12  * @note resulting items are of the type TileIndex
    12  * @note Resulting items are of the type TileIndex.
    13  * @note the input items are of the type VehicleID
    13  * @note Can only operate on an AIVehicleList instance.
       
    14  * @ingroup AIVehicleList
    14  */
    15  */
    15 class AIVehicleList_vLocation : public AIAbstractList::Valuator {
    16 class AIVehicleList_vLocation : public AIAbstractList::Valuator {
    16 public:
    17 public:
    17 	/**
       
    18 	 * The name of the class, needed by several sub-processes.
       
    19 	 */
       
    20 	static const char *GetClassName() { return "AIVehicleList_vGetLocation"; }
    18 	static const char *GetClassName() { return "AIVehicleList_vGetLocation"; }
    21 
    19 
    22 private:
    20 private:
    23 	/**
       
    24 	 * The name of this list, to check if we can be used with a List.
       
    25 	 */
       
    26 	const char *GetListName() const { return "AIVehicleList"; }
    21 	const char *GetListName() const { return "AIVehicleList"; }
    27 
       
    28 	int32 Valuate(int32 vehicle_id) const;
    22 	int32 Valuate(int32 vehicle_id) const;
    29 };
    23 };
    30 
    24 
    31 /**
    25 /**
    32  * Get the engine-type for entries in an AIVehicleList instance.
    26  * Get the engine-type for entries in an AIVehicleList instance.
    33  * @note resulting items are of the type EngineID
    27  * @note Resulting items are of the type EngineID.
    34  * @note the input items are of the type VehicleID
    28  * @note Can only operate on an AIVehicleList instance.
       
    29  * @ingroup AIVehicleList
    35  */
    30  */
    36 class AIVehicleList_vEngineType : public AIAbstractList::Valuator {
    31 class AIVehicleList_vEngineType : public AIAbstractList::Valuator {
    37 public:
    32 public:
    38 	/**
       
    39 	 * The name of the class, needed by several sub-processes.
       
    40 	 */
       
    41 	static const char *GetClassName() { return "AIVehicleList_vEngineType"; }
    33 	static const char *GetClassName() { return "AIVehicleList_vEngineType"; }
    42 
    34 
    43 private:
    35 private:
    44 	/**
       
    45 	 * The name of this list, to check if we can be used with a List.
       
    46 	 */
       
    47 	const char *GetListName() const { return "AIVehicleList"; }
    36 	const char *GetListName() const { return "AIVehicleList"; }
    48 
       
    49 	int32 Valuate(int32 vehicle_id) const;
    37 	int32 Valuate(int32 vehicle_id) const;
    50 };
    38 };
    51 
    39 
    52 /**
    40 /**
    53  * Get the unit number for entries in an AIVehicleList instance.
    41  * Get the unit number for entries in an AIVehicleList instance.
    54  * @note resulting items are of the type int32
    42  * @note Resulting items are of the type int32.
    55  * @note the input items are of the type VehicleID
    43  * @note Can only operate on an AIVehicleList instance.
       
    44  * @ingroup AIVehicleList
    56  */
    45  */
    57 class AIVehicleList_vUnitNumber : public AIAbstractList::Valuator {
    46 class AIVehicleList_vUnitNumber : public AIAbstractList::Valuator {
    58 public:
    47 public:
    59 	/**
       
    60 	 * The name of the class, needed by several sub-processes.
       
    61 	 */
       
    62 	static const char *GetClassName() { return "AIVehicleList_vUnitNumber"; }
    48 	static const char *GetClassName() { return "AIVehicleList_vUnitNumber"; }
    63 
    49 
    64 private:
    50 private:
    65 	/**
       
    66 	 * The name of this list, to check if we can be used with a List.
       
    67 	 */
       
    68 	const char *GetListName() const { return "AIVehicleList"; }
    51 	const char *GetListName() const { return "AIVehicleList"; }
    69 
       
    70 	int32 Valuate(int32 vehicle_id) const;
    52 	int32 Valuate(int32 vehicle_id) const;
    71 };
    53 };
    72 
    54 
    73 /**
    55 /**
    74  * Get the age for entries in an AIVehicleList instance.
    56  * Get the age for entries in an AIVehicleList instance.
    75  * @note resulting items are of the type int32 (age in days)
    57  * @note Resulting items are of the type int32 (age in days).
    76  * @note the input items are of the type VehicleID
    58  * @note Can only operate on an AIVehicleList instance.
       
    59  * @ingroup AIVehicleList
    77  */
    60  */
    78 class AIVehicleList_vAge : public AIAbstractList::Valuator {
    61 class AIVehicleList_vAge : public AIAbstractList::Valuator {
    79 public:
    62 public:
    80 	/**
       
    81 	 * The name of the class, needed by several sub-processes.
       
    82 	 */
       
    83 	static const char *GetClassName() { return "AIVehicleList_vAge"; }
    63 	static const char *GetClassName() { return "AIVehicleList_vAge"; }
    84 
    64 
    85 private:
    65 private:
    86 	/**
       
    87 	 * The name of this list, to check if we can be used with a List.
       
    88 	 */
       
    89 	const char *GetListName() const { return "AIVehicleList"; }
    66 	const char *GetListName() const { return "AIVehicleList"; }
    90 
       
    91 	int32 Valuate(int32 vehicle_id) const;
    67 	int32 Valuate(int32 vehicle_id) const;
    92 };
    68 };
    93 
    69 
    94 /**
    70 /**
    95  * Get the max age for entries in an AIVehicleList instance.
    71  * Get the max age for entries in an AIVehicleList instance.
    96  * @note resulting items are of the type int32 (age in days)
    72  * @note Resulting items are of the type int32 (age in days).
    97  * @note the input items are of the type VehicleID
    73  * @note Can only operate on an AIVehicleList instance.
       
    74  * @ingroup AIVehicleList
    98  */
    75  */
    99 class AIVehicleList_vMaxAge : public AIAbstractList::Valuator {
    76 class AIVehicleList_vMaxAge : public AIAbstractList::Valuator {
   100 public:
    77 public:
   101 	/**
       
   102 	 * The name of the class, needed by several sub-processes.
       
   103 	 */
       
   104 	static const char *GetClassName() { return "AIVehicleList_vMaxAge"; }
    78 	static const char *GetClassName() { return "AIVehicleList_vMaxAge"; }
   105 
    79 
   106 private:
    80 private:
   107 	/**
       
   108 	 * The name of this list, to check if we can be used with a List.
       
   109 	 */
       
   110 	const char *GetListName() const { return "AIVehicleList"; }
    81 	const char *GetListName() const { return "AIVehicleList"; }
   111 
       
   112 	int32 Valuate(int32 vehicle_id) const;
    82 	int32 Valuate(int32 vehicle_id) const;
   113 };
    83 };
   114 
    84 
   115 /**
    85 /**
   116  * Get the age left for the vehicle gets 'old' for entries in an AIVehicleList instance.
    86  * Get the age left for the vehicle gets 'old' for entries in an AIVehicleList instance.
   117  * @note resulting items are of the type int32 (age in days)
    87  * @note Resulting items are of the type int32 (age in days).
   118  * @note the input items are of the type VehicleID
    88  * @note Can only operate on an AIVehicleList instance.
       
    89  * @ingroup AIVehicleList
   119  */
    90  */
   120 class AIVehicleList_vAgeLeft : public AIAbstractList::Valuator {
    91 class AIVehicleList_vAgeLeft : public AIAbstractList::Valuator {
   121 public:
    92 public:
   122 	/**
       
   123 	 * The name of the class, needed by several sub-processes.
       
   124 	 */
       
   125 	static const char *GetClassName() { return "AIVehicleList_vAgeLeft"; }
    93 	static const char *GetClassName() { return "AIVehicleList_vAgeLeft"; }
   126 
    94 
   127 private:
    95 private:
   128 	/**
       
   129 	 * The name of this list, to check if we can be used with a List.
       
   130 	 */
       
   131 	const char *GetListName() const { return "AIVehicleList"; }
    96 	const char *GetListName() const { return "AIVehicleList"; }
   132 
       
   133 	int32 Valuate(int32 vehicle_id) const;
    97 	int32 Valuate(int32 vehicle_id) const;
   134 };
    98 };
   135 
    99 
   136 /**
   100 /**
   137  * Get the profit of this year for entries in an AIVehicleList instance.
   101  * Get the profit of this year for entries in an AIVehicleList instance.
   138  * @note resulting items are of the type int32 (age in days)
   102  * @note Resulting items are of the type int32 (age in days).
   139  * @note the input items are of the type VehicleID
   103  * @note Can only operate on an AIVehicleList instance.
       
   104  * @ingroup AIVehicleList
   140  */
   105  */
   141 class AIVehicleList_vProfitThisYear : public AIAbstractList::Valuator {
   106 class AIVehicleList_vProfitThisYear : public AIAbstractList::Valuator {
   142 public:
   107 public:
   143 	/**
       
   144 	 * The name of the class, needed by several sub-processes.
       
   145 	 */
       
   146 	static const char *GetClassName() { return "AIVehicleList_vProfitThisYear"; }
   108 	static const char *GetClassName() { return "AIVehicleList_vProfitThisYear"; }
   147 
   109 
   148 private:
   110 private:
   149 	/**
       
   150 	 * The name of this list, to check if we can be used with a List.
       
   151 	 */
       
   152 	const char *GetListName() const { return "AIVehicleList"; }
   111 	const char *GetListName() const { return "AIVehicleList"; }
   153 
       
   154 	int32 Valuate(int32 vehicle_id) const;
   112 	int32 Valuate(int32 vehicle_id) const;
   155 };
   113 };
   156 
   114 
   157 /**
   115 /**
   158  * Get the profit of last year for entries in an AIVehicleList instance.
   116  * Get the profit of last year for entries in an AIVehicleList instance.
   159  * @note resulting items are of the type int32 (age in days)
   117  * @note Resulting items are of the type int32 (age in days).
   160  * @note the input items are of the type VehicleID
   118  * @note Can only operate on an AIVehicleList instance.
       
   119  * @ingroup AIVehicleList
   161  */
   120  */
   162 class AIVehicleList_vProfitLastYear : public AIAbstractList::Valuator {
   121 class AIVehicleList_vProfitLastYear : public AIAbstractList::Valuator {
   163 public:
   122 public:
   164 	/**
       
   165 	 * The name of the class, needed by several sub-processes.
       
   166 	 */
       
   167 	static const char *GetClassName() { return "AIVehicleList_vProfitLastYear"; }
   123 	static const char *GetClassName() { return "AIVehicleList_vProfitLastYear"; }
   168 
   124 
   169 private:
   125 private:
   170 	/**
       
   171 	 * The name of this list, to check if we can be used with a List.
       
   172 	 */
       
   173 	const char *GetListName() const { return "AIVehicleList"; }
   126 	const char *GetListName() const { return "AIVehicleList"; }
   174 
       
   175 	int32 Valuate(int32 vehicle_id) const;
   127 	int32 Valuate(int32 vehicle_id) const;
   176 };
   128 };
   177 
   129 
   178 /**
   130 /**
   179  * Get the ype of the vehicle for entries in an AIVehicleList instance.
   131  * Get the ype of the vehicle for entries in an AIVehicleList instance.
   180  * @note resulting items are of the type AIVehicle::VehicleType
   132  * @note Resulting items are of the type AIVehicle::VehicleType.
   181  * @note the input items are of the type VehicleID
   133  * @note Can only operate on an AIVehicleList instance.
       
   134  * @ingroup AIVehicleList
   182  */
   135  */
   183 class AIVehicleList_vVehicleType : public AIAbstractList::Valuator {
   136 class AIVehicleList_vVehicleType : public AIAbstractList::Valuator {
   184 public:
   137 public:
   185 	/**
       
   186 	 * The name of the class, needed by several sub-processes.
       
   187 	 */
       
   188 	static const char *GetClassName() { return "AIVehicleList_vVehicleType"; }
   138 	static const char *GetClassName() { return "AIVehicleList_vVehicleType"; }
   189 
   139 
   190 private:
   140 private:
   191 	/**
       
   192 	 * The name of this list, to check if we can be used with a List.
       
   193 	 */
       
   194 	const char *GetListName() const { return "AIVehicleList"; }
   141 	const char *GetListName() const { return "AIVehicleList"; }
   195 
       
   196 	int32 Valuate(int32 vehicle_id) const;
   142 	int32 Valuate(int32 vehicle_id) const;
   197 };
   143 };
   198 
   144 
   199 
   145 
   200 #endif /* AI_VEHICLELIST_VALUATOR_HPP */
   146 #endif /* AI_VEHICLELIST_VALUATOR_HPP */