LeviLamina
Loading...
Searching...
No Matches
ReadOnlyBinaryStream.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/platform/Result.h"
7
9public:
10 // member variables
11 // NOLINTBEGIN
12 ::std::string mOwnedBuffer;
13 ::std::string_view mView;
14 uint64 mReadPointer;
15 bool mHasOverflowed;
16 // NOLINTEND
17
18 ReadOnlyBinaryStream(::std::string_view buffer, bool copyBuffer)
19 : mView(buffer),
20 mReadPointer(0),
21 mHasOverflowed(false) {
22 if (copyBuffer) {
23 mOwnedBuffer = std::string(buffer);
24 mView = mOwnedBuffer;
25 }
26 }
27
28public:
29 // virtual functions
30 // NOLINTBEGIN
31 // vIndex: 0
32 virtual ~ReadOnlyBinaryStream();
33
34 // vIndex: 1
35 virtual ::Bedrock::Result<void> read(void* target, uint64 num);
36 // NOLINTEND
37
38public:
39 // member functions
40 // NOLINTBEGIN
41 MCAPI ::Bedrock::Result<void> ensureReadCompleted() const;
42
43 MCAPI ::Bedrock::Result<bool> getBool();
44
45 MCAPI ::Bedrock::Result<uchar> getByte();
46
47 MCAPI ::Bedrock::Result<double> getDouble();
48
49 MCAPI ::Bedrock::Result<float> getFloat();
50
51 MCAPI ::Bedrock::Result<int> getSignedBigEndianInt();
52
53 MCAPI ::Bedrock::Result<int> getSignedInt();
54
55 MCAPI ::Bedrock::Result<int64> getSignedInt64();
56
57 MCAPI ::Bedrock::Result<short> getSignedShort();
58
59 MCAPI ::Bedrock::Result<::std::string> getString(uint64 maxLength);
60
61 MCAPI ::Bedrock::Result<void> getString(::std::string& outStringStream, uint64 maxLength);
62
63 MCAPI ::Bedrock::Result<uchar> getUnsignedChar();
64
65 MCAPI ::Bedrock::Result<uint> getUnsignedInt();
66
67 MCAPI ::Bedrock::Result<uint64> getUnsignedInt64();
68
69 MCAPI ::Bedrock::Result<ushort> getUnsignedShort();
70
71 MCAPI ::Bedrock::Result<uint> getUnsignedVarInt();
72
73 MCAPI ::Bedrock::Result<uint64> getUnsignedVarInt64();
74
75 MCAPI ::Bedrock::Result<int> getVarInt();
76
77 MCAPI ::Bedrock::Result<int64> getVarInt64();
78 // NOLINTEND
79
80public:
81 // destructor thunk
82 // NOLINTBEGIN
83 MCFOLD void $dtor();
84 // NOLINTEND
85
86public:
87 // virtual function thunks
88 // NOLINTBEGIN
89 MCAPI ::Bedrock::Result<void> $read(void* target, uint64 num);
90 // NOLINTEND
91
92public:
93 // vftables
94 // NOLINTBEGIN
95 MCNAPI static void** $vftable();
96 // NOLINTEND
97};
Definition ReadOnlyBinaryStream.h:8
static MCAPI void ** $vftable()
Definition buffer.h:5