r-type  0.0.0
R-Type main
Loading...
Searching...
No Matches
Client.hpp
Go to the documentation of this file.
1///
2/// @file Client.hpp
3/// @brief This file contains the Client class declaration
4/// @namespace cli
5///
6
7#pragma once
8
9#include <unordered_map>
10
12#include "Engine/Engine.hpp"
15
16namespace cli
17{
18
19 ///
20 /// @class Client
21 /// @brief Class for the client
22 /// @namespace cli
23 ///
24 class Client
25 {
26
27 public:
28 explicit Client(const ArgsConfig &cfg);
29 ~Client() = default;
30
31 Client(const Client &) = delete;
32 Client &operator=(const Client &) = delete;
33 Client(Client &&) = delete;
34 Client &operator=(Client &&) = delete;
35
36 void run();
37
38 private:
39 void handleEvents(eng::Event &event);
40
41 std::unique_ptr<utl::PluginLoader> m_pluginLoader;
42 std::unique_ptr<eng::Engine> m_engine;
43 std::unique_ptr<gme::IGameClient> m_game;
44 std::unordered_map<eng::Key, bool> m_keysPressed;
45 }; // class Client
46
47} // namespace cli
This file contains the Engine class declaration.
This file contains the Game interface.
Modern, cross-platform plugin loader.
Class for the client.
Definition Client.hpp:25
std::unordered_map< eng::Key, bool > m_keysPressed
Definition Client.hpp:44
std::unique_ptr< gme::IGameClient > m_game
Definition Client.hpp:43
std::unique_ptr< utl::PluginLoader > m_pluginLoader
Definition Client.hpp:41
std::unique_ptr< eng::Engine > m_engine
Definition Client.hpp:42
Client(const ArgsConfig &cfg)
Definition client.cpp:16
Client(Client &&)=delete
Client(const Client &)=delete
Client & operator=(Client &&)=delete
void run()
Definition client.cpp:126
Client & operator=(const Client &)=delete
void handleEvents(eng::Event &event)
Definition event.cpp:3
~Client()=default
This file contains the ArgsHandler class declaration.