BAPS/packing/BP/BPParamMgr.h

00001 /*************************************************************************
00002  *
00003  * Filename    : BPParamMgr.h
00004  * Author      : Chen Li Wen
00005  *
00006  * Version     : 1.03
00007  * Date        : July 15, 1998
00008  *
00009  * Description : Interface file for class BPParamMgr to manage the Bin-
00010  *               Packing parameter file.
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 _BP_PARAM_MGR_
00027 #define _BP_PARAM_MGR_
00028 
00029 #include <stdio.h>
00030 #include <fstream.h>
00031 
00032 #include "PackDef.h"
00033 #include "DataMgrDef.h"
00034 
00035 #include <LEDA/string.h>
00036 
00037 class BPParamMgr
00038 {
00039    public:
00040       BPParamMgr(string aBPParamFile);
00041       BPParamMgr();
00042       ~BPParamMgr();
00043    
00044       // Debugger facility
00045       void     Testing();
00046 
00047       // Data access methods
00048       string   GetSortParam();
00049       Bool     GetCompPackWidth();
00050       Bool     GetConsiderTrans();
00051       Bool     GetOutput();
00052       string   GetProblemModel();
00053       string   GetAlgoVersion();
00054       string   GetPackAlgo();
00055    
00056       // File related methods
00057       void     Update();
00058       int      Save();
00059       int      SaveAs(char *aBPParamFile);
00060       
00061    private:
00062       char     ConfigFileName[255];
00063       char     TmpFileName[255];
00064       char     BPParamFileName[255];
00065       FILE     *BPParamFile;
00066       ofstream TempBPParamFile;
00067       Bool     CompPackWidth;
00068       Bool     ConsiderTrans;
00069       Bool     Output;
00070       char     ProblemModel[10];
00071       char     AlgoVersion[10];
00072       char     PackAlgo[10];
00073       char     SortParam[50];
00074 
00075       // Methods
00076       int     readBPParamFile(char *aBPParamFile);
00077       int     writeTempBPParamFile();
00078       char    *getCurrentDate();
00079       char    *removeCRLF(char *aString);
00080 };
00081 
00082 #endif

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