16#ifndef LIEF_MEMORY_STREAM_H
17#define LIEF_MEMORY_STREAM_H
47 return this->baseaddr_;
50 const uint8_t*
p()
const override {
54 const uint8_t*
start()
const override {
55 return reinterpret_cast<const uint8_t*
>(baseaddr_);
58 const uint8_t*
end()
const override {
59 return start() + size_;
70 uint64_t
size()
const override {
82 uintptr_t baseaddr_ = 0;
Class that is used to a read stream of data from different sources.
Definition BinaryStream.hpp:34
STREAM_TYPE
Definition BinaryStream.hpp:38
virtual const uint8_t * p() const
Definition BinaryStream.hpp:199
size_t pos() const
Definition BinaryStream.hpp:125
virtual uint8_t * start()
Definition BinaryStream.hpp:203
STREAM_TYPE type() const
Definition BinaryStream.hpp:54
virtual uint8_t * end()
Definition BinaryStream.hpp:211
Abstract binary that exposes an uniform API for the different executable file formats.
Definition Abstract/Binary.hpp:41
Definition MemoryStream.hpp:26
const uint8_t * end() const override
Definition MemoryStream.hpp:58
MemoryStream(uintptr_t base_address)
static bool classof(const BinaryStream &stream)
Definition MemoryStream.hpp:76
MemoryStream(const MemoryStream &)=delete
Binary * binary()
Definition MemoryStream.hpp:66
MemoryStream & operator=(const MemoryStream &)=delete
void binary(Binary &bin)
Definition MemoryStream.hpp:62
uint64_t size() const override
Definition MemoryStream.hpp:70
~MemoryStream() override=default
MemoryStream(MemoryStream &&) noexcept=default
const uint8_t * start() const override
Definition MemoryStream.hpp:54
uintptr_t base_address() const
Definition MemoryStream.hpp:46
const uint8_t * p() const override
Definition MemoryStream.hpp:50
MemoryStream(uintptr_t base_address, uint64_t size)
Definition MemoryStream.hpp:34
LIEF namespace.
Definition Abstract/Binary.hpp:32
tl::expected< T, lief_errors > result
Wrapper that contains an Object (T) or an error.
Definition errors.hpp:74