llvm::WritableBinaryStreamRef

A copyable, writable window into a WritableBinaryStream.

Synopsis

Declared in <llvm/Support/BinaryStreamRef.h>

class WritableBinaryStreamRef
    : public BinaryStreamRefBase<WritableBinaryStreamRef, WritableBinaryStream>

Base Classes

NameDescription
BinaryStreamRefBase<WritableBinaryStreamRef, WritableBinaryStream>Common stuff for mutable and immutable StreamRefs.

Member Functions

NameDescription
WritableBinaryStreamRef [constructor]Constructors
operator= Assignment operators
commit For buffered streams, commits changes to the backing store.
drop_back Return a new BinaryStreamRef with the last N elements removed.
drop_front Return a new BinaryStreamRef with the first N elements removed. If this BinaryStreamRef is length-tracking, then the resulting one will be too.
drop_symmetric Return a new BinaryStreamRef with the first and last N elements removed.
getEndian Return the endianness of multi-byte values in the underlying stream.
getLength Return the length in bytes of this stream reference's view.
keep_back Return a new BinaryStreamRef with only the last N elements remaining.
keep_front Return a new BinaryStreamRef with only the first N elements remaining.
slice Return a new BinaryStreamRef with the first Offset elements removed, and retaining exactly Len elements.
valid Return true if this reference refers to a valid underlying stream.
writeBytes Given an Offset into this WritableBinaryStreamRef and some input data, writes the data to the underlying stream.
operator BinaryStreamRef Conver this WritableBinaryStreamRef to a read-only BinaryStreamRef.

Protected Member Functions

NameDescription
operator= Assignment operators
checkOffsetForRead Validate that Offset and DataSize fall within this view for reading.

Protected Data Members

NameDescription
BorrowedImpl Non-owning pointer to the underlying stream implementation.
Length Explicit length of this view, or unset when length-tracking.
SharedImpl Shared ownership of the underlying stream, if any.
ViewOffset Byte offset into the underlying stream where this view begins.

Friends

NameDescription
llvm::BinaryStreamRefBaseCommon stuff for mutable and immutable StreamRefs.

Non-Member Functions

NameDescription
operator==Compare two stream references for equality of impl, offset, and length.