From 02e24f0f533fe904c3a5275c4060c10c38d7c17a Mon Sep 17 00:00:00 2001 From: Ján Sučan Date: Wed, 10 May 2017 15:13:29 +0200 Subject: Uvodny commit, subory su rovnake ako na CD prilozenom k vytlacenemu texu bakalarskej prace, naviac je pridany len subor LICENCIA --- SerialPort/SerialPortFactory.cpp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100755 SerialPort/SerialPortFactory.cpp (limited to 'SerialPort/SerialPortFactory.cpp') diff --git a/SerialPort/SerialPortFactory.cpp b/SerialPort/SerialPortFactory.cpp new file mode 100755 index 0000000..a7e8e9f --- /dev/null +++ b/SerialPort/SerialPortFactory.cpp @@ -0,0 +1,21 @@ +#include "SerialPortFactory.hpp" + +#ifdef WIN32 +#include "SerialPortWin32.hpp" +#else +#include "SerialPortUnix.hpp" +#endif + +std::unique_ptr +CSerialPortFactory::getSerialPort() +{ + std::unique_ptr sp; + +#ifdef WIN32 + sp.reset(new CSerialPortWin32()); +#else + sp.reset(new CSerialPortUnix()); +#endif + + return sp; +} -- cgit v1.2.3