Skip to content

Commit

Permalink
server interface
Browse files Browse the repository at this point in the history
  • Loading branch information
tairch committed Jan 7, 2019
1 parent b2c4496 commit 4e97484
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ project(fligtSimProj2)

set(CMAKE_CXX_STANDARD 14)

add_executable(fligtSimProj2 main.cpp)
add_executable(fligtSimProj2 main.cpp Server.h MySerialServer.cpp MySerialServer.h)
13 changes: 13 additions & 0 deletions MySerialServer.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
//
// Created by t on 1/7/19.
//

#include "MySerialServer.h"

void MySerialServer::open(int port) {

}

void MySerialServer::stop() {

}
18 changes: 18 additions & 0 deletions MySerialServer.h
Original file line number Diff line number Diff line change
@@ -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
17 changes: 17 additions & 0 deletions Server.h
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 4e97484

Please sign in to comment.