00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
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
00045 void Testing();
00046
00047
00048 string GetSortParam();
00049 Bool GetCompPackWidth();
00050 Bool GetConsiderTrans();
00051 Bool GetOutput();
00052 string GetProblemModel();
00053 string GetAlgoVersion();
00054 string GetPackAlgo();
00055
00056
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
00076 int readBPParamFile(char *aBPParamFile);
00077 int writeTempBPParamFile();
00078 char *getCurrentDate();
00079 char *removeCRLF(char *aString);
00080 };
00081
00082 #endif