9using namespace DiskImageUtils;
11[[nodiscard]]
static DiskName getDiskName(SectorAccessibleDisk* disk,
unsigned partition)
13 if (
auto* dsk =
dynamic_cast<Disk*
>(disk)) {
22 std::shared_ptr<SectorAccessibleDisk> owned_)
25 , owned(
std::move(owned_))
27 assert(!owned || (owned.get() == &disk));
41 size_t start_,
size_t length)
49void DiskPartition::readSectorImpl(
size_t sector,
SectorBuffer& buf)
54void DiskPartition::writeSectorImpl(
size_t sector,
const SectorBuffer& buf)
59bool DiskPartition::isWriteProtectedImpl()
const
const Filename & getFilename() const
DiskPartition(SectorAccessibleDisk &disk, unsigned partition, std::shared_ptr< SectorAccessibleDisk > owned=nullptr)
Return a partition (as a SectorBasedDisk) from another Disk.
bool isWriteProtected() const
void readSector(size_t sector, SectorBuffer &buf)
size_t getNbSectors() const
void writeSector(size_t sector, const SectorBuffer &buf)
Abstract class for disk images that only represent the logical sector information (so not the raw tra...
void setNbSectors(size_t num)
T length(const vecN< N, T > &x)
Partition & getPartition(SectorAccessibleDisk &disk, unsigned partition, SectorBuffer &buf)
Gets the requested partition.
unsigned partition(SectorAccessibleDisk &disk, std::span< const unsigned > sizes, MSXBootSectorType bootType)
Write a partition table to the given disk and format each partition.
This file implemented 3 utility functions:
std::string strCat(Ts &&...ts)