Usermode/AxWin4 - Code now compiling (if STL is present)
[tpg/acess2.git] / Usermode / Applications / axwin4_src / Server / include / serialisation.hpp
1 /*
2  * Acess2 GUI v4
3  * - By John Hodge (thePowersGang) 
4  *
5  * serialisation.hpp
6  * - Generic (de)serialisation code
7  */
8 #ifndef _SERIALISATION_H_
9 #define _SERIALISATION_H_
10
11 #include <cstdint>
12 #include <cstddef>
13 #include <exception>
14
15 namespace AxWin {
16
17 class CDeserialiseException:
18         public ::std::exception
19 {
20 };
21
22 class CDeserialiser
23 {
24 public:
25         CDeserialiser(size_t Length, const void *Buffer);
26         ::uint8_t       ReadU8();
27         ::uint16_t      ReadU16();
28 };
29
30 class CSerialiser
31 {
32 public:
33         CSerialiser();
34         void    WriteU8(::uint8_t val);
35         void    WriteU16(::uint16_t val);
36 };
37
38 };
39
40 #endif
41

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