# AIEvent Class Reference

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

`#include <ai_event.hpp>`

Inheritance diagram for AIEvent:

## 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_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 }
| 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 ()
## 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 15 of file ai_event.hpp.

## Member Enumeration Documentation

enum AIEvent::AIEventType

The type of event.

Needed to lookup the detailed class.

Definition at line 22 of file ai_event.hpp.

## Member Function Documentation

AIEventType AIEvent::GetEventType | ( |  | ) | `[inline]`

Get the event-type.

Returns:
  The `AIEventType`.

Definition at line 57 of file ai_event.hpp.

References type.

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

- src/ai/api/ai_event.hpp