aboutsummaryrefslogtreecommitdiff
path: root/src/serializerbinary.h
diff options
context:
space:
mode:
authorDavid <david@xagasoft.com>2006-05-13 00:08:20 +0000
committerDavid <david@xagasoft.com>2006-05-13 00:08:20 +0000
commitde1aa6d66e11232edf2d7bbc729425003f6c3db5 (patch)
tree443216dc0fb9ac2bc66539332286b7b3167940b2 /src/serializerbinary.h
parent59cea3a2c49618ec7351028334d468a9204f4027 (diff)
downloadlibbu++-de1aa6d66e11232edf2d7bbc729425003f6c3db5.tar.gz
libbu++-de1aa6d66e11232edf2d7bbc729425003f6c3db5.tar.bz2
libbu++-de1aa6d66e11232edf2d7bbc729425003f6c3db5.tar.xz
libbu++-de1aa6d66e11232edf2d7bbc729425003f6c3db5.zip
david - initial commit of serialize code ;p
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