openMSX
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
[legend]

Public Member Functions

void readSector (size_t sector, SectorBuffer &buf)
 
void writeSector (size_t sector, const SectorBuffer &buf)
 
void readSectors (std::span< SectorBuffer > buffers, size_t startSector)
 
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 16 of file SectorAccessibleDisk.hh.

Constructor & Destructor Documentation

◆ SectorAccessibleDisk()

openmsx::SectorAccessibleDisk::SectorAccessibleDisk ( )
protected

Definition at line 14 of file SectorAccessibleDisk.cc.

◆ ~SectorAccessibleDisk()

openmsx::SectorAccessibleDisk::~SectorAccessibleDisk ( )
protecteddefault

Member Function Documentation

◆ applyPatch()

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

Definition at line 97 of file SectorAccessibleDisk.cc.

◆ checkCaches()

void openmsx::SectorAccessibleDisk::checkCaches ( )
protectedvirtual

Reimplemented in openmsx::DirAsDSK.

Definition at line 162 of file SectorAccessibleDisk.cc.

Referenced by getSha1Sum().

◆ flushCaches()

void openmsx::SectorAccessibleDisk::flushCaches ( )
protectedvirtual

◆ forceWriteProtect()

void openmsx::SectorAccessibleDisk::forceWriteProtect ( )

◆ getNbSectors()

size_t openmsx::SectorAccessibleDisk::getNbSectors ( ) const

◆ getPatches()

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

Definition at line 102 of file SectorAccessibleDisk.cc.

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 112 of file SectorAccessibleDisk.cc.

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

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

◆ getSha1SumImpl()

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

◆ hasPatches()

bool openmsx::SectorAccessibleDisk::hasPatches ( ) const

Definition at line 107 of file SectorAccessibleDisk.cc.

◆ isDummyDisk()

bool openmsx::SectorAccessibleDisk::isDummyDisk ( ) const
virtual

Reimplemented in openmsx::DummyDisk.

Definition at line 157 of file SectorAccessibleDisk.cc.

Referenced by readSectors(), and writeSector().

◆ isPeekMode()

bool openmsx::SectorAccessibleDisk::isPeekMode ( ) const
inlineprotected

Definition at line 59 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 
)

◆ readSectorImpl()

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

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

Definition at line 58 of file SectorAccessibleDisk.cc.

Referenced by readSectorsImpl().

◆ readSectors()

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

Definition at line 26 of file SectorAccessibleDisk.cc.

References getNbSectors(), and isDummyDisk().

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

◆ readSectorsImpl()

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

Definition at line 48 of file SectorAccessibleDisk.cc.

References enumerate(), and readSectorImpl().

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

◆ setPeekMode()

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

Definition at line 58 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 81 of file SectorAccessibleDisk.cc.

References enumerate(), and writeSector().

Member Data Documentation

◆ SECTOR_SIZE

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

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