RetroLinker
Linker for several 8-bit, 16-bit and 32-bit formats
Loading...
Searching...
No Matches
writable.h
1#ifndef WRITABLE_H
2#define WRITABLE_H
3
4#include <vector>
5#include "../common.h"
6#include "reader.h"
7#include "writer.h"
8
9namespace Linker
10{
15 {
16 public:
20 virtual offset_t ActualDataSize() = 0;
24 virtual offset_t WriteFile(Writer& wr, offset_t count, offset_t offset = 0) = 0;
28 offset_t WriteFile(Writer& wr)
29 {
30 return WriteFile(wr, ActualDataSize());
31 }
35 virtual int GetByte(offset_t offset);
36 virtual ~Writable();
37 };
38}
39
40#endif /* WRITABLE_H */
Represents an abstract interface whose data can be written to a file.
Definition writable.h:15
virtual offset_t WriteFile(Writer &wr, offset_t count, offset_t offset=0)=0
Writes data of non-zero filled sections.
virtual int GetByte(offset_t offset)
Retrieve byte at a certain offset (optional, might not be defined)
Definition writable.cc:7
virtual offset_t ActualDataSize()=0
Retrieves size of stored data.
offset_t WriteFile(Writer &wr)
Writes data of non-zero filled sections.
Definition writable.h:28
A helper class, encapsulating functionality needed to export binary data.
Definition writer.h:15