BAPS/packing/BP/FreeBlock.h

00001 /**********************************************************************
00002  *
00003  * Filename    : FreeBlock.h
00004  * Author      : Chen Li Wen
00005  *
00006  * Version     : 1.0a
00007  * Date        : June 14, 1998
00008  *
00009  * Description : Interface file for class FreeBlock. It's the rectangle 
00010  *               space which is free to pack vessels. 
00011  *
00012  * Reference   : nil
00013  *
00014  * Notes       : nil
00015  *
00016  * Changes     : nil
00017  *
00018  * Copyright   : Copyright (c) 1998
00019  *               All rights reserved by
00020  *               Resource Allocation and Scheduling Group
00021  *               Department of Information Systems and Computer Science
00022  *               National University of Singapore
00023  *
00024  **********************************************************************/
00025 
00026 #ifndef __FREEBLOCK_H__
00027 #define __FREEBLOCK_H__
00028 
00029 #include "BAPBase.h"
00030 #include "Vessel.h"
00031 #include "PackDef.h"
00032 
00033 class FreeBlock : public BAPBase
00034 {
00035    public:
00036       FreeBlock();
00037       FreeBlock(int aBeginPosition, int aSize);
00038       FreeBlock(const FreeBlock& aFreeBlock);
00039       ~FreeBlock();
00040 
00041       // Debugger facility
00042       void       Print(int aWidth = 1, int aDetail = 0) const;
00043       
00044       // Assignment operator =
00045       FreeBlock& operator=(const FreeBlock& aFreeBlock);
00046       
00047       // Modification functions
00048       void       SetBeginPosition(int aBeginPosition);
00049       void       SetEndPosition(int aEndPosition);
00050       void       SetSize(int aSize);
00051       
00052       // Access functions
00053       int        GetBeginPosition() const;
00054       int        GetEndPosition() const;
00055       int        GetSize() const;
00056       
00057       friend int      compare(const FreeBlock& Lhs, const FreeBlock& Rhs);
00058       friend ostream& operator<<(ostream& aOutput, const FreeBlock& aFBlock);
00059       friend istream& operator>>(istream& aInput, FreeBlock& aFBlock);
00060 
00061    private:
00062       int        mBeginPosition;
00063       int        mEndPosition;
00064       int        mSize;
00065 };
00066 
00067 #endif

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