-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding files for ServerInterface.hpp and ClientInterface.hpp
- Loading branch information
1 parent
443e84e
commit 0217208
Showing
4 changed files
with
93 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
cmake_minimum_required(VERSION 3.19) | ||
set(CMAKE_CXX_STANDARD 20) | ||
|
||
project(client) | ||
|
||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) | ||
|
||
include(FetchContent) | ||
FetchContent_Declare(SFML | ||
GIT_REPOSITORY https://github.com/SFML/SFML.git | ||
GIT_TAG 2.6.x) | ||
FetchContent_MakeAvailable(SFML) | ||
|
||
add_executable(CMakeSFMLProject clientmain.cpp) | ||
target_link_libraries(CMakeSFMLProject PRIVATE sfml-network) | ||
target_compile_features(CMakeSFMLProject PRIVATE cxx_std_20) | ||
|
||
if(WIN32) | ||
add_custom_command( | ||
TARGET CMakeSFMLProject | ||
COMMENT "Copy OpenAL DLL" | ||
PRE_BUILD COMMAND ${CMAKE_COMMAND} -E copy ${SFML_SOURCE_DIR}/extlibs/bin/$<IF:$<EQUAL:${CMAKE_SIZEOF_VOID_P},8>,x64,x86>/openal32.dll $<TARGET_FILE_DIR:CMakeSFMLProject> | ||
VERBATIM) | ||
endif() | ||
|
||
install(TARGETS CMakeSFMLProject) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/** | ||
* This file is part of the Fall 2023, CSE 491 course project. | ||
* @brief A networking interface that allows information to be sent across a network | ||
* @note Status: PROTOTYPE | ||
**/ | ||
|
||
#pragma once | ||
|
||
#include <cassert> | ||
#include <string> | ||
#include <vector> | ||
#include <SFML/Network/UdpSocket.hpp> | ||
#include <SFML/Network/Packet.hpp> | ||
|
||
#include "../NetworkInterface.hpp" | ||
|
||
using namespace sf; | ||
|
||
namespace cse491 { | ||
namespace netWorth{ | ||
class ClientInterface : public NetworkingInterface { | ||
private: | ||
|
||
protected: | ||
|
||
|
||
public: | ||
ClientInterface(size_t id, const std::string & name) : NetworkingInterface(id, name) { } | ||
~ClientInterface() = default; | ||
|
||
}; //End of ClientInterface | ||
}// End of namespace NetWorth | ||
|
||
|
||
} // End of namespace cse491 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/** | ||
* This file is part of the Fall 2023, CSE 491 course project. | ||
* @brief A networking interface that allows information to be sent across a network | ||
* @note Status: PROTOTYPE | ||
**/ | ||
|
||
#pragma once | ||
|
||
#include <cassert> | ||
#include <string> | ||
#include <vector> | ||
#include <SFML/Network/UdpSocket.hpp> | ||
#include <SFML/Network/Packet.hpp> | ||
|
||
#include "../NetworkInterface.hpp" | ||
|
||
using namespace sf; | ||
|
||
namespace cse491 { | ||
namespace netWorth{ | ||
class ServerInterface : public NetworkingInterface { | ||
private: | ||
|
||
protected: | ||
|
||
|
||
public: | ||
ServerInterface(size_t id, const std::string & name) : NetworkingInterface(id, name) { } | ||
~ServerInterface() = default; | ||
};//End of class ServerInterface | ||
}//End of namespace netWorth | ||
} // End of namespace cse491 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters