LeviLamina
Loading...
Searching...
No Matches
ByteQueue.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5namespace DataStructures {
6
7class ByteQueue {
8public:
9 // member variables
10 // NOLINTBEGIN
11 ::ll::TypedStorage<8, 8, char*> data;
12 ::ll::TypedStorage<4, 4, uint> readOffset;
13 ::ll::TypedStorage<4, 4, uint> writeOffset;
14 ::ll::TypedStorage<4, 4, uint> lengthAllocated;
15 // NOLINTEND
16
17public:
18 // member functions
19 // NOLINTBEGIN
20 MCAPI ByteQueue();
21
22 MCAPI void Clear(char const* file, uint line);
23
24 MCAPI uint GetBytesWritten() const;
25
26 MCAPI void IncrementReadOffset(uint length);
27
28 MCAPI char* PeekContiguousBytes(uint* outLength) const;
29
30 MCAPI bool ReadBytes(char* out, uint maxLengthToRead, bool peek);
31
32 MCAPI void WriteBytes(char const* in, uint length, char const* file, uint line);
33
34 MCAPI ~ByteQueue();
35 // NOLINTEND
36
37public:
38 // constructor thunks
39 // NOLINTBEGIN
40 MCFOLD void* $ctor();
41 // NOLINTEND
42
43public:
44 // destructor thunk
45 // NOLINTBEGIN
46 MCAPI void $dtor();
47 // NOLINTEND
48};
49
50} // namespace DataStructures