openMSX
|
#include <DiskChanger.hh>
Public Member Functions | |
DiskChanger (MSXMotherBoard &board, std::string driveName, bool createCmd=true, bool doubleSidedDrive=true, std::function< void()> preChangeCallback={}) | |
DiskChanger (Reactor &reactor, std::string driveName) | |
~DiskChanger () override | |
void | createCommand () |
const std::string & | getDriveName () const |
const DiskName & | getDiskName () const |
bool | peekDiskChanged () const |
void | forceDiskChange () |
Disk & | getDisk () |
const Disk & | getDisk () const |
SectorAccessibleDisk * | getSectorAccessibleDisk () override |
std::string_view | getContainerName () const override |
bool | diskChanged () override |
int | insertDisk (const std::string &filename) override |
void | changeDisk (std::unique_ptr< Disk > newDisk) |
Scheduler * | getScheduler () const |
bool | isDoubleSidedDrive () const |
template<typename Archive > | |
void | serialize (Archive &ar, unsigned version) |
Public Member Functions inherited from openmsx::DiskContainer | |
DiskContainer ()=default | |
DiskContainer (const DiskContainer &)=delete | |
DiskContainer (DiskContainer &&)=delete | |
DiskContainer & | operator= (const DiskContainer &)=delete |
DiskContainer & | operator= (DiskContainer &&)=delete |
virtual | ~DiskContainer ()=default |
bool | isRomDisk () const |
template<typename Archive > | |
void | serialize (Archive &, unsigned) |
Friends | |
class | DiskCommand |
Definition at line 40 of file DiskChanger.hh.
openmsx::DiskChanger::DiskChanger | ( | MSXMotherBoard & | board, |
std::string | driveName, | ||
bool | createCmd = true , |
||
bool | doubleSidedDrive = true , |
||
std::function< void()> | preChangeCallback = {} |
||
) |
Definition at line 37 of file DiskChanger.cc.
References openmsx::MSXMotherBoard::getMachineID(), and tmpStrCat().
openmsx::DiskChanger::DiskChanger | ( | Reactor & | reactor, |
std::string | driveName | ||
) |
Definition at line 53 of file DiskChanger.cc.
|
override |
Definition at line 81 of file DiskChanger.cc.
References openmsx::Reactor::getDiskManipulator(), openmsx::DiskManipulator::unregisterDrive(), and openmsx::StateChangeDistributor::unregisterListener().
void openmsx::DiskChanger::changeDisk | ( | std::unique_ptr< Disk > | newDisk | ) |
Definition at line 180 of file DiskChanger.cc.
References openmsx::CommandController::getCliComm(), getDiskName(), getDriveName(), openmsx::CliComm::MEDIA, and openmsx::CliComm::update().
void openmsx::DiskChanger::createCommand | ( | ) |
Definition at line 75 of file DiskChanger.cc.
|
overridevirtual |
Implements openmsx::DiskContainer.
Definition at line 95 of file DiskChanger.cc.
|
inline |
Definition at line 57 of file DiskChanger.hh.
Referenced by openmsx::DirAsDSK::readSectorImpl().
|
overridevirtual |
Implements openmsx::DiskContainer.
Definition at line 110 of file DiskChanger.cc.
References getDriveName().
|
inline |
Definition at line 58 of file DiskChanger.hh.
|
inline |
Definition at line 59 of file DiskChanger.hh.
const DiskName & openmsx::DiskChanger::getDiskName | ( | ) | const |
Definition at line 90 of file DiskChanger.cc.
Referenced by changeDisk(), and openmsx::DiskCommand::execute().
|
inline |
Definition at line 54 of file DiskChanger.hh.
Referenced by changeDisk(), openmsx::DiskCommand::execute(), getContainerName(), openmsx::DiskCommand::help(), openmsx::SerializeConstructorArgs< DiskChanger >::save(), and serialize().
|
inline |
Definition at line 71 of file DiskChanger.hh.
Referenced by openmsx::DirAsDSK::checkCaches(), openmsx::DirAsDSK::readSectorImpl(), and openmsx::DirAsDSK::writeSectorImpl().
|
overridevirtual |
Implements openmsx::DiskContainer.
Definition at line 102 of file DiskChanger.cc.
Referenced by serialize().
|
overridevirtual |
Implements openmsx::DiskContainer.
Definition at line 150 of file DiskChanger.cc.
References insertDisk().
Referenced by insertDisk(), and serialize().
|
inline |
Definition at line 72 of file DiskChanger.hh.
Referenced by openmsx::DirAsDSK::DirAsDSK().
|
inline |
Definition at line 56 of file DiskChanger.hh.
void openmsx::DiskChanger::serialize | ( | Archive & | ar, |
unsigned | version | ||
) |
Definition at line 302 of file DiskChanger.cc.
References openmsx::DISK, openmsx::FileOperations::exists(), openmsx::SectorAccessibleDisk::forceWriteProtect(), openmsx::CommandController::getCliComm(), getDriveName(), openmsx::FilePool::getFile(), openmsx::Reactor::getFilePool(), openmsx::Filename::getOriginal(), openmsx::SectorAccessibleDisk::getPatches(), openmsx::DiskName::getResolved(), getSectorAccessibleDisk(), openmsx::File::getURL(), insertDisk(), openmsx::CliComm::printWarning(), openmsx::DiskName::serialize(), openmsx::Filename::serialize(), and openmsx::DiskName::updateAfterLoadState().
|
friend |
Definition at line 98 of file DiskChanger.hh.