openMSX
Public Member Functions | List of all members
openmsx::DiskPartition Class Referencefinal

#include <DiskPartition.hh>

Inheritance diagram for openmsx::DiskPartition:
Inheritance graph
[legend]
Collaboration diagram for openmsx::DiskPartition:
Collaboration graph
[legend]

Public Member Functions

 DiskPartition (SectorAccessibleDisk &disk, unsigned partition, std::shared_ptr< SectorAccessibleDisk > owned=nullptr)
 Return a partition (as a SectorBasedDisk) from another Disk.
 
 DiskPartition (SectorAccessibleDisk &parent, size_t start, size_t length)
 
- Public Member Functions inherited from openmsx::Disk
virtual ~Disk ()=default
 
const DiskNamegetName () const
 
void writeTrack (uint8_t track, uint8_t side, const RawTrack &input)
 Replace a full track in this image with the given track.
 
virtual bool hasChanged () const
 Has the content of this disk changed, by some other means than the MSX writing to the disk.
 
bool isDoubleSided ()
 
- Public Member Functions inherited from openmsx::SectorAccessibleDisk
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)
 

Additional Inherited Members

- Static Public Attributes inherited from openmsx::SectorAccessibleDisk
static constexpr size_t SECTOR_SIZE = sizeof(SectorBuffer)
 
- Protected Member Functions inherited from openmsx::SectorBasedDisk
 SectorBasedDisk (DiskName name)
 
void detectGeometry () override
 
void flushCaches () override
 
void setNbSectors (size_t num)
 
 ~SectorBasedDisk () override=default
 
- Protected Member Functions inherited from openmsx::Disk
 Disk (DiskName name)
 
size_t physToLog (uint8_t track, uint8_t side, uint8_t sector)
 
TSS logToPhys (size_t log)
 
virtual void detectGeometryFallback ()
 
void setSectorsPerTrack (unsigned num)
 
unsigned getSectorsPerTrack ()
 
void setNbSides (unsigned num)
 
- Protected Member Functions inherited from openmsx::SectorAccessibleDisk
 SectorAccessibleDisk ()
 
 ~SectorAccessibleDisk ()
 
void setPeekMode (bool peek)
 
bool isPeekMode () const
 
virtual void checkCaches ()
 
virtual Sha1Sum getSha1SumImpl (FilePool &filePool)
 

Detailed Description

Definition at line 9 of file DiskPartition.hh.

Constructor & Destructor Documentation

◆ DiskPartition() [1/2]

openmsx::DiskPartition::DiskPartition ( SectorAccessibleDisk disk,
unsigned  partition,
std::shared_ptr< SectorAccessibleDisk owned = nullptr 
)

Return a partition (as a SectorBasedDisk) from another Disk.

Parameters
diskThe whole disk.
partitionThe partition number. 0 for the whole disk >0 for a specific partition, this must be a valid partition.
ownedIf specified it should be a shared_ptr to the Disk object passed as first parameter. This DiskPartition will then take (shared) ownership of that Disk.

Definition at line 21 of file DiskPartition.cc.

References openmsx::SectorAccessibleDisk::getNbSectors(), openmsx::DiskImageUtils::getPartition(), openmsx::DiskImageUtils::partition(), openmsx::SectorBasedDisk::setNbSectors(), openmsx::Partition::size, and openmsx::Partition::start.

◆ DiskPartition() [2/2]

openmsx::DiskPartition::DiskPartition ( SectorAccessibleDisk parent,
size_t  start,
size_t  length 
)

Definition at line 40 of file DiskPartition.cc.

References openmsx::SectorBasedDisk::setNbSectors().


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