diff --git a/CMakeLists.txt b/CMakeLists.txt index d216a6a..377b61e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,4 +3,4 @@ project(fligtSimProj2) set(CMAKE_CXX_STANDARD 14) -add_executable(fligtSimProj2 main.cpp) \ No newline at end of file +add_executable(fligtSimProj2 main.cpp Server.h MySerialServer.cpp MySerialServer.h) \ No newline at end of file diff --git a/MySerialServer.cpp b/MySerialServer.cpp new file mode 100644 index 0000000..4b2653e --- /dev/null +++ b/MySerialServer.cpp @@ -0,0 +1,13 @@ +// +// Created by t on 1/7/19. +// + +#include "MySerialServer.h" + +void MySerialServer::open(int port) { + +} + +void MySerialServer::stop() { + +} diff --git a/MySerialServer.h b/MySerialServer.h new file mode 100644 index 0000000..13e99d5 --- /dev/null +++ b/MySerialServer.h @@ -0,0 +1,18 @@ +// +// Created by t on 1/7/19. +// + +#ifndef FLIGTSIMPROJ2_MYSERIALSERVER_H +#define FLIGTSIMPROJ2_MYSERIALSERVER_H + +#include "Server.h" + +using namespace server_side; + +class MySerialServer : Server { + virtual void open(int port); + virtual void stop(); +}; + + +#endif //FLIGTSIMPROJ2_MYSERIALSERVER_H diff --git a/Server.h b/Server.h new file mode 100644 index 0000000..922e398 --- /dev/null +++ b/Server.h @@ -0,0 +1,17 @@ +// +// Created by t on 1/7/19. +// + +#ifndef FLIGTSIMPROJ2_SERVER_H +#define FLIGTSIMPROJ2_SERVER_H + +namespace server_side { + //interface for the server + class Server { + public: + virtual void open(int port) = 0; + virtual void stop() = 0; + }; +} + +#endif //FLIGTSIMPROJ2_SERVER_H