blob: 7f3629f655150492268f614ed5d9b650bec55a41 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
#include "ProcessFile.h"
ProcessFile::ProcessFile() { }
ProcessFile::~ProcessFile() { }
void ProcessFile::process(std::ifstream &file) {
uint32_t grootte = 0;
file.read((char*) &grootte, sizeof(uint32_t));
for (unsigned int i = 0; i < grootte; i++) {
enum GETAL type;
file.read((char*) &type, sizeof(enum GETAL));
switch(type) {
case LONG: {
read_and_print<int32_t>(file);
break;
}
case SHORT: {
read_and_print<int16_t>(file);
break;
}
case DOUBLE: {
read_and_print<double>(file);
break;
}
case FLOAT: {
read_and_print<float >(file);
break;
}
default: {
break;
}
}
}
}
|