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 #ifndef __BAP_TV_SECTION__
00026 #define __BAP_TV_SECTION__
00027
00028
00029 #include "def.h"
00030 #include "BAPTVVessel.h"
00031
00032 using std::istream;
00033 using std::ostream;
00034 using leda::array;
00035 using leda::set;
00036
00037 class TVSection
00038 {
00039 public:
00040 TVSection();
00041 TVSection(int anID, int aMaxTimeZone, int aLength);
00042 TVSection(const TVSection& aSection);
00043 ~TVSection();
00044 TVSection& operator=(const TVSection& aSection);
00045 void Print(const int& aWidth = 1, const int& aDetail = 0) const;
00046
00047 friend istream& operator>>(istream& anIS, TVSection& aSection);
00048 friend ostream& operator<<(ostream& anOS, const TVSection& aSection);
00049 friend int compare(const TVSection& aS1, const TVSection& aS2);
00050
00051 int ID() const;
00052 int Length() const;
00053 bool CanAccommodate(const TVVessel& aVessel) const;
00054 const set<int>& Vessels() const;
00055
00056 void Add(const TVVessel& aVessel);
00057 void Remove(const TVVessel& aVessel);
00058
00059 private:
00060 int mID;
00061 int mMaxTimeZone;
00062 int mLength;
00063 array<int> mCapacity;
00064 set<int> mVessels;
00065 };
00066
00067
00068 #endif