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.

Synopsis

Declared in <llvm/Support/BinaryStreamRef.h>

Base Classes

Name

Description

BinaryStreamRefBase<BinaryStreamRef, BinaryStream>

Common stuff for mutable and immutable StreamRefs.

Member Functions

Name

Description

BinaryStreamRef [constructor]

Constructors

operator=

Assignment operators

drop_back

Return a new BinaryStreamRef with the last N elements removed. If this BinaryStreamRef is length‐tracking and N is greater than 0, then this BinaryStreamRef will no longer length‐track.

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

getLength

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.

readBytes

Given an Offset into this StreamRef and a Size, return a reference to a buffer owned by the stream.

readLongestContiguousChunk

Given an Offset into this BinaryStreamRef, return a reference to the largest buffer the stream could support without necessitating a copy.

slice

Return a new BinaryStreamRef with the first Offset elements removed, and retaining exactly Len elements.

valid

Protected Member Functions

Name

Description

operator=

Assignment operators

checkOffsetForRead

Protected Data Members

Friends

Name

Description

llvm::WritableBinaryStreamRef

llvm::BinaryStreamRefBase

Common stuff for mutable and immutable StreamRefs.

Non-Member Functions

Name

Description

operator==

Equality operator

codeview::readCVRecordFromStream

Read a complete record from a stream at a random offset.

Created with MrDocs