template <typename T = std::byte, class View = std::span<const T>>
class Buffer
Defined at line 61 of file ../../src/lib/zxdump/include/lib/zxdump/buffer.h
zxdump::Buffer
<T
> provides a view over a chunk of memory returned by
zxdump::Process::read_memory.
This is a move-only object that "owns" the storage viewed, but it's also
tied to the lifetime of the zxdump::TaskHolder object that owns the
zxdump::Process object. The data pointers from this object cannot be used
after either the zxdump::Buffer object or the associated zxdump::TaskHolder
object has been destroyed.
zxdump::Buffer
<T
> acts like a smart-pointer type to std::span
<const
T> (or
a similar type) in that it has get() and the * and -> operators to access
that object's standard methods. Unlike other smart-pointer types, a
zxdump::Buffer has no nullptr-like state (except when default-constructed)
and is not contextually convertible to bool. A default-constructed
zxdump::Buffer can be assigned to, but not otherwise used.
All the memory-reading operations that return a zxdump::Buffer return a
result type that never reflects success with a default-constructed
zxdump::Buffer object. However, they can return an object whose value
(View) is in its empty, default-constructed state. This indicates that the
process memory was valid to access, but was elided (wholly or partially)
from the dump. In this case, reading a shorter region might succeed if the
containing segment was truncated rather than elided entirely.
Note that all memory will appear to have been elided if the dump was read in
by a zxdump::TaskHolder::Insert with read_memory=false.
Public Methods
void Buffer<T, View> ()
Defined at line 63 of file ../../src/lib/zxdump/include/lib/zxdump/buffer.h
void Buffer<T, View> (const Buffer<T, View> & )
Defined at line 65 of file ../../src/lib/zxdump/include/lib/zxdump/buffer.h
void Buffer<T, View> (Buffer<T, View> && other)
Defined at line 67 of file ../../src/lib/zxdump/include/lib/zxdump/buffer.h
template <typename OtherT, class OtherView>
void Buffer<T, View> (Buffer<OtherT, OtherView> && other)
Converting move construction is allowed if the pointers are convertible.
Defined at line 73 of file ../../src/lib/zxdump/include/lib/zxdump/buffer.h
Buffer<T, View> & operator= (Buffer<T, View> && other)
Defined at line 79 of file ../../src/lib/zxdump/include/lib/zxdump/buffer.h
template <typename OtherT, class OtherView>
Buffer<T, View> & operator= (Buffer<OtherT, OtherView> && other)
Defined at line 87 of file ../../src/lib/zxdump/include/lib/zxdump/buffer.h
template <typename OtherT, class OtherView>
Buffer<OtherT, OtherView> Reinterpret ()
This is like a reinterpret_cast, but applied to the rvalue reference.
Defined at line 94 of file ../../src/lib/zxdump/include/lib/zxdump/buffer.h
void ~Buffer<T, View> ()
Defined at line 105 of file ../../src/lib/zxdump/include/lib/zxdump/buffer.h
const View & get ()
Defined at line 107 of file ../../src/lib/zxdump/include/lib/zxdump/buffer.h
const View & operator* ()
Defined at line 109 of file ../../src/lib/zxdump/include/lib/zxdump/buffer.h
const View * operator-> ()
Defined at line 111 of file ../../src/lib/zxdump/include/lib/zxdump/buffer.h
Friends
template <typename T = std::byte, class View = std::span<const T>>
class DumpFile
template <typename T = std::byte, class View = std::span<const T>>
class Process
template <typename OtherTclass OtherView>
class Buffer