00001 #ifndef HDBCONTR_H 00002 #define HDBCONTR_H 00003 #include <stdio.h> 00004 #include "iotools.h" 00005 #include "selection.h" 00006 00007 #ifndef FNAMELEN 00008 #define FNAMELEN 1001 00009 #endif 00010 00011 00012 00013 /** 00014 The class stores the setup of backup for particular 00015 SIFEL modules. 00016 */ 00017 class hdbcontr 00018 { 00019 public: 00020 /// type of backup on harddisk 00021 hdbackuptype hdbtype; 00022 /// format of backup file for restoring 00023 hdbackupfmttype hdbfmtr; 00024 /// format of backup file for saving 00025 hdbackupfmttype hdbfmts; 00026 /// flag for removing old previous backup files (rmold=1 - i.e. only one set of backup file will be hold) 00027 answertype rmold; 00028 /// id of previous backup files 00029 long rmold_id; 00030 /// precision of real numbers in output files 00031 long prec; 00032 /// backup filename for restoring 00033 char hdbnamer[FNAMELEN]; 00034 /// backup filename for saving 00035 char hdbnames[FNAMELEN]; 00036 sel selelemr; 00037 sel selelems; 00038 /// selection of other components for saving 00039 sel *selother_s; 00040 /// selection of other components for restoring 00041 sel *selother_r; 00042 /// array of indices of starting positions for restoring of other array 00043 long **selother_id; 00044 00045 hdbcontr(); 00046 ~hdbcontr(); 00047 00048 /// reads steup from file 00049 void read(XFILE *in); 00050 00051 /// prints setup to file 00052 void print(FILE *out); 00053 00054 /// returns whether restorage is required 00055 long restore_stat(void); 00056 00057 /// returns whether saving is required 00058 long save_stat(void); 00059 }; 00060 00061 #endif