00001 /********************************************************************** 00002 * 00003 * Filename : VesselTransform.h 00004 * Author : Chen Li Wen 00005 * 00006 * Version : 1.0 00007 * Date : 09-27-98 00008 * 00009 * Description : This is the header file for class VesselTransform, 00010 * which change some of the parameters of vessels and 00011 * update BAPPackage. 00012 * 00013 * Reference : nil 00014 * 00015 * Notes : nil 00016 * 00017 * Changes : nil 00018 * 00019 * Copyright : Copyright (c) 1998 00020 * All rights reserved by 00021 * Resource Allocation and Scheduling Group 00022 * Department of Computer Science 00023 * School of Computing 00024 * National University of Singapore 00025 * 00026 **********************************************************************/ 00027 00028 #ifndef __VESSEL_TRANSFORM_H__ 00029 #define __VESSEL_TRANSFORM_H__ 00030 00031 #include <iostream.h> 00032 #include <LEDA/list.h> 00033 #include <LEDA/string.h> 00034 #include "Vessel.h" 00035 00036 class VesselTransform 00037 { 00038 public: 00039 // Class construction. The default way of transformation is 00040 // round up length of each vessel to the nearest power of two, 00041 // then sort vessels by nonincreasing length. 00042 VesselTransform(list<Vessel>& aVesselList, string aMethod = ""); 00043 ~VesselTransform(); 00044 00045 // Debugger facility 00046 void Print(int aWidth = 1, int aDetail = 0) const; 00047 00048 // Method to transform vessels. 00049 // Other methods can be added in. 00050 void Transform(); 00051 00052 private: 00053 void RoundUpPower2(); 00054 00055 list<Vessel>& mVesselList; 00056 string mMethod; 00057 }; 00058 00059 #endif