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

#include <DiskChanger.hh>

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

Public Member Functions

 DiskChanger (MSXMotherBoard &board, std::string driveName, bool createCommand=true, bool doubleSidedDrive=true, std::function< void()> preChangeCallback={})
 
 DiskChanger (Reactor &reactor, std::string driveName)
 
 ~DiskChanger ()
 
void createCommand ()
 
const std::string & getDriveName () const
 
const DiskNamegetDiskName () const
 
bool peekDiskChanged () const
 
void forceDiskChange ()
 
DiskgetDisk ()
 
SectorAccessibleDiskgetSectorAccessibleDisk () override
 
const std::string & getContainerName () const override
 
bool diskChanged () override
 
int insertDisk (string_ref filename) override
 
void changeDisk (std::unique_ptr< Disk > newDisk)
 
SchedulergetScheduler () const
 
bool isDoubleSidedDrive () const
 
template<typename Archive >
void serialize (Archive &ar, unsigned version)
 
- Public Member Functions inherited from openmsx::DiskContainer
virtual ~DiskContainer ()=default
 
bool isRomdisk () const
 
template<typename Archive >
void serialize (Archive &, unsigned)
 

Friends

class DiskCommand
 

Detailed Description

Definition at line 24 of file DiskChanger.hh.

Constructor & Destructor Documentation

◆ DiskChanger() [1/2]

openmsx::DiskChanger::DiskChanger ( MSXMotherBoard board,
std::string  driveName,
bool  createCommand = true,
bool  doubleSidedDrive = true,
std::function< void()>  preChangeCallback = {} 
)

Definition at line 47 of file DiskChanger.cc.

References openmsx::MSXMotherBoard::getMachineID().

◆ DiskChanger() [2/2]

openmsx::DiskChanger::DiskChanger ( Reactor reactor,
std::string  driveName 
)

◆ ~DiskChanger()

openmsx::DiskChanger::~DiskChanger ( )

Member Function Documentation

◆ changeDisk()

void openmsx::DiskChanger::changeDisk ( std::unique_ptr< Disk newDisk)

◆ createCommand()

void openmsx::DiskChanger::createCommand ( )

Definition at line 85 of file DiskChanger.cc.

Referenced by DiskChanger().

◆ diskChanged()

bool openmsx::DiskChanger::diskChanged ( )
overridevirtual

Implements openmsx::DiskContainer.

Definition at line 105 of file DiskChanger.cc.

Referenced by getDisk().

◆ forceDiskChange()

void openmsx::DiskChanger::forceDiskChange ( )
inline

Definition at line 41 of file DiskChanger.hh.

Referenced by openmsx::DirAsDSK::readSectorImpl().

◆ getContainerName()

const std::string & openmsx::DiskChanger::getContainerName ( ) const
overridevirtual

◆ getDisk()

Disk& openmsx::DiskChanger::getDisk ( )
inline

◆ getDiskName()

const DiskName & openmsx::DiskChanger::getDiskName ( ) const

Definition at line 100 of file DiskChanger.cc.

Referenced by changeDisk(), openmsx::DiskCommand::execute(), and getDriveName().

◆ getDriveName()

const std::string& openmsx::DiskChanger::getDriveName ( ) const
inline

◆ getScheduler()

Scheduler* openmsx::DiskChanger::getScheduler ( ) const
inline

◆ getSectorAccessibleDisk()

SectorAccessibleDisk * openmsx::DiskChanger::getSectorAccessibleDisk ( )
overridevirtual

Implements openmsx::DiskContainer.

Definition at line 112 of file DiskChanger.cc.

Referenced by getDisk().

◆ insertDisk()

int openmsx::DiskChanger::insertDisk ( string_ref  filename)
overridevirtual

◆ isDoubleSidedDrive()

bool openmsx::DiskChanger::isDoubleSidedDrive ( ) const
inline

Definition at line 55 of file DiskChanger.hh.

References insertDisk(), and serialize().

Referenced by openmsx::DirAsDSK::DirAsDSK().

◆ peekDiskChanged()

bool openmsx::DiskChanger::peekDiskChanged ( ) const
inline

Definition at line 40 of file DiskChanger.hh.

◆ serialize()

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

Friends And Related Function Documentation

◆ DiskCommand

friend class DiskCommand
friend

Definition at line 79 of file DiskChanger.hh.


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