16class CommandController;
17class StateChangeDistributor;
31 void execute(std::span<const TclObject> tokens,
33 [[nodiscard]] std::string
help(std::span<const TclObject> tokens)
const override;
34 void tabCompletion(std::vector<std::string>& tokens)
const override;
35 [[nodiscard]]
bool needRecord(std::span<const TclObject> tokens)
const ;
44 std::string driveName,
45 bool createCmd =
true,
46 bool doubleSidedDrive =
true,
47 std::function<
void()> preChangeCallback = {});
49 std::string driveName);
54 [[nodiscard]]
const std::string&
getDriveName()
const {
return driveName; }
65 int insertDisk(
const std::string& filename)
override;
68 void changeDisk(std::unique_ptr<Disk> newDisk);
74 template<
typename Archive>
75 void serialize(Archive& ar,
unsigned version);
78 void init(std::string_view prefix,
bool createCmd);
79 void execute(std::span<const TclObject> tokens);
80 void insertDisk(std::span<const TclObject> args);
82 void sendChangeDiskEvent(std::span<const TclObject> args);
85 void signalStateChange(
const StateChange& event)
override;
86 void stopReplay(EmuTime::param time)
noexcept override;
93 std::function<void()> preChangeCallback;
95 const std::string driveName;
96 std::unique_ptr<Disk> disk;
99 std::optional<DiskCommand> diskCommand;
100 const bool doubleSidedDrive;
102 bool diskChangedFlag;
bool peekDiskChanged() const
const DiskName & getDiskName() const
int insertDisk(const std::string &filename) override
std::string_view getContainerName() const override
void serialize(Archive &ar, unsigned version)
const Disk & getDisk() const
const std::string & getDriveName() const
bool isDoubleSidedDrive() const
Scheduler * getScheduler() const
void changeDisk(std::unique_ptr< Disk > newDisk)
SectorAccessibleDisk * getSectorAccessibleDisk() override
bool diskChanged() override
bool needRecord(std::span< const TclObject > tokens) const
std::string help(std::span< const TclObject > tokens) const override
Print help for this command.
void execute(std::span< const TclObject > tokens, TclObject &result) override
Execute this command.
void tabCompletion(std::vector< std::string > &tokens) const override
Attempt tab completion for this command.
Contains the main loop of openMSX.
Base class for all external MSX state changing events.
This file implemented 3 utility functions: