Files @ r10999:950d41f6cb97
Branch filter:

Location: cpp/openttd-patchpack/source/src/ai/api/ai_list.hpp

translators
(svn r15339) -Update: WebTranslator2 update to 2009-02-04 18:39:16
arabic_egypt - 1 fixed by khaloofah (1)
german - 1 changed by planetmaker (1)
hebrew - 668 fixed, 19 changed by 19izhar73 (687)
korean - 10 changed by leejaeuk5 (10)
serbian - 6 fixed, 4 changed by salejemaster (10)
/* $Id$ */

/** @file ai_list.hpp List custom entries. */

#ifndef AI_LIST_HPP
#define AI_LIST_HPP

#include "ai_abstractlist.hpp"

/**
 * Creates an empty list, in which you can add integers.
 * @ingroup AIList
 */
class AIList : public AIAbstractList {
public:
	static const char *GetClassName() { return "AIList"; }

public:
	/**
	 * Add an item to the list.
	 * @param item the item to add.
	 * @param value the value to assign.
	 */
	void AddItem(int32 item, int32 value);

	/**
	 * Change the value of an item in the list.
	 * @param item the item to change
	 * @param value the value to assign.
	 */
	void ChangeItem(int32 item, int32 value);

	/**
	 * Remove the item from the list.
	 * @param item the item to remove.
	 */
	void RemoveItem(int32 item);

#ifndef DOXYGEN_SKIP
	/**
	 * Used for [] set from Squirrel.
	 */
	SQInteger _set(HSQUIRRELVM vm);
#endif /* DOXYGEN_SKIP */
};

#endif /* AI_LIST_HPP */