src/ai/api/ai_enginelist_valuator.hpp
branchnoai
changeset 9778 38560cd27070
parent 9772 c1035f0ac732
equal deleted inserted replaced
9777:053e53a1650e 9778:38560cd27070
     1 /* $Id$ */
     1 /* $Id$ */
     2 
     2 
     3 /** @file ai_enginelist_valuator.hpp all the valuators for enginelist */
     3 /** @file ai_enginelist_valuator.hpp all the valuators for AIEngineList */
     4 
     4 
     5 #ifndef AI_ENGINELIST_VALUATOR_HPP
     5 #ifndef AI_ENGINELIST_VALUATOR_HPP
     6 #define AI_ENGINELIST_VALUATOR_HPP
     6 #define AI_ENGINELIST_VALUATOR_HPP
     7 
     7 
     8 #include "ai_abstractlist.hpp"
     8 #include "ai_abstractlist.hpp"
     9 
     9 
    10 /**
    10 /**
    11  * Get the cargo-type for entries in an AIEngineList instance.
    11  * Get the cargo-type for entries in an AIEngineList instance.
    12  * @note resulting items are of the type CargoID
    12  * @note Resulting items are of the type CargoID.
    13  * @note the input items are of the type EngineID
    13  * @note Can only operate on an AIEngineList instance.
       
    14  * @ingroup AIEngineList
    14  */
    15  */
    15 class AIEngineList_vCargoType : public AIAbstractList::Valuator {
    16 class AIEngineList_vCargoType : 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 "AIEngineList_vCargoType"; }
    18 	static const char *GetClassName() { return "AIEngineList_vCargoType"; }
    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 "AIEngineList"; }
    21 	const char *GetListName() const { return "AIEngineList"; }
    27 
    22 	int32 Valuate(int32 engine_id) const;
    28 	int32 Valuate(int32 engine) const;
       
    29 };
    23 };
    30 
    24 
    31 /**
    25 /**
    32  * Get the capacity for entries in an AIEngineList instance.
    26  * Get the capacity for entries in an AIEngineList instance.
    33  * @note resulting items are of the type int32
    27  * @note Resulting items are of the type int32.
    34  * @note the input items are of the type EngineID
    28  * @note Can only operate on an AIEngineList instance.
       
    29  * @ingroup AIEngineList
    35  */
    30  */
    36 class AIEngineList_vCapacity : public AIAbstractList::Valuator {
    31 class AIEngineList_vCapacity : 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 "AIEngineList_vCapacity"; }
    33 	static const char *GetClassName() { return "AIEngineList_vCapacity"; }
    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 "AIEngineList"; }
    36 	const char *GetListName() const { return "AIEngineList"; }
    48 
    37 	int32 Valuate(int32 engine_id) const;
    49 	int32 Valuate(int32 engine) const;
       
    50 };
    38 };
    51 
    39 
    52 /**
    40 /**
    53  * Get the reliability for entries in an AIEngineList instance.
    41  * Get the reliability for entries in an AIEngineList 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 EngineID
    43  * @note Can only operate on an AIEngineList instance.
       
    44  * @ingroup AIEngineList
    56  */
    45  */
    57 class AIEngineList_vReliability : public AIAbstractList::Valuator {
    46 class AIEngineList_vReliability : 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 "AIEngineList_vReliability"; }
    48 	static const char *GetClassName() { return "AIEngineList_vReliability"; }
    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 "AIEngineList"; }
    51 	const char *GetListName() const { return "AIEngineList"; }
    69 
    52 	int32 Valuate(int32 engine_id) const;
    70 	int32 Valuate(int32 engine) const;
       
    71 };
    53 };
    72 
    54 
    73 /**
    55 /**
    74  * Get the max speed for entries in an AIEngineList instance.
    56  * Get the max speed for entries in an AIEngineList instance.
    75  * @note resulting items are of the type int32
    57  * @note Resulting items are of the type int32.
    76  * @note the input items are of the type EngineID
    58  * @note Can only operate on an AIEngineList instance.
       
    59  * @ingroup AIEngineList
    77  */
    60  */
    78 class AIEngineList_vMaxSpeed : public AIAbstractList::Valuator {
    61 class AIEngineList_vMaxSpeed : 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 "AIEngineList_vMaxSpeed"; }
    63 	static const char *GetClassName() { return "AIEngineList_vMaxSpeed"; }
    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 "AIEngineList"; }
    66 	const char *GetListName() const { return "AIEngineList"; }
    90 
    67 	int32 Valuate(int32 engine_id) const;
    91 	int32 Valuate(int32 engine) const;
       
    92 };
    68 };
    93 
    69 
    94 /**
    70 /**
    95  * Get the price for entries in an AIEngineList instance.
    71  * Get the price for entries in an AIEngineList instance.
    96  * @note resulting items are of the type int32
    72  * @note Resulting items are of the type int32.
    97  * @note the input items are of the type EngineID
    73  * @note Can only operate on an AIEngineList instance.
       
    74  * @ingroup AIEngineList
    98  */
    75  */
    99 class AIEngineList_vPrice : public AIAbstractList::Valuator {
    76 class AIEngineList_vPrice : 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 "AIEngineList_vPrice"; }
    78 	static const char *GetClassName() { return "AIEngineList_vPrice"; }
   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 "AIEngineList"; }
    81 	const char *GetListName() const { return "AIEngineList"; }
   111 
    82 	int32 Valuate(int32 engine_id) const;
   112 	int32 Valuate(int32 engine) const;
       
   113 };
    83 };
   114 
    84 
   115 #endif /* AI_ENGINELIST_VALUATOR_HPP */
    85 #endif /* AI_ENGINELIST_VALUATOR_HPP */