1
2
3
4
5
6 #ifndef SOULNG_UTIL_MEMORY_READER_INCLUDED
7 #define SOULNG_UTIL_MEMORY_READER_INCLUDED
8 #include <soulng/util/Time.hpp>
9 #include <soulng/util/UtilApi.hpp>
10 #include <stdint.h>
11
12 namespace soulng { namespace util {
13
14 class MemoryReader
15 {
16 public:
17 MemoryReader(uint8_t* ptr_, int64_t count_);
18 uint8_t ReadByte();
19 int8_t ReadSByte();
20 uint16_t ReadUShort();
21 int16_t ReadShort();
22 uint32_t ReadUInt();
23 int32_t ReadInt();
24 uint64_t ReadULong();
25 int64_t ReadLong();
26 DateTime ReadDateTime();
27 private:
28 uint8_t* ptr;
29 uint8_t* pos;
30 int64_t count;
31 };
32
33 } }
34
35 #endif // SOULNG_UTIL_MEMORY_READER_INCLUDED