LeviLamina
Loading...
Searching...
No Matches
BitStream.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5namespace RakNet {
6
7class BitStream {
8public:
9 // member variables
10 // NOLINTBEGIN
11 ::ll::TypedStorage<4, 4, uint> numberOfBitsUsed;
12 ::ll::TypedStorage<4, 4, uint> numberOfBitsAllocated;
13 ::ll::TypedStorage<4, 4, uint> readOffset;
14 ::ll::TypedStorage<8, 8, uchar*> data;
15 ::ll::TypedStorage<1, 1, bool> copyData;
16 ::ll::TypedStorage<1, 256, uchar[256]> stackData;
17 // NOLINTEND
18
19public:
20 // prevent constructor by default
21 BitStream();
22
23public:
24 // member functions
25 // NOLINTBEGIN
26 MCAPI void AddBitsAndReallocate(uint numberOfBitsToWrite);
27
28 MCAPI BitStream(uchar* _data, uint lengthInBytes, bool _copyData);
29
30 MCAPI bool Read(char* outByteArray, uint numberOfBytes);
31
32 MCAPI bool ReadAlignedBytes(uchar* inOutByteArray, uint numberOfBytesToRead);
33
34 MCAPI bool ReadAlignedVar16(char* inOutByteArray);
35
36 MCAPI bool ReadAlignedVar32(char* inOutByteArray);
37
38 MCAPI bool ReadBits(uchar* inOutByteArray, uint numberOfBitsToRead, bool alignBitsToRight);
39
40 MCAPI void Write(::RakNet::BitStream* bitStream, uint numberOfBits);
41
42 MCAPI void Write(char const* inputByteArray, uint numberOfBytes);
43
44 MCAPI void Write0();
45
46 MCAPI void Write1();
47
48 MCAPI void WriteAlignedBytes(uchar const* inByteArray, uint numberOfBytesToWrite);
49
50 MCAPI void WriteAlignedVar16(char const* inByteArray);
51
52 MCAPI void WriteAlignedVar32(char const* inByteArray);
53
54 MCAPI void WriteBits(uchar const* inByteArray, uint numberOfBitsToWrite, bool rightAlignedBits);
55
56 MCAPI ~BitStream();
57 // NOLINTEND
58
59public:
60 // constructor thunks
61 // NOLINTBEGIN
62 MCAPI void* $ctor(uchar* _data, uint lengthInBytes, bool _copyData);
63 // NOLINTEND
64
65public:
66 // destructor thunk
67 // NOLINTBEGIN
68 MCAPI void $dtor();
69 // NOLINTEND
70};
71
72} // namespace RakNet
Definition BitStream.h:7