openMSX
MidiInConnector.hh
Go to the documentation of this file.
1 #ifndef MIDIINCONNECTOR_HH
2 #define MIDIINCONNECTOR_HH
3 
4 #include "Connector.hh"
5 #include "SerialDataInterface.hh"
6 #include "serialize_meta.hh"
7 
8 namespace openmsx {
9 
10 class MidiInDevice;
11 
13 {
14 public:
15  [[nodiscard]] MidiInDevice& getPluggedMidiInDev() const;
16 
17  // Connector
18  [[nodiscard]] std::string_view getDescription() const final;
19  [[nodiscard]] std::string_view getClass() const final;
20 
21  [[nodiscard]] virtual bool ready() = 0;
22  [[nodiscard]] virtual bool acceptsData() = 0;
23 
24  template<typename Archive>
25  void serialize(Archive& ar, unsigned version);
26 
27 protected:
28  MidiInConnector(PluggingController& pluggingController,
29  std::string name);
30  ~MidiInConnector() = default;
31 };
32 
34 
35 } // namespace openmsx
36 
37 #endif
Represents something you can plug devices into.
Definition: Connector.hh:21
std::string_view getClass() const final
A Connector belong to a certain class.
MidiInDevice & getPluggedMidiInDev() const
virtual bool acceptsData()=0
std::string_view getDescription() const final
Get a description for this connector.
MidiInConnector(PluggingController &pluggingController, std::string name)
void serialize(Archive &ar, unsigned version)
virtual bool ready()=0
Central administration of Connectors and Pluggables.
This file implemented 3 utility functions:
Definition: Autofire.cc:9
REGISTER_BASE_CLASS(Connector, "Connector")