src/ai/api/ai_list_valuator.hpp
author truebrain
Tue, 26 Feb 2008 15:14:45 +0000
branchnoai
changeset 9775 4a30f9e841ca
parent 9772 c1035f0ac732
child 9778 38560cd27070
permissions -rw-r--r--
(svn r12268) [NoAI] -Fix: allow AIList_vRandomize to run over any list
9661
32ce5530b9e3 (svn r10571) [NoAI] -Fix r10569: about time I forgot to add some files
truelight
parents:
diff changeset
     1
/* $Id$ */
32ce5530b9e3 (svn r10571) [NoAI] -Fix r10569: about time I forgot to add some files
truelight
parents:
diff changeset
     2
32ce5530b9e3 (svn r10571) [NoAI] -Fix r10569: about time I forgot to add some files
truelight
parents:
diff changeset
     3
/** @file ai_list_valuator.hpp all the valuators for list */
32ce5530b9e3 (svn r10571) [NoAI] -Fix r10569: about time I forgot to add some files
truelight
parents:
diff changeset
     4
32ce5530b9e3 (svn r10571) [NoAI] -Fix r10569: about time I forgot to add some files
truelight
parents:
diff changeset
     5
#ifndef AI_LIST_VALUATOR_HPP
32ce5530b9e3 (svn r10571) [NoAI] -Fix r10569: about time I forgot to add some files
truelight
parents:
diff changeset
     6
#define AI_LIST_VALUATOR_HPP
32ce5530b9e3 (svn r10571) [NoAI] -Fix r10569: about time I forgot to add some files
truelight
parents:
diff changeset
     7
32ce5530b9e3 (svn r10571) [NoAI] -Fix r10569: about time I forgot to add some files
truelight
parents:
diff changeset
     8
#include "ai_abstractlist.hpp"
32ce5530b9e3 (svn r10571) [NoAI] -Fix r10569: about time I forgot to add some files
truelight
parents:
diff changeset
     9
32ce5530b9e3 (svn r10571) [NoAI] -Fix r10569: about time I forgot to add some files
truelight
parents:
diff changeset
    10
/**
9756
7e637829cbd3 (svn r12241) [NoAI] -Fix r12236: global search/replace to the unreadable documentation! WHOHO! (tnx Progman)
truebrain
parents: 9753
diff changeset
    11
 * Give a random value for the entries in an AIList instance.
9661
32ce5530b9e3 (svn r10571) [NoAI] -Fix r10569: about time I forgot to add some files
truelight
parents:
diff changeset
    12
 * @note resulting items are of the type int32
32ce5530b9e3 (svn r10571) [NoAI] -Fix r10569: about time I forgot to add some files
truelight
parents:
diff changeset
    13
 * @note the input items are of the type int32
32ce5530b9e3 (svn r10571) [NoAI] -Fix r10569: about time I forgot to add some files
truelight
parents:
diff changeset
    14
 */
9753
7209db94ad12 (svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents: 9661
diff changeset
    15
class AIList_vRandomize : public AIAbstractList::Valuator {
9661
32ce5530b9e3 (svn r10571) [NoAI] -Fix r10569: about time I forgot to add some files
truelight
parents:
diff changeset
    16
public:
32ce5530b9e3 (svn r10571) [NoAI] -Fix r10569: about time I forgot to add some files
truelight
parents:
diff changeset
    17
	/**
32ce5530b9e3 (svn r10571) [NoAI] -Fix r10569: about time I forgot to add some files
truelight
parents:
diff changeset
    18
	 * The name of the class, needed by several sub-processes.
32ce5530b9e3 (svn r10571) [NoAI] -Fix r10569: about time I forgot to add some files
truelight
parents:
diff changeset
    19
	 */
9753
7209db94ad12 (svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents: 9661
diff changeset
    20
	static const char *GetClassName() { return "AIList_vRandomize"; }
9661
32ce5530b9e3 (svn r10571) [NoAI] -Fix r10569: about time I forgot to add some files
truelight
parents:
diff changeset
    21
32ce5530b9e3 (svn r10571) [NoAI] -Fix r10569: about time I forgot to add some files
truelight
parents:
diff changeset
    22
private:
9772
c1035f0ac732 (svn r12265) [NoAI] -Add: added a general protection that doesn't allow people using valuators on lists that aren't ment for those valuators
truebrain
parents: 9756
diff changeset
    23
	/**
c1035f0ac732 (svn r12265) [NoAI] -Add: added a general protection that doesn't allow people using valuators on lists that aren't ment for those valuators
truebrain
parents: 9756
diff changeset
    24
	 * The name of this list, to check if we can be used with a List.
c1035f0ac732 (svn r12265) [NoAI] -Add: added a general protection that doesn't allow people using valuators on lists that aren't ment for those valuators
truebrain
parents: 9756
diff changeset
    25
	 */
9775
4a30f9e841ca (svn r12268) [NoAI] -Fix: allow AIList_vRandomize to run over any list
truebrain
parents: 9772
diff changeset
    26
	const char *GetListName() const { return NULL; }
9772
c1035f0ac732 (svn r12265) [NoAI] -Add: added a general protection that doesn't allow people using valuators on lists that aren't ment for those valuators
truebrain
parents: 9756
diff changeset
    27
9661
32ce5530b9e3 (svn r10571) [NoAI] -Fix r10569: about time I forgot to add some files
truelight
parents:
diff changeset
    28
	int32 Valuate(int32 item) const;
32ce5530b9e3 (svn r10571) [NoAI] -Fix r10569: about time I forgot to add some files
truelight
parents:
diff changeset
    29
};
32ce5530b9e3 (svn r10571) [NoAI] -Fix r10569: about time I forgot to add some files
truelight
parents:
diff changeset
    30
32ce5530b9e3 (svn r10571) [NoAI] -Fix r10569: about time I forgot to add some files
truelight
parents:
diff changeset
    31
#endif /* AI_LIST_VALUATOR_HPP */