Public Member Functions | Static Public Attributes | Protected Member Functions | List of all members
openmsx::SectorAccessibleDisk Class Referenceabstract

#include <SectorAccessibleDisk.hh>

Inheritance diagram for openmsx::SectorAccessibleDisk:
Inheritance graph

Public Member Functions

void readSector (size_t sector, SectorBuffer &buf) const
void writeSector (size_t sector, const SectorBuffer &buf)
void readSectors (std::span< SectorBuffer > buffers, size_t startSector) const
void writeSectors (std::span< const SectorBuffer > buffers, size_t startSector)
size_t getNbSectors () const
bool isWriteProtected () const
void forceWriteProtect ()
virtual bool isDummyDisk () const
void applyPatch (Filename patchFile)
std::vector< FilenamegetPatches () const
bool hasPatches () const
Sha1Sum getSha1Sum (FilePool &filePool)
 Calculate SHA1 of the content of this disk.
virtual void readSectorsImpl (std::span< SectorBuffer > buffers, size_t startSector)
virtual void readSectorImpl (size_t sector, SectorBuffer &buf)

Static Public Attributes

static constexpr size_t SECTOR_SIZE = sizeof(SectorBuffer)

Protected Member Functions

 SectorAccessibleDisk ()
 ~SectorAccessibleDisk ()
void setPeekMode (bool peek)
bool isPeekMode () const
virtual void checkCaches ()
virtual void flushCaches ()
virtual Sha1Sum getSha1SumImpl (FilePool &filePool)

Detailed Description

Definition at line 18 of file SectorAccessibleDisk.hh.

Constructor & Destructor Documentation

◆ SectorAccessibleDisk()

openmsx::SectorAccessibleDisk::SectorAccessibleDisk ( )

Definition at line 16 of file

◆ ~SectorAccessibleDisk()

openmsx::SectorAccessibleDisk::~SectorAccessibleDisk ( )

Member Function Documentation

◆ applyPatch()

void openmsx::SectorAccessibleDisk::applyPatch ( Filename  patchFile)

Definition at line 99 of file

◆ checkCaches()

void openmsx::SectorAccessibleDisk::checkCaches ( )

Reimplemented in openmsx::DirAsDSK.

Definition at line 164 of file

Referenced by getSha1Sum().

◆ flushCaches()

void openmsx::SectorAccessibleDisk::flushCaches ( )

◆ forceWriteProtect()

void openmsx::SectorAccessibleDisk::forceWriteProtect ( )

◆ getNbSectors()

size_t openmsx::SectorAccessibleDisk::getNbSectors ( ) const

◆ getPatches()

std::vector< Filename > openmsx::SectorAccessibleDisk::getPatches ( ) const

Definition at line 104 of file

Referenced by openmsx::DiskChanger::serialize().

◆ getSha1Sum()

Sha1Sum openmsx::SectorAccessibleDisk::getSha1Sum ( FilePool filePool)

Calculate SHA1 of the content of this disk.

This value is cached (and flushed on writes).

Definition at line 114 of file

References checkCaches(), openmsx::Sha1Sum::empty(), and getSha1SumImpl().

Referenced by openmsx::HD::serialize().

◆ getSha1SumImpl()

Sha1Sum openmsx::SectorAccessibleDisk::getSha1SumImpl ( FilePool filePool)

◆ hasPatches()

bool openmsx::SectorAccessibleDisk::hasPatches ( ) const

Definition at line 109 of file

◆ isDummyDisk()

bool openmsx::SectorAccessibleDisk::isDummyDisk ( ) const

Reimplemented in openmsx::DummyDisk.

Definition at line 159 of file

Referenced by readSectors(), and writeSector().

◆ isPeekMode()

bool openmsx::SectorAccessibleDisk::isPeekMode ( ) const

Definition at line 61 of file SectorAccessibleDisk.hh.

Referenced by openmsx::DirAsDSK::readSectorImpl().

◆ isWriteProtected()

bool openmsx::SectorAccessibleDisk::isWriteProtected ( ) const

◆ readSector()

void openmsx::SectorAccessibleDisk::readSector ( size_t  sector,
SectorBuffer buf 
) const

◆ readSectorImpl()

void openmsx::SectorAccessibleDisk::readSectorImpl ( size_t  sector,
SectorBuffer buf 

Reimplemented in openmsx::DirAsDSK, and openmsx::DMKDiskImage.

Definition at line 60 of file

Referenced by readSectorsImpl().

◆ readSectors()

void openmsx::SectorAccessibleDisk::readSectors ( std::span< SectorBuffer buffers,
size_t  startSector 
) const

Definition at line 28 of file

References getNbSectors(), and isDummyDisk().

Referenced by getSha1SumImpl(), openmsx::MSXtar::MSXtar(), and readSector().

◆ readSectorsImpl()

void openmsx::SectorAccessibleDisk::readSectorsImpl ( std::span< SectorBuffer buffers,
size_t  startSector 

Definition at line 50 of file

References enumerate(), and readSectorImpl().

Referenced by openmsx::EmptyDiskPatch::copyBlock().

◆ setPeekMode()

void openmsx::SectorAccessibleDisk::setPeekMode ( bool  peek)

Definition at line 60 of file SectorAccessibleDisk.hh.

Referenced by getSha1SumImpl().

◆ writeSector()

void openmsx::SectorAccessibleDisk::writeSector ( size_t  sector,
const SectorBuffer buf 

◆ writeSectors()

void openmsx::SectorAccessibleDisk::writeSectors ( std::span< const SectorBuffer buffers,
size_t  startSector 

Definition at line 83 of file

References enumerate(), and writeSector().

Member Data Documentation


constexpr size_t openmsx::SectorAccessibleDisk::SECTOR_SIZE = sizeof(SectorBuffer)

The documentation for this class was generated from the following files: