aboutsummaryrefslogtreecommitdiff
path: root/src/serializer.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/serializer.h64
1 files changed, 64 insertions, 0 deletions
diff --git a/src/serializer.h b/src/serializer.h
new file mode 100644
index 0000000..03e6820
--- /dev/null
+++ b/src/serializer.h
@@ -0,0 +1,64 @@
1#ifndef SERIALIZABLE_H
2#define SERIALIZABLE_H
3
4#include <stdint.h>
5//#include "serializable.h"
6
7class Serializer
8{
9private:
10 bool bLoading;
11public:
12 bool isLoading();
13
14 Serializer(bool bLoading);
15 virtual ~Serializer();
16 virtual void close()=0;
17
18 virtual Serializer &operator<<(bool)=0;
19 virtual Serializer &operator<<(int8_t)=0;
20 virtual Serializer &operator<<(int16_t)=0;
21 virtual Serializer &operator<<(int32_t)=0;
22 virtual Serializer &operator<<(int64_t)=0;
23 virtual Serializer &operator<<(uint8_t)=0;
24 virtual Serializer &operator<<(uint16_t)=0;
25 virtual Serializer &operator<<(uint32_t)=0;
26 virtual Serializer &operator<<(uint64_t)=0;
27 virtual Serializer &operator<<(float)=0;
28 virtual Serializer &operator<<(double)=0;
29 virtual Serializer &operator<<(long double)=0;
30
31 virtual Serializer &operator>>(bool &)=0;
32 virtual Serializer &operator>>(int8_t &)=0;
33 virtual Serializer &operator>>(int16_t &)=0;
34 virtual Serializer &operator>>(int32_t &)=0;
35 virtual Serializer &operator>>(int64_t &)=0;
36 virtual Serializer &operator>>(uint8_t &)=0;
37 virtual Serializer &operator>>(uint16_t &)=0;
38 virtual Serializer &operator>>(uint32_t &)=0;
39 virtual Serializer &operator>>(uint64_t &)=0;
40 virtual Serializer &operator>>(float &)=0;
41 virtual Serializer &operator>>(double &)=0;
42 virtual Serializer &operator>>(long double &)=0;
43
44 /*
45 virtual Serializer &operator&(bool &);
46 virtual Serializer &operator&(int8_t &);
47 virtual Serializer &operator&(int16_t &);
48 virtual Serializer &operator&(int32_t &);
49 virtual Serializer &operator&(int64_t &);
50 virtual Serializer &operator&(uint8_t &);
51 virtual Serializer &operator&(uint16_t &);
52 virtual Serializer &operator&(uint32_t &);
53 virtual Serializer &operator&(uint64_t &);
54 virtual Serializer &operator&(float &);
55 virtual Serializer &operator&(double &);
56 virtual Serializer &operator&(long double &);
57 */
58
59 virtual Serializer &operator<<(class Serializable &);
60 virtual Serializer &operator>>(class Serializable &);
61 //virtual Serializer &operator&(Serializable &);
62};
63
64#endif