1#ifndef PLUGGINGCONTROLLER_HH
2#define PLUGGINGCONTROLLER_HH
55 [[nodiscard]]
Connector& getConnector(std::string_view name)
const;
56 [[nodiscard]]
Pluggable& getPluggable(std::string_view name)
const;
60 std::vector<Connector*> connectors;
61 std::vector<std::unique_ptr<Pluggable>> pluggables;
67 void execute(std::span<const TclObject> tokens,
TclObject& result,
68 EmuTime::param time)
override;
69 [[nodiscard]] std::string help(std::span<const TclObject> tokens)
const override;
70 void tabCompletion(std::vector<std::string>& tokens)
const override;
71 [[nodiscard]]
bool needRecord(std::span<const TclObject> tokens)
const override;
78 void execute(std::span<const TclObject> tokens,
TclObject& result,
79 EmuTime::param time)
override;
80 [[nodiscard]] std::string help(std::span<const TclObject> tokens)
const override;
81 void tabCompletion(std::vector<std::string>& tokens)
const override;
85 explicit PluggableInfo(
InfoCommand& machineInfoCommand);
86 void execute(std::span<const TclObject> tokens,
88 [[nodiscard]] std::string help(std::span<const TclObject> tokens)
const override;
89 void tabCompletion(std::vector<std::string>& tokens)
const override;
93 explicit ConnectorInfo(
InfoCommand& machineInfoCommand);
94 void execute(std::span<const TclObject> tokens,
96 [[nodiscard]] std::string help(std::span<const TclObject> tokens)
const override;
97 void tabCompletion(std::vector<std::string>& tokens)
const override;
100 struct ConnectionClassInfo final :
InfoTopic {
101 explicit ConnectionClassInfo(
InfoCommand& machineInfoCommand);
102 void execute(std::span<const TclObject> tokens,
104 [[nodiscard]] std::string help(std::span<const TclObject> tokens)
const override;
105 void tabCompletion(std::vector<std::string>& tokens)
const override;
106 } connectionClassInfo;
Represents something you can plug devices into.
Central administration of Connectors and Pluggables.
void registerPluggable(std::unique_ptr< Pluggable > pluggable)
Add a Pluggable to the registry.
void unregisterConnector(Connector &connector)
Pluggable * findPluggable(std::string_view name) const
Return the Pluggable with given name or nullptr if there is none with this name.
PluggingController(MSXMotherBoard &motherBoard)
void registerConnector(Connector &connector)
Connectors must be (un)registered.
Connector * findConnector(std::string_view name) const
Return the Connector with given name or nullptr if there is none with this name.
CliComm & getCliComm()
Access to the MSX specific CliComm, so that Connectors can get it.
EmuTime::param getCurrentTime() const
Convenience method: get current time.
Commands that directly influence the MSX state should send and events so that they can be recorded by...
This file implemented 3 utility functions: