Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00012 #ifndef DEPARTURES_TYPE_H
00013 #define DEPARTURES_TYPE_H
00014
00015 #include "station_base.h"
00016 #include "order_base.h"
00017
00019 typedef enum {
00020 D_TRAVELLING = 0,
00021 D_ARRIVED = 1,
00022 D_CANCELLED = 2,
00023 } DepartureStatus;
00024
00026 typedef enum {
00027 D_DEPARTURE = 0,
00028 D_ARRIVAL = 1,
00029 } DepartureType;
00030
00032 typedef struct Departure {
00033 DateTicks scheduled_date;
00034 DateTicks lateness;
00035 StationID terminus;
00036 StationID via;
00037 SmallVector<StationID, 32> calling_at;
00038 DepartureStatus status;
00039 DepartureType type;
00040 const Vehicle *vehicle;
00041 const Order *order;
00042 Departure() : terminus(INVALID_STATION), via(INVALID_STATION), calling_at(), vehicle(NULL) { }
00043 ~Departure()
00044 {
00045 calling_at.Reset();
00046 }
00047 } Departure;
00048
00049 typedef SmallVector<Departure*, 32> DepartureList;
00050
00051 #endif