AIEventController Class Reference

Class that handles all event related functions. More...

#include <ai_event.hpp>

Inheritance diagram for AIEventController:
AIObject SimpleCountedObject

Static Public Member Functions

static const char * GetClassName ()
 The name of the class, needed by several sub-processes.
static bool IsEventWaiting ()
 Check if there is an event waiting.
static AIEventGetNextEvent ()
 Get the next event.
static void InsertEvent (AIEvent *event)
 Insert an event to the queue for the company.
static void FreeEventPointer ()
 Free the event pointer.

Static Private Member Functions

static void CreateEventPointer ()
 Create the event pointer.

Detailed Description

Class that handles all event related functions.

Note:
it is not needed to create an instance of AIEvent to access it, as all members are static, and all data is stored AI-wide.

Definition at line 81 of file ai_event.hpp.


Member Function Documentation

void AIEventController::FreeEventPointer (  )  [static]

Free the event pointer.

Note:
DO NOT CALL YOURSELF; leave it to the internal AI programming.

Definition at line 28 of file ai_event.cpp.

References AIObject::GetEventPointer().

static const char* AIEventController::GetClassName (  )  [inline, static]

The name of the class, needed by several sub-processes.

Get the name of this class to identify it towards squirrel.

Definition at line 87 of file ai_event.hpp.

AIEvent * AIEventController::GetNextEvent (  )  [static]

Get the next event.

Returns:
a class of the event-child issues.

Definition at line 51 of file ai_event.cpp.

References CreateEventPointer(), and AIObject::GetEventPointer().

void AIEventController::InsertEvent ( AIEvent event  )  [static]

Insert an event to the queue for the company.

Parameters:
event The event to insert.
Note:
DO NOT CALL YOURSELF; leave it to the internal AI programming.

Definition at line 63 of file ai_event.cpp.

References CreateEventPointer(), and AIObject::GetEventPointer().

Referenced by AI::NewEvent().

bool AIEventController::IsEventWaiting (  )  [static]

Check if there is an event waiting.

Returns:
true if there is an event on the stack.

Definition at line 43 of file ai_event.cpp.

References CreateEventPointer(), and AIObject::GetEventPointer().


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

Generated on Thu Apr 14 00:48:52 2011 for OpenTTD by  doxygen 1.6.1