|
| BinaryStreamRef ()=default |
|
| BinaryStreamRef (BinaryStream &Stream) |
|
| BinaryStreamRef (BinaryStream &Stream, uint64_t Offset, std::optional< uint64_t > Length) |
|
| BinaryStreamRef (ArrayRef< uint8_t > Data, llvm::endianness Endian) |
|
| BinaryStreamRef (StringRef Data, llvm::endianness Endian) |
|
| BinaryStreamRef (const BinaryStreamRef &Other)=default |
|
BinaryStreamRef & | operator= (const BinaryStreamRef &Other)=default |
|
| BinaryStreamRef (BinaryStreamRef &&Other)=default |
|
BinaryStreamRef & | operator= (BinaryStreamRef &&Other)=default |
|
| BinaryStreamRef (BinaryStreamRef &S, uint64_t Offset, uint64_t Length)=delete |
|
Error | readBytes (uint64_t Offset, uint64_t Size, ArrayRef< uint8_t > &Buffer) const |
| Given an Offset into this StreamRef and a Size, return a reference to a buffer owned by the stream.
|
|
Error | readLongestContiguousChunk (uint64_t Offset, ArrayRef< uint8_t > &Buffer) const |
| Given an Offset into this BinaryStreamRef, return a reference to the largest buffer the stream could support without necessitating a copy.
|
|
llvm::endianness | getEndian () const |
|
uint64_t | getLength () const |
|
BinaryStreamRef | drop_front (uint64_t N) const |
| Return a new BinaryStreamRef with the first N elements removed.
|
|
BinaryStreamRef | drop_back (uint64_t N) const |
| Return a new BinaryStreamRef with the last N elements removed.
|
|
BinaryStreamRef | keep_front (uint64_t N) const |
| Return a new BinaryStreamRef with only the first N elements remaining.
|
|
BinaryStreamRef | keep_back (uint64_t N) const |
| Return a new BinaryStreamRef with only the last N elements remaining.
|
|
BinaryStreamRef | drop_symmetric (uint64_t N) const |
| Return a new BinaryStreamRef with the first and last N elements removed.
|
|
BinaryStreamRef | slice (uint64_t Offset, uint64_t Len) const |
| Return a new BinaryStreamRef with the first Offset elements removed, and retaining exactly Len elements.
|
|
bool | valid () const |
|
BinaryStreamRef is to BinaryStream what ArrayRef is to an Array.
It provides copy-semantics and read only access to a "window" of the underlying BinaryStream. Note that BinaryStreamRef is not a BinaryStream. That is to say, it does not inherit and override the methods of BinaryStream. In general, you should not pass around pointers or references to BinaryStreams and use inheritance to achieve polymorphism. Instead, you should pass around BinaryStreamRefs by value and achieve polymorphism that way.
Definition at line 153 of file BinaryStreamRef.h.