8class ReadOnlyBinaryStream {
12 ::std::string mOwnedBuffer;
13 ::std::string_view mView;
18 ReadOnlyBinaryStream(::std::string_view
buffer,
bool copyBuffer)
21 mHasOverflowed(
false) {
23 mOwnedBuffer = std::string(
buffer);
31 virtual ~ReadOnlyBinaryStream();
33 virtual ::Bedrock::Result<void> read(
void* target, uint64 num);
39 MCAPI ::Bedrock::Result<void> ensureReadCompleted()
const;
41 MCAPI ::Bedrock::Result<bool> getBool();
43 MCAPI ::Bedrock::Result<uchar> getByte();
45 MCAPI ::Bedrock::Result<double> getDouble();
47 MCAPI ::Bedrock::Result<float> getFloat();
51 MCAPI ::Bedrock::Result<int> getSignedBigEndianInt();
53 MCAPI ::Bedrock::Result<int> getSignedInt();
55 MCAPI ::Bedrock::Result<int64> getSignedInt64();
57 MCAPI ::Bedrock::Result<short> getSignedShort();
59 MCAPI ::Bedrock::Result<::std::string> getString(uint64 maxLength);
61 MCAPI ::Bedrock::Result<void> getString(::std::string& outStringStream, uint64 maxLength);
63 MCAPI ::Bedrock::Result<uchar> getUnsignedChar();
65 MCAPI ::Bedrock::Result<uint> getUnsignedInt();
67 MCAPI ::Bedrock::Result<uint64> getUnsignedInt64();
69 MCAPI ::Bedrock::Result<ushort> getUnsignedShort();
71 MCAPI ::Bedrock::Result<uint> getUnsignedVarInt();
73 MCAPI ::Bedrock::Result<uint64> getUnsignedVarInt64();
75 MCAPI ::Bedrock::Result<int> getVarInt();
77 MCAPI ::Bedrock::Result<int64> getVarInt64();
83 MCAPI_C
void* $ctor(::std::string_view
buffer,
bool copyBuffer);
95 MCAPI ::Bedrock::Result<void> $read(
void* target, uint64 num);