diff options
author | rubidium <rubidium@openttd.org> | 2011-05-01 09:24:19 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2011-05-01 09:24:19 +0000 |
commit | 70c7ec30b1c10bc4502a14e45555fff7a310fca4 (patch) | |
tree | 2d4cb9bbe8cba6a7eea42d5695a4901edbe316c6 /src/ai/ai_instance.hpp | |
parent | abc235253752a5c182ef0bcc28df7d1d6369d149 (diff) | |
download | openttd-70c7ec30b1c10bc4502a14e45555fff7a310fca4.tar.xz |
(svn r22396) -Document: some AI doxygen stuff
Diffstat (limited to 'src/ai/ai_instance.hpp')
-rw-r--r-- | src/ai/ai_instance.hpp | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/src/ai/ai_instance.hpp b/src/ai/ai_instance.hpp index 9a427c8c6..718531feb 100644 --- a/src/ai/ai_instance.hpp +++ b/src/ai/ai_instance.hpp @@ -24,6 +24,11 @@ typedef void (AISuspendCallbackProc)(class AIInstance *instance); */ class AI_VMSuspend { public: + /** + * Create the suspend exception. + * @param time The amount of ticks to suspend. + * @param callback The callback to call when the AI may resume again. + */ AI_VMSuspend(int time, AISuspendCallbackProc *callback) : time(time), callback(callback) @@ -51,20 +56,33 @@ private: */ class AI_FatalError { public: + /** + * Creates a "fatal error" exception. + * @param msg The message describing the cause of the fatal error. + */ AI_FatalError(const char *msg) : msg(msg) {} + /** + * The error message associated with the fatal error. + * @return The error message. + */ const char *GetErrorMessage() { return msg; } private: - const char *msg; + const char *msg; ///< The error message. }; /** Runtime information about an AI like a pointer to the squirrel vm and the current state. */ class AIInstance { public: friend class AIObject; + + /** + * Create a new AI. + * @param info The AI to create the instance of. + */ AIInstance(class AIInfo *info); ~AIInstance(); |