BAPS/packing/BP/EventList.h

00001 /**********************************************************************
00002  *
00003  * Filename    : EventList.h
00004  * Author      : Chen Li Wen
00005  *
00006  * Version     : 1.03
00007  * Date        : July 15, 1998
00008  *
00009  * Description : Interface file for class EventList. EventList is a 
00010  *               set of Events which sorted by compare function defined
00011  *               for Event class. 
00012  *
00013  *               Now, we implement it as a linked list of Events.
00014  *
00015  * Reference   : nil
00016  *
00017  * Notes       : nil
00018  *
00019  * Changes     : nil
00020  *
00021  * Copyright   : Copyright (c) 1998
00022  *               All rights reserved by
00023  *               Resource Allocation and Scheduling Group
00024  *               Department of Information Systems and Computer Science
00025  *               National University of Singapore
00026  *
00027  **********************************************************************/
00028 
00029 #ifndef __EVENTLIST_H__
00030 #define __EVENTLIST_H__
00031 
00032 #include "Event.h"
00033 #include "Vessel.h"
00034 #include "BAPBase.h"
00035 
00036 #include <LEDA/list.h>
00037 
00038 class EventList : public BAPBase
00039 {
00040    public:
00041       EventList();
00042       ~EventList();
00043 
00044       void        Print(int aWidth = 1, int aDetail = 0) const;
00045 
00046       int         GetLength() const;
00047       Event       GetEvent(int aIndex) const;
00048       void        Build(list<Vessel> aVesselList);
00049 
00050    private:
00051       // Private functions for building EventList
00052       void        InsertEvent(Event aEvent);
00053       void        Sort();
00054       
00055       // Length of EventList
00056       int         mLength;
00057       list<Event> mEventList;
00058 };
00059 
00060 #endif

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