diff options
author | David <david@xagasoft.com> | 2006-05-13 00:08:20 +0000 |
---|---|---|
committer | David <david@xagasoft.com> | 2006-05-13 00:08:20 +0000 |
commit | de1aa6d66e11232edf2d7bbc729425003f6c3db5 (patch) | |
tree | 443216dc0fb9ac2bc66539332286b7b3167940b2 /src/serializer.h | |
parent | 59cea3a2c49618ec7351028334d468a9204f4027 (diff) | |
download | libbu++-de1aa6d66e11232edf2d7bbc729425003f6c3db5.tar.gz libbu++-de1aa6d66e11232edf2d7bbc729425003f6c3db5.tar.bz2 libbu++-de1aa6d66e11232edf2d7bbc729425003f6c3db5.tar.xz libbu++-de1aa6d66e11232edf2d7bbc729425003f6c3db5.zip |
david - initial commit of serialize code ;p
Diffstat (limited to 'src/serializer.h')
-rw-r--r-- | src/serializer.h | 64 |
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 | |||
7 | class Serializer | ||
8 | { | ||
9 | private: | ||
10 | bool bLoading; | ||
11 | public: | ||
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 | ||