ECF
1.5
D:
Projekt
ECF_trunk
examples
iprojekt
readpar.h
1
/* Razred za citanje parametara iz tekst datoteke */
2
/* Class for reading parameters from a text file */
3
/* last update 14.02.01. */
4
5
#include<stdio.h>
6
7
//#define STRING 0
8
//#define INTEGER 1
9
//#define DOUBLE 2
10
#define TAB 9
11
#define SPACE 32
12
#define NEWLINE '\n'
13
14
const
int
MAX_LINE = 10000;
15
16
class
ReadPar
17
{
public
:
18
static
const
int
STRING = 0;
19
static
const
int
INTEGER = 1;
20
static
const
int
DOUBLE = 2;
21
ReadPar
(
void
);
22
~ReadPar
(
void
);
23
24
int
OpenFile(
const
char
*fname);
25
int
CloseFile(
void
);
26
int
ReadParameter(
const
char
*par,
int
type
,
void
*val,
int
vector=1,
int
item=1);
27
// type: 0 - string, 1 - integer, 2 - double
28
// vector: 1-... number of elements
29
30
private
:
31
FILE *fp;
32
char
buf[MAX_LINE];
33
};
34
ReadPar
Definition:
readpar.h:17
ECF::type
type
Data types used for configuration file parameters.
Definition:
Registry.h:16
Generated on Wed Aug 3 2022 17:50:42 for ECF by
1.9.4