Usermode/libc++ - system_error and vector implementation
[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 #include <string>
15
16 namespace AxWin {
17
18 class CDeserialiseException:
19         public ::std::exception
20 {
21 };
22
23 class CDeserialiser
24 {
25 public:
26         CDeserialiser(size_t Length, const void *Buffer);
27         ::uint8_t       ReadU8();
28         ::uint16_t      ReadU16();
29         ::int16_t       ReadS16();
30         ::std::string   ReadString();
31 };
32
33 class CSerialiser
34 {
35 public:
36         CSerialiser();
37         void    WriteU8(::uint8_t val);
38         void    WriteU16(::uint16_t val);
39 };
40
41 };
42
43 #endif
44

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