(svn r9273) [NoAI] -Documentation: finished documenting the last few files; they should now be readable for any non-programmer.
/* $Id$ */
/** @file ai_object.hpp declaration of class for AIObject class */
#ifndef AI_OBJECT_HPP
#define AI_OBJECT_HPP
#include "../../stdafx.h"
#include "../../functions.h"
/**
* Uper-parent object of all API classes. You should never use this class in
* your AI, as it doesn't publish any public functions. It is used
* internally to have a common place to handle general things, like internal
* command processing, and command-validation checks.
*/
class AIObject {
protected:
/**
* Executes a raw DoCommand for the AI.
*/
int32 DoCommand(TileIndex tile, uint32 p1, uint32 p2, uint32 flags, uint procc);
/**
* Checks if the result of a DoCommand went wrong.
*/
bool CmdFailed(int32 res);
/**
* Checks if the result of a DoCommand went okay.
*/
bool CmdSucceeded(int32 res);
};
#endif /* AI_OBJECT_HPP */