The Client class, it defines a client and its interactions with the server.
More...
#include <Client.hpp>
|
| Client (std::map< std::string, std::string > &configurationFiles) |
| Construct a new Client object. More...
|
|
| ~Client () |
| Destroy the Client object.
|
|
void | setUpEcs () |
| Set the Up Ecs object.
|
|
void | setUpSystems () |
| Set the Up Systems object.
|
|
void | setUpComponents () |
| Set the Up Components object.
|
|
void | machineRun () |
| A method to launch the core features of a client.
|
|
void | tryToConnect () |
| A method to try to connect to a target server.
|
|
void | disconnect () |
| A method to call juste before a client is deconected.
|
|
void | loadButtons (std::string const &filepath, Sparse_array< component::casset_t > &assets) |
| A method to load the assets of the buttons. More...
|
|
void | loadImages (std::string const &filepath, Sparse_array< component::casset_t > &assets) |
| A method to load the assets of the images. More...
|
|
void | loadTexts (std::string const &filepath) |
| A method to load the assets of the text. More...
|
|
void | createText (nlohmann::json const &oneData, std::array< float, 2 > pos, int scene, std::string const &ref) |
| Create a Text object. More...
|
|
void | createImage (nlohmann::json const &oneData, std::array< float, 2 > pos, int scene, const std::string &ref, Sparse_array< component::casset_t > &assets) |
| Create a Image object. More...
|
|
The Client class, it defines a client and its interactions with the server.
◆ Client()
Client::Client |
( |
std::map< std::string, std::string > & |
configurationFiles | ) |
|
Construct a new Client object.
- Parameters
-
configurationFiles | configuration files |
◆ createImage()
void Client::createImage |
( |
nlohmann::json const & |
oneData, |
|
|
std::array< float, 2 > |
pos, |
|
|
int |
scene, |
|
|
const std::string & |
ref, |
|
|
Sparse_array< component::casset_t > & |
assets |
|
) |
| |
Create a Image object.
- Parameters
-
oneData | Json Data where is stored the data |
pos | Position of the image |
scene | Scene id where add the image |
ref | Reference of the image |
assets | The sparse array of assets |
◆ createText()
void Client::createText |
( |
nlohmann::json const & |
oneData, |
|
|
std::array< float, 2 > |
pos, |
|
|
int |
scene, |
|
|
std::string const & |
ref |
|
) |
| |
Create a Text object.
- Parameters
-
oneData | Json Data where is stored the data |
pos | Position of the text |
scene | Scene id where add the text |
ref | Reference of the text |
◆ loadButtons()
A method to load the assets of the buttons.
- Parameters
-
filepath | Path of the file containing all buttons |
assets | The sparse array of assets |
◆ loadImages()
A method to load the assets of the images.
- Parameters
-
filepath | Path of the file containing all images |
assets | The sparse array of assets |
◆ loadTexts()
void Client::loadTexts |
( |
std::string const & |
filepath | ) |
|
A method to load the assets of the text.
- Parameters
-
filepath | Path of the file containing all texts |
The documentation for this class was generated from the following files:
- /home/gurvan-le-letty/delivery/epitech_delivery/semester_5/B-CPP-500/B-CPP-500-PAR-5-1-rtype-martin.vanaud/Client/Source/Client/Client.hpp
- /home/gurvan-le-letty/delivery/epitech_delivery/semester_5/B-CPP-500/B-CPP-500-PAR-5-1-rtype-martin.vanaud/Client/Source/Client/Client.cpp