From de1aa6d66e11232edf2d7bbc729425003f6c3db5 Mon Sep 17 00:00:00 2001 From: David Date: Sat, 13 May 2006 00:08:20 +0000 Subject: david - initial commit of serialize code ;p --- src/serializerbinary.h | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 src/serializerbinary.h (limited to 'src/serializerbinary.h') 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 @@ +#ifndef SERIALIZER_BINARY_H +#define SERIALIZER_BINARY_H + +#include "serializer.h" +#include + +class SerializerBinary : public Serializer +{ +public: + SerializerBinary(FILE *fhFile, bool bLoading); + SerializerBinary(char *sFileName, bool bLoading); + ~SerializerBinary(); + + virtual void close(); + + virtual Serializer &operator<<(bool); + virtual Serializer &operator<<(int8_t); + virtual Serializer &operator<<(int16_t); + virtual Serializer &operator<<(int32_t); + virtual Serializer &operator<<(int64_t); + virtual Serializer &operator<<(uint8_t); + virtual Serializer &operator<<(uint16_t); + virtual Serializer &operator<<(uint32_t); + virtual Serializer &operator<<(uint64_t); + virtual Serializer &operator<<(float); + virtual Serializer &operator<<(double); + virtual Serializer &operator<<(long double); + + virtual Serializer &operator>>(bool &); + virtual Serializer &operator>>(int8_t &); + virtual Serializer &operator>>(int16_t &); + virtual Serializer &operator>>(int32_t &); + virtual Serializer &operator>>(int64_t &); + virtual Serializer &operator>>(uint8_t &); + virtual Serializer &operator>>(uint16_t &); + virtual Serializer &operator>>(uint32_t &); + virtual Serializer &operator>>(uint64_t &); + virtual Serializer &operator>>(float &); + virtual Serializer &operator>>(double &); + virtual Serializer &operator>>(long double &); +private: + FILE *fhFile; + bool bCloseFile; +}; + +#endif -- cgit v1.2.3