LLVM: llvm::BinaryByteStream Class Reference (original) (raw)

An implementation of BinaryStream which holds its entire data set in a single contiguous buffer. More...

#include "[llvm/Support/BinaryByteStream.h](BinaryByteStream%5F8h%5Fsource.html)"

Public Member Functions
BinaryByteStream ()=default
BinaryByteStream (ArrayRef< uint8_t > Data, llvm::endianness Endian)
BinaryByteStream (StringRef Data, llvm::endianness Endian)
llvm::endianness getEndian () const override
Error readBytes (uint64_t Offset, uint64_t Size, ArrayRef< uint8_t > &Buffer) override
Given an offset into the stream and a number of bytes, attempt to read the bytes and set the output ArrayRef to point to data owned by the stream.
Error readLongestContiguousChunk (uint64_t Offset, ArrayRef< uint8_t > &Buffer) override
Given an offset into the stream, read as much as possible without copying any data.
uint64_t getLength () override
Return the number of bytes of data in this stream.
ArrayRef< uint8_t > data () const
StringRef str () const
- Public Member Functions inherited from llvm::BinaryStream
virtual ~BinaryStream ()=default
virtual llvm::endianness getEndian () const =0
virtual Error readBytes (uint64_t Offset, uint64_t Size, ArrayRef< uint8_t > &Buffer)=0
Given an offset into the stream and a number of bytes, attempt to read the bytes and set the output ArrayRef to point to data owned by the stream.
virtual Error readLongestContiguousChunk (uint64_t Offset, ArrayRef< uint8_t > &Buffer)=0
Given an offset into the stream, read as much as possible without copying any data.
virtual uint64_t getLength ()=0
Return the number of bytes of data in this stream.
virtual BinaryStreamFlags getFlags () const
Return the properties of this stream.

An implementation of BinaryStream which holds its entire data set in a single contiguous buffer.

BinaryByteStream guarantees that no read operation will ever incur a copy. Note that BinaryByteStream does not own the underlying buffer.

Definition at line 30 of file BinaryByteStream.h.

llvm::BinaryByteStream::BinaryByteStream ( ) default

BinaryByteStream() [2/3]

BinaryByteStream() [3/3]

data()

getEndian()

llvm::endianness llvm::BinaryByteStream::getEndian ( ) const inlineoverridevirtual

getLength()

uint64_t llvm::BinaryByteStream::getLength ( ) inlineoverridevirtual

readBytes()

readLongestContiguousChunk()

str()

StringRef llvm::BinaryByteStream::str ( ) const inline

Data

Endian


The documentation for this class was generated from the following file: