AI_VMSuspend Class Reference

A throw-class that is given when the VM wants to suspend. More...

#include <ai_instance.hpp>

Public Member Functions

 AI_VMSuspend (int time, AISuspendCallbackProc *callback)
 Create the suspend exception.
int GetSuspendTime ()
 Get the amount of ticks the AI should be suspended.
AISuspendCallbackProcGetSuspendCallback ()
 Get the callback to call when the AI can run again.

Private Attributes

int time
 Amount of ticks to suspend the AI.
AISuspendCallbackProccallback
 Callback function to call when the AI can run again.

Detailed Description

A throw-class that is given when the VM wants to suspend.

Definition at line 25 of file ai_instance.hpp.


Constructor & Destructor Documentation

AI_VMSuspend::AI_VMSuspend ( int  time,
AISuspendCallbackProc callback 
) [inline]

Create the suspend exception.

Parameters:
time The amount of ticks to suspend.
callback The callback to call when the AI may resume again.

Definition at line 32 of file ai_instance.hpp.


Member Function Documentation

AISuspendCallbackProc* AI_VMSuspend::GetSuspendCallback (  )  [inline]

Get the callback to call when the AI can run again.

Returns:
The callback function to run.

Definition at line 47 of file ai_instance.hpp.

References callback.

Referenced by AIInstance::GameLoop().

int AI_VMSuspend::GetSuspendTime (  )  [inline]

Get the amount of ticks the AI should be suspended.

Returns:
The amount of AI ticks to suspend the AI.

Definition at line 41 of file ai_instance.hpp.

References time.

Referenced by AIInstance::GameLoop().


The documentation for this class was generated from the following file:

Generated on Sun Jun 5 04:20:41 2011 for OpenTTD by  doxygen 1.6.1