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 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 DiskNamegetDiskName () const
 
bool peekDiskChanged () const
 
void forceDiskChange ()
 
DiskgetDisk ()
 
const DiskgetDisk () const
 
SectorAccessibleDiskgetSectorAccessibleDisk () override
 
std::string_view getContainerName () const override
 
bool diskChanged () override
 
int insertDisk (const std::string &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
 DiskContainer ()=default
 
 DiskContainer (const DiskContainer &)=delete
 
 DiskContainer (DiskContainer &&)=delete
 
DiskContaineroperator= (const DiskContainer &)=delete
 
DiskContaineroperator= (DiskContainer &&)=delete
 
virtual ~DiskContainer ()=default
 
bool isRomDisk () const
 
template<typename Archive >
void serialize (Archive &, unsigned)
 

Friends

class DiskCommand
 

Detailed Description

Definition at line 40 of file DiskChanger.hh.

Constructor & Destructor Documentation

◆ DiskChanger() [1/2]

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().

◆ DiskChanger() [2/2]

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

Definition at line 53 of file DiskChanger.cc.

◆ ~DiskChanger()

openmsx::DiskChanger::~DiskChanger ( )
override

Member Function Documentation

◆ changeDisk()

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

◆ createCommand()

void openmsx::DiskChanger::createCommand ( )

Definition at line 75 of file DiskChanger.cc.

◆ diskChanged()

bool openmsx::DiskChanger::diskChanged ( )
overridevirtual

Implements openmsx::DiskContainer.

Definition at line 95 of file DiskChanger.cc.

◆ forceDiskChange()

void openmsx::DiskChanger::forceDiskChange ( )
inline

Definition at line 57 of file DiskChanger.hh.

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

◆ getContainerName()

std::string_view openmsx::DiskChanger::getContainerName ( ) const
overridevirtual

Implements openmsx::DiskContainer.

Definition at line 110 of file DiskChanger.cc.

References getDriveName().

◆ getDisk() [1/2]

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

Definition at line 58 of file DiskChanger.hh.

◆ getDisk() [2/2]

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

Definition at line 59 of file DiskChanger.hh.

◆ getDiskName()

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

Definition at line 90 of file DiskChanger.cc.

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

◆ 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 102 of file DiskChanger.cc.

Referenced by serialize().

◆ insertDisk()

int openmsx::DiskChanger::insertDisk ( const std::string &  filename)
overridevirtual

Implements openmsx::DiskContainer.

Definition at line 150 of file DiskChanger.cc.

References insertDisk().

Referenced by insertDisk(), and serialize().

◆ isDoubleSidedDrive()

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

Definition at line 72 of file DiskChanger.hh.

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

◆ peekDiskChanged()

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

Definition at line 56 of file DiskChanger.hh.

◆ serialize()

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

Friends And Related Symbol Documentation

◆ DiskCommand

friend class DiskCommand
friend

Definition at line 98 of file DiskChanger.hh.


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