openMSX
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
openmsx::HD Class Reference

#include <HD.hh>

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

Public Types

using HDInUse = std::bitset< MAX_HD >
 

Public Member Functions

 HD (const DeviceConfig &config)
 
 ~HD () override
 
const std::string & getName () const
 
const FilenamegetImageName () const
 
void switchImage (const Filename &filename)
 
std::string getTigerTreeHash ()
 
void getMediaInfo (TclObject &result) override
 This method gets called when information is required on the media inserted in the media slot of the provider.
 
template<typename Archive >
void serialize (Archive &ar, unsigned version)
 
MSXMotherBoardgetMotherBoard () const
 
- Public Member Functions inherited from openmsx::SectorAccessibleDisk
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 readSectorImpl (size_t sector, SectorBuffer &buf)
 
- Public Member Functions inherited from openmsx::DiskContainer
 DiskContainer (const DiskContainer &)=delete
 
DiskContaineroperator= (const DiskContainer &)=delete
 
 DiskContainer ()=default
 
virtual ~DiskContainer ()=default
 
bool isRomDisk () const
 
template<typename Archive >
void serialize (Archive &, unsigned)
 
- Public Member Functions inherited from openmsx::MediaInfoProvider
 MediaInfoProvider (const MediaInfoProvider &)=delete
 
MediaInfoProvideroperator= (const MediaInfoProvider &)=delete
 

Static Public Member Functions

static std::shared_ptr< HDInUsegetDrivesInUse (MSXMotherBoard &motherBoard)
 

Static Public Attributes

static constexpr unsigned MAX_HD = 26
 
- Static Public Attributes inherited from openmsx::SectorAccessibleDisk
static constexpr size_t SECTOR_SIZE = sizeof(SectorBuffer)
 

Additional Inherited Members

- Protected Member Functions inherited from openmsx::SectorAccessibleDisk
 SectorAccessibleDisk ()
 
 ~SectorAccessibleDisk ()
 
void setPeekMode (bool peek)
 
bool isPeekMode () const
 
virtual void checkCaches ()
 
virtual void flushCaches ()
 
- Protected Member Functions inherited from openmsx::TTData
 ~TTData ()=default
 
- Protected Member Functions inherited from openmsx::MediaInfoProvider
 MediaInfoProvider ()=default
 
 ~MediaInfoProvider ()=default
 

Detailed Description

Definition at line 20 of file HD.hh.

Member Typedef Documentation

◆ HDInUse

using openmsx::HD::HDInUse = std::bitset<MAX_HD>

Definition at line 25 of file HD.hh.

Constructor & Destructor Documentation

◆ HD()

openmsx::HD::HD ( const DeviceConfig config)
explicit

◆ ~HD()

openmsx::HD::~HD ( )
override

Member Function Documentation

◆ getDrivesInUse()

std::shared_ptr< HD::HDInUse > openmsx::HD::getDrivesInUse ( MSXMotherBoard motherBoard)
static

Definition at line 24 of file HD.cc.

References openmsx::MSXMotherBoard::getSharedStuff().

Referenced by HD().

◆ getImageName()

const Filename & openmsx::HD::getImageName ( ) const
inline

Definition at line 33 of file HD.hh.

Referenced by openmsx::HDCommand::execute(), and getMediaInfo().

◆ getMediaInfo()

void openmsx::HD::getMediaInfo ( TclObject result)
overridevirtual

This method gets called when information is required on the media inserted in the media slot of the provider.

The provider must attach the info as a dictionary to the given TclObject.

Implements openmsx::MediaInfoProvider.

Definition at line 90 of file HD.cc.

References openmsx::TclObject::addDictKeyValues(), getImageName(), and openmsx::SectorAccessibleDisk::isWriteProtected().

◆ getMotherBoard()

MSXMotherBoard & openmsx::HD::getMotherBoard ( ) const
inline

Definition at line 44 of file HD.hh.

◆ getName()

const std::string & openmsx::HD::getName ( ) const
inline

Definition at line 32 of file HD.hh.

Referenced by openmsx::HDCommand::execute(), openmsx::HDCommand::help(), and switchImage().

◆ getTigerTreeHash()

std::string openmsx::HD::getTigerTreeHash ( )

Definition at line 158 of file HD.cc.

References openmsx::Timer::getTime(), and t.

Referenced by serialize().

◆ serialize()

template<typename Archive >
void openmsx::HD::serialize ( Archive &  ar,
unsigned  version 
)

◆ switchImage()

void openmsx::HD::switchImage ( const Filename filename)

Member Data Documentation

◆ MAX_HD

constexpr unsigned openmsx::HD::MAX_HD = 26
staticconstexpr

Definition at line 24 of file HD.hh.

Referenced by HD().


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