00001
00002
00003
00004
00005 #include<stdio.h>
00006
00007
00008
00009
00010 #define TAB 9
00011 #define SPACE 32
00012 #define NEWLINE '\n'
00013
00014 const int MAX_LINE = 10000;
00015
00016 class ReadPar
00017 { public:
00018 static const int STRING = 0;
00019 static const int INTEGER = 1;
00020 static const int DOUBLE = 2;
00021 ReadPar(void);
00022 ~ReadPar(void);
00023
00024 int OpenFile(const char *fname);
00025 int CloseFile(void);
00026 int ReadParameter(const char *par, int type, void *val, int vector=1, int item=1);
00027
00028
00029
00030 private:
00031 FILE *fp;
00032 char buf[MAX_LINE];
00033 };
00034