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)
void writeSector (size_t sector, const SectorBuffer &buf)
void readSectors (SectorBuffer *buffers, size_t startSector, size_t nbSectors)
void writeSectors (const SectorBuffer *buffers, size_t startSector, size_t nbSectors)
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. More...
virtual void readSectorsImpl (SectorBuffer *buffers, size_t startSector, size_t nbSectors)
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 15 of file SectorAccessibleDisk.hh.

Constructor & Destructor Documentation

◆ SectorAccessibleDisk()

openmsx::SectorAccessibleDisk::SectorAccessibleDisk ( )

Definition at line 12 of file

◆ ~SectorAccessibleDisk()

openmsx::SectorAccessibleDisk::~SectorAccessibleDisk ( )

Member Function Documentation

◆ applyPatch()

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

Definition at line 95 of file

◆ checkCaches()

void openmsx::SectorAccessibleDisk::checkCaches ( )

Reimplemented in openmsx::DirAsDSK.

Definition at line 160 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 100 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 110 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 105 of file

◆ isDummyDisk()

bool openmsx::SectorAccessibleDisk::isDummyDisk ( ) const

Reimplemented in openmsx::DummyDisk.

Definition at line 155 of file

Referenced by readSectors(), and writeSector().

◆ isPeekMode()

bool openmsx::SectorAccessibleDisk::isPeekMode ( ) const

Definition at line 60 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 

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

Definition at line 56 of file

Referenced by readSectorsImpl().

◆ readSectors()

void openmsx::SectorAccessibleDisk::readSectors ( SectorBuffer buffers,
size_t  startSector,
size_t  nbSectors 

Definition at line 24 of file

References Math::e, getNbSectors(), and isDummyDisk().

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

◆ readSectorsImpl()

void openmsx::SectorAccessibleDisk::readSectorsImpl ( SectorBuffer buffers,
size_t  startSector,
size_t  nbSectors 

Definition at line 46 of file

References readSectorImpl(), and xrange().

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

◆ setPeekMode()

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

Definition at line 59 of file SectorAccessibleDisk.hh.

Referenced by getSha1SumImpl().

◆ writeSector()

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

◆ writeSectors()

void openmsx::SectorAccessibleDisk::writeSectors ( const SectorBuffer buffers,
size_t  startSector,
size_t  nbSectors 

Definition at line 79 of file

References writeSector(), and xrange().

Member Data Documentation


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

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