19 virtual ~Image() =
default;
27 virtual offset_t
WriteFile(
Writer& wr, offset_t count, offset_t offset = 0)
const = 0;
35 virtual std::shared_ptr<const ActualImage>
AsImage()
const;
45 std::shared_ptr<const ActualImage>
AsImage()
const override;
55 virtual size_t ReadData(
size_t bytes, offset_t offset,
void * buffer)
const = 0;
58 uint64_t
ReadUnsigned(
size_t bytes, offset_t offset, EndianType endiantype)
const;
61 uint64_t
ReadUnsigned(
size_t bytes, offset_t offset)
const;
64 int64_t
ReadSigned(
size_t bytes, offset_t offset, EndianType endiantype)
const;
67 int64_t
ReadSigned(
size_t bytes, offset_t offset)
const;
72 int GetByte(offset_t offset)
const;
int64_t ReadSigned(size_t bytes, offset_t offset, EndianType endiantype) const
Reads a signed number at a specific offset.
Definition image.cc:50
virtual size_t ReadData(size_t bytes, offset_t offset, void *buffer) const =0
Attempts to fill a buffer with data.
std::shared_ptr< const ActualImage > AsImage() const override
Retrieves a randomly accessible image.
Definition image.cc:33
uint64_t ReadUnsigned(size_t bytes, offset_t offset, EndianType endiantype) const
Reads an unsigned number at a specific offset.
Definition image.cc:38
int GetByte(offset_t offset) const
Retrieve byte at a certain offset (optional, might not be defined)
Definition image.cc:62
Represents an abstract data image whose data can be written to a file.
Definition image.h:17
virtual offset_t WriteFile(Writer &wr, offset_t count, offset_t offset=0) const =0
Writes data of non-zero filled sections.
virtual offset_t ImageSize() const =0
Retrieves size of stored data.
virtual std::shared_ptr< const ActualImage > AsImage() const
Retrieves a randomly accessible image.
Definition image.cc:10
A helper class, encapsulating functionality needed to export binary data.
Definition writer.h:15