class BinaryStreamRefBase

Declaration

template <class RefType, class StreamType>
class BinaryStreamRefBase { /* full declaration omitted */ };

Description

Common stuff for mutable and immutable StreamRefs.

Declared at: llvm/include/llvm/Support/BinaryStreamRef.h:24

Templates

RefType
StreamType

Member Variables

protected std::shared_ptr<StreamType> SharedImpl
protected StreamType* BorrowedImpl = nullptr
protected uint32_t ViewOffset = 0
protected Optional<uint32_t> Length

Method Overview

Methods

BinaryStreamRefBase<RefType, StreamType>()

Declared at: llvm/include/llvm/Support/BinaryStreamRef.h:26

BinaryStreamRefBase<RefType, StreamType>(
    StreamType& BorrowedImpl)

Declared at: llvm/include/llvm/Support/BinaryStreamRef.h:27

Parameters

StreamType& BorrowedImpl

BinaryStreamRefBase<RefType, StreamType>(
    std::shared_ptr<StreamType> SharedImpl,
    uint32_t Offset,
    Optional<uint32_t> Length)

Declared at: llvm/include/llvm/Support/BinaryStreamRef.h:33

Parameters

std::shared_ptr<StreamType> SharedImpl
uint32_t Offset
Optional<uint32_t> Length

BinaryStreamRefBase<RefType, StreamType>(
    StreamType& BorrowedImpl,
    uint32_t Offset,
    Optional<uint32_t> Length)

Declared at: llvm/include/llvm/Support/BinaryStreamRef.h:37

Parameters

StreamType& BorrowedImpl
uint32_t Offset
Optional<uint32_t> Length

BinaryStreamRefBase<RefType, StreamType>(
    const BinaryStreamRefBase<RefType,
                              StreamType>& Other)

Declared at: llvm/include/llvm/Support/BinaryStreamRef.h:40

Parameters

const BinaryStreamRefBase<RefType, StreamType>& Other

BinaryStreamRefBase<RefType, StreamType>(
    BinaryStreamRefBase<RefType, StreamType>&&
        Other)

Declared at: llvm/include/llvm/Support/BinaryStreamRef.h:44

Parameters

BinaryStreamRefBase<RefType, StreamType>&& Other

llvm::Error checkOffsetForRead(
    uint32_t Offset,
    uint32_t DataSize) const

Declared at: llvm/include/llvm/Support/BinaryStreamRef.h:135

Parameters

uint32_t Offset
uint32_t DataSize

RefType drop_back(uint32_t N) const

Description

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

Declared at: llvm/include/llvm/Support/BinaryStreamRef.h:79

Parameters

uint32_t N

RefType drop_front(uint32_t N) const

Description

Return a new BinaryStreamRef with the first \p N elements removed. If this BinaryStreamRef is length-tracking, then the resulting one will be too.

Declared at: llvm/include/llvm/Support/BinaryStreamRef.h:61

Parameters

uint32_t N

RefType drop_symmetric(uint32_t N) const

Description

Return a new BinaryStreamRef with the first and last \p N elements removed.

Declared at: llvm/include/llvm/Support/BinaryStreamRef.h:112

Parameters

uint32_t N

llvm::support::endianness getEndian() const

Declared at: llvm/include/llvm/Support/BinaryStreamRef.h:47

uint32_t getLength() const

Declared at: llvm/include/llvm/Support/BinaryStreamRef.h:51

RefType keep_back(uint32_t N) const

Description

Return a new BinaryStreamRef with only the last \p N elements remaining.

Declared at: llvm/include/llvm/Support/BinaryStreamRef.h:105

Parameters

uint32_t N

RefType keep_front(uint32_t N) const

Description

Return a new BinaryStreamRef with only the first \p N elements remaining.

Declared at: llvm/include/llvm/Support/BinaryStreamRef.h:99

Parameters

uint32_t N

RefType slice(uint32_t Offset, uint32_t Len) const

Description

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

Declared at: llvm/include/llvm/Support/BinaryStreamRef.h:118

Parameters

uint32_t Offset
uint32_t Len

bool valid() const

Declared at: llvm/include/llvm/Support/BinaryStreamRef.h:122