BAPS/partitioning/TV/BAPTVSection.h

00001 /******************************************************************
00002  *
00003  * Filename    : BAPTVSection.h
00004  * Author      : David Ong Tat-Wee
00005  *
00006  * Version     : 1.01b
00007  * Date        : 10 Jun 98
00008  *
00009  * Description : Implements the TVSection class (?)
00010  *
00011  * Reference   : nil
00012  *
00013  * Notes       : 
00014  *
00015  * Changes     : nil
00016  *
00017  * Copyright   : Copyright (c) 1998
00018  *               All rights reserved by
00019  *               Resource Allocation and Scheduling Group
00020  *               Department of Information Systems and Computer Science
00021  *               National University of Singapore
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

Generated on Tue Sep 9 15:40:10 2008 for BAP by  doxygen 1.5.3