aboutsummaryrefslogtreecommitdiff
path: root/src/serializerbinary.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/serializerbinary.h46
1 files changed, 46 insertions, 0 deletions
diff --git a/src/serializerbinary.h b/src/serializerbinary.h
new file mode 100644
index 0000000..4a2f301
--- /dev/null
+++ b/src/serializerbinary.h
@@ -0,0 +1,46 @@
1#ifndef SERIALIZER_BINARY_H
2#define SERIALIZER_BINARY_H
3
4#include "serializer.h"
5#include <stdio.h>
6
7class SerializerBinary : public Serializer
8{
9public:
10 SerializerBinary(FILE *fhFile, bool bLoading);
11 SerializerBinary(char *sFileName, bool bLoading);
12 ~SerializerBinary();
13
14 virtual void close();
15
16 virtual Serializer &operator<<(bool);
17 virtual Serializer &operator<<(int8_t);
18 virtual Serializer &operator<<(int16_t);
19 virtual Serializer &operator<<(int32_t);
20 virtual Serializer &operator<<(int64_t);
21 virtual Serializer &operator<<(uint8_t);
22 virtual Serializer &operator<<(uint16_t);
23 virtual Serializer &operator<<(uint32_t);
24 virtual Serializer &operator<<(uint64_t);
25 virtual Serializer &operator<<(float);
26 virtual Serializer &operator<<(double);
27 virtual Serializer &operator<<(long double);
28
29 virtual Serializer &operator>>(bool &);
30 virtual Serializer &operator>>(int8_t &);
31 virtual Serializer &operator>>(int16_t &);
32 virtual Serializer &operator>>(int32_t &);
33 virtual Serializer &operator>>(int64_t &);
34 virtual Serializer &operator>>(uint8_t &);
35 virtual Serializer &operator>>(uint16_t &);
36 virtual Serializer &operator>>(uint32_t &);
37 virtual Serializer &operator>>(uint64_t &);
38 virtual Serializer &operator>>(float &);
39 virtual Serializer &operator>>(double &);
40 virtual Serializer &operator>>(long double &);
41private:
42 FILE *fhFile;
43 bool bCloseFile;
44};
45
46#endif