OXYGENHUB
◆ main openmsx / src / serial / MidiInConnector.hh
880 B · C++ · last changed chore(): initial commit 1 month ago source blame history raw
e8555c89 Andy McCall 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
12
class MidiInConnector : public Connector, public SerialDataInterface
13
{
14
public:
15
	[[nodiscard]] MidiInDevice& getPluggedMidiInDev() const;
16
17
	// Connector
18
	[[nodiscard]] zstring_view getDescription() const final;
19
	[[nodiscard]] zstring_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
private:
33
	const std::string description;
34
};
35
36
REGISTER_BASE_CLASS(MidiInConnector, "inConnector");
37
38
} // namespace openmsx
39
40
#endif