AIEvent Class Reference

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

#include <ai_event.hpp>

Inheritance diagram for AIEvent:
AIObject SimpleCountedObject AIEventCompanyAskMerger AIEventCompanyBankrupt AIEventCompanyInTrouble AIEventCompanyMerger AIEventCompanyNew AIEventDisasterZeppelinerCleared AIEventDisasterZeppelinerCrashed AIEventEngineAvailable AIEventEnginePreview AIEventIndustryClose AIEventIndustryOpen AIEventStationFirstVehicle AIEventSubsidyAwarded AIEventSubsidyExpired AIEventSubsidyOffer AIEventSubsidyOfferExpired AIEventTownFounded AIEventVehicleCrashed AIEventVehicleLost AIEventVehicleUnprofitable AIEventVehicleWaitingInDepot

Public Types

enum  AIEventType {
  AI_ET_INVALID = 0, AI_ET_TEST, AI_ET_SUBSIDY_OFFER, AI_ET_SUBSIDY_OFFER_EXPIRED,
  AI_ET_SUBSIDY_AWARDED, AI_ET_SUBSIDY_EXPIRED, AI_ET_ENGINE_PREVIEW, AI_ET_COMPANY_NEW,
  AI_ET_COMPANY_IN_TROUBLE, AI_ET_COMPANY_ASK_MERGER, AI_ET_COMPANY_MERGER, AI_ET_COMPANY_BANKRUPT,
  AI_ET_VEHICLE_CRASHED, AI_ET_VEHICLE_LOST, AI_ET_VEHICLE_WAITING_IN_DEPOT, AI_ET_VEHICLE_UNPROFITABLE,
  AI_ET_INDUSTRY_OPEN, AI_ET_INDUSTRY_CLOSE, AI_ET_ENGINE_AVAILABLE, AI_ET_STATION_FIRST_VEHICLE,
  AI_ET_DISASTER_ZEPPELINER_CRASHED, AI_ET_DISASTER_ZEPPELINER_CLEARED, AI_ET_TOWN_FOUNDED
}
 

The type of event.

More...

Public Member Functions

 AIEvent (AIEvent::AIEventType type)
 Constructor of AIEvent, to get the type of event.
AIEventType GetEventType ()
 Get the event-type.

Static Public Member Functions

static const char * GetClassName ()
 Get the name of this class to identify it towards squirrel.

Protected Attributes

AIEventType type
 The type of this event.

Detailed Description

Class that handles all event related functions.

You can lookup the type, and than convert it to the real event-class. That way you can request more detailed information about the event.

Definition at line 22 of file ai_event.hpp.


Member Enumeration Documentation

The type of event.

Needed to lookup the detailed class.

Definition at line 30 of file ai_event.hpp.


Member Function Documentation

static const char* AIEvent::GetClassName (  )  [inline, static]
AIEventType AIEvent::GetEventType (  )  [inline]

Get the event-type.

Returns:
The AIEventType.

Definition at line 67 of file ai_event.hpp.

References type.


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

Generated on Fri Mar 4 21:37:40 2011 for OpenTTD by  doxygen 1.6.1