00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #ifndef __EVENT_H__
00027 #define __EVENT_H__
00028
00029 #include "Vessel.h"
00030 #include "PackDef.h"
00031 #include "BAPBase.h"
00032
00033
00034 enum EventType
00035 {
00036 ARRIVE,
00037 DEPART
00038 };
00039
00040 class Event : public BAPBase
00041 {
00042 public:
00043 Event();
00044 Event(Vessel aVessel, EventType aDepartOrArrive);
00045 Event(const Event& aEvent);
00046 ~Event();
00047
00048
00049 Event& operator=(const Event& aEvent);
00050
00051
00052
00053
00054 void Print(int aWidth = 1, int aDetail = 0) const;
00055
00056
00057 Bool IsArrive() const;
00058 Bool IsDepart() const;
00059
00060
00061 Vessel GetVessel() const;
00062 int GetTime() const;
00063 int GetSize() const;
00064
00065
00066 void SetTime(int aTime);
00067 void SetSize(int aSize);
00068
00069
00070 friend int compare(const Event& aLEvent, const Event& aREvent);
00071 friend ostream& operator<<(ostream& aOutput, const Event& aEvent);
00072 friend istream& operator>>(istream& aInput, Event& aEvent);
00073
00074 private:
00075 Vessel mVessel;
00076 EventType mEventType;
00077 int mTime;
00078 int mSize;
00079 };
00080
00081 #endif