| e8555c89 Andy McCall |
1 |
#ifndef DSKDISKIMAGE_HH |
| 2 |
#define DSKDISKIMAGE_HH |
| 3 |
|
| 4 |
#include "SectorBasedDisk.hh" |
| 5 |
#include <memory> |
| 6 |
|
| 7 |
namespace openmsx { |
| 8 |
|
| 9 |
class File; |
| 10 |
|
| 11 |
class DSKDiskImage final : public SectorBasedDisk |
| 12 |
{ |
| 13 |
public: |
| 14 |
explicit DSKDiskImage(const Filename& filename); |
| 15 |
DSKDiskImage(const Filename& filename, std::shared_ptr<File> file); |
| 16 |
|
| 17 |
private: |
| 18 |
void readSectorsImpl( |
| 19 |
std::span<SectorBuffer> buffers, size_t startSector) override; |
| 20 |
void writeSectorImpl(size_t sector, const SectorBuffer& buf) override; |
| 21 |
[[nodiscard]] bool isWriteProtectedImpl() const override; |
| 22 |
[[nodiscard]] Sha1Sum getSha1SumImpl(FilePool& filePool) override; |
| 23 |
|
| 24 |
private: |
| 25 |
const std::shared_ptr<File> file; |
| 26 |
}; |
| 27 |
|
| 28 |
} |
| 29 |
|
| 30 |
#endif |