r-type  0.0.0
R-Type main
Loading...
Searching...
No Matches
Server.hpp
Go to the documentation of this file.
1///
2/// @file Server.hpp
3/// @brief This file contains the Server class declaration
4/// @namespace srv
5///
6
7#pragma once
8
9#include <memory>
10
16#include "Utils/Clock.hpp"
18
19namespace srv
20{
21
22 ///
23 /// @class Server
24 /// @brief Class for the server
25 /// @namespace srv
26 ///
27 class Server
28 {
29
30 public:
31 explicit Server(const ArgsConfig &config);
32 ~Server() = default;
33
34 Server(const Server &) = delete;
35 Server &operator=(const Server &) = delete;
36 Server(Server &&) = delete;
37 Server &operator=(Server &&) = delete;
38
39 void run() const;
40
41 private:
42 [[nodiscard]] static utl::srv::AppConfig setupConfig(const ArgsConfig &cfg);
43
45
46 std::unique_ptr<utl::PluginLoader> m_pluginLoader;
47 std::unique_ptr<utl::Clock> m_clock;
48 std::unique_ptr<SceneManager> m_sceneManager;
49
50 std::shared_ptr<INetworkServer> m_network;
51 std::shared_ptr<gme::IGameServer> m_game;
52 }; // class Server
53
54} // namespace srv
This file contains the app config structure for server.
This file contains the Clock class.
This file contains the Game interface.
This file contains the server network interface.
Modern, cross-platform plugin loader.
Class for the server.
Definition Server.hpp:28
Server & operator=(Server &&)=delete
void run() const
Definition server.cpp:29
std::unique_ptr< utl::PluginLoader > m_pluginLoader
Definition Server.hpp:46
Server(const ArgsConfig &config)
Definition server.cpp:9
std::unique_ptr< utl::Clock > m_clock
Definition Server.hpp:47
std::shared_ptr< INetworkServer > m_network
Definition Server.hpp:50
static utl::srv::AppConfig setupConfig(const ArgsConfig &cfg)
Definition server.cpp:63
std::shared_ptr< gme::IGameServer > m_game
Definition Server.hpp:51
std::unique_ptr< SceneManager > m_sceneManager
Definition Server.hpp:48
Server & operator=(const Server &)=delete
Server(Server &&)=delete
utl::srv::AppConfig m_config
Definition Server.hpp:44
~Server()=default
Server(const Server &)=delete
This file contains the ArgsHandler class declaration.
This file contains the SceneManager class declaration.