| 1 |
#include "RS232Connector.hh" |
| 2 |
|
| 3 |
#include "DummyRS232Device.hh" |
| 4 |
#include "RS232Device.hh" |
| 5 |
|
| 6 |
#include "serialize.hh" |
| 7 |
|
| 8 |
#include "checked_cast.hh" |
| 9 |
|
| 10 |
#include <memory> |
| 11 |
|
| 12 |
namespace openmsx { |
| 13 |
|
| 14 |
RS232Connector::RS232Connector(PluggingController& pluggingController_, |
| 15 |
std::string name_) |
| 16 |
: Connector(pluggingController_, std::move(name_), |
| 17 |
std::make_unique<DummyRS232Device>()) |
| 18 |
{ |
| 19 |
} |
| 20 |
|
| 21 |
zstring_view RS232Connector::getDescription() const |
| 22 |
{ |
| 23 |
return "Serial RS232 connector"; |
| 24 |
} |
| 25 |
|
| 26 |
zstring_view RS232Connector::getClass() const |
| 27 |
{ |
| 28 |
return "RS232"; |
| 29 |
} |
| 30 |
|
| 31 |
RS232Device& RS232Connector::getPluggedRS232Dev() const |
| 32 |
{ |
| 33 |
return *checked_cast<RS232Device*>(&getPlugged()); |
| 34 |
} |
| 35 |
|
| 36 |
template<typename Archive> |
| 37 |
void RS232Connector::serialize(Archive& ar, unsigned ) |
| 38 |
{ |
| 39 |
ar.template serializeBase<Connector>(*this); |
| 40 |
} |
| 41 |
INSTANTIATE_SERIALIZE_METHODS(RS232Connector); |
| 42 |
|
| 43 |
} |