Usermode/AxWin4 - Code now compiling (if STL is present)
[tpg/acess2.git] / Usermode / Applications / axwin4_src / Server / include / serialisation.hpp
diff --git a/Usermode/Applications/axwin4_src/Server/include/serialisation.hpp b/Usermode/Applications/axwin4_src/Server/include/serialisation.hpp
new file mode 100644 (file)
index 0000000..f0cc600
--- /dev/null
@@ -0,0 +1,41 @@
+/*
+ * Acess2 GUI v4
+ * - By John Hodge (thePowersGang) 
+ *
+ * serialisation.hpp
+ * - Generic (de)serialisation code
+ */
+#ifndef _SERIALISATION_H_
+#define _SERIALISATION_H_
+
+#include <cstdint>
+#include <cstddef>
+#include <exception>
+
+namespace AxWin {
+
+class CDeserialiseException:
+       public ::std::exception
+{
+};
+
+class CDeserialiser
+{
+public:
+       CDeserialiser(size_t Length, const void *Buffer);
+       ::uint8_t       ReadU8();
+       ::uint16_t      ReadU16();
+};
+
+class CSerialiser
+{
+public:
+       CSerialiser();
+       void    WriteU8(::uint8_t val);
+       void    WriteU16(::uint16_t val);
+};
+
+};
+
+#endif
+

UCC git Repository :: git.ucc.asn.au