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 // member functions
21 // NOLINTBEGIN
22 MCAPI void AddBitsAndReallocate(uint numberOfBitsToWrite);
23
24 MCAPI BitStream();
25
26 MCAPI explicit BitStream(uint initialBytesToAllocate);
27
28 MCAPI BitStream(uchar* _data, uint lengthInBytes, bool _copyData);
29
30 MCAPI void IgnoreBits(uint numberOfBits);
31
32 MCAPI void IgnoreBytes(uint numberOfBytes);
33
34 MCAPI void PadWithZeroToByteLength(uint bytes);
35
36 MCAPI bool Read(char* outByteArray, uint numberOfBytes);
37
38 MCAPI bool ReadAlignedBytes(uchar* inOutByteArray, uint numberOfBytesToRead);
39
40 MCAPI bool ReadAlignedVar16(char* inOutByteArray);
41
42 MCAPI bool ReadAlignedVar32(char* inOutByteArray);
43
44 MCAPI bool ReadAlignedVar8(char* inOutByteArray);
45
46 MCAPI bool ReadBits(uchar* inOutByteArray, uint numberOfBitsToRead, bool alignBitsToRight);
47
48 MCAPI void Reset();
49
50 MCAPI void ResetReadPointer();
51
52 MCFOLD void ResetWritePointer();
53
54 MCFOLD void SetWriteOffset(uint offset);
55
56 MCAPI void Write(::RakNet::BitStream& bitStream, uint numberOfBits);
57
58 MCAPI void Write(::RakNet::BitStream* bitStream, uint numberOfBits);
59
60 MCAPI void Write(char const* inputByteArray, uint numberOfBytes);
61
62 MCAPI void Write0();
63
64 MCAPI void Write1();
65
66 MCAPI void WriteAlignedBytes(uchar const* inByteArray, uint numberOfBytesToWrite);
67
68 MCAPI void WriteAlignedVar16(char const* inByteArray);
69
70 MCAPI void WriteAlignedVar32(char const* inByteArray);
71
72 MCAPI void WriteAlignedVar8(char const* inByteArray);
73
74 MCAPI void WriteBits(uchar const* inByteArray, uint numberOfBitsToWrite, bool rightAlignedBits);
75
76 MCAPI ~BitStream();
77 // NOLINTEND
78
79public:
80 // static functions
81 // NOLINTBEGIN
82 MCAPI static bool IsNetworkOrderInternal();
83
84 MCAPI static void ReverseBytes(uchar* inByteArray, uchar* inOutByteArray, uint length);
85 // NOLINTEND
86
87public:
88 // constructor thunks
89 // NOLINTBEGIN
90 MCAPI void* $ctor();
91
92 MCAPI void* $ctor(uint initialBytesToAllocate);
93
94 MCAPI void* $ctor(uchar* _data, uint lengthInBytes, bool _copyData);
95 // NOLINTEND
96
97public:
98 // destructor thunk
99 // NOLINTBEGIN
100 MCAPI void $dtor();
101 // NOLINTEND
102};
103
104} // namespace RakNet
Definition BitStream.h:7