My Project
ControlSystem.hpp
1 /*
2 ** EPITECH PROJECT, 2020
3 ** ControlSystem.h
4 ** File description:
5 ** header for ControlSystem.c
6 */
7 
8 #ifndef R_TYPE_CONTROLSYSTEM_H
9  #define R_TYPE_CONTROLSYSTEM_H
10 
11  /* Ecs */
12  #include "Registry.hpp"
13 
14  /* Component */
15  #include "Component/CKeyboard.hpp"
16  #include "Component/CNetworkQueue.hpp"
17  #include "Component/CSceneId.hpp"
18  #include "Component/CClientNetworkId.hpp"
19 
23 namespace System {
27  class ControlSystem {
28  public:
32  ControlSystem();
33  ~ControlSystem() = default;
34 
44  void operator()(
45  Registry &registry,
50  );
51 
60  void addToNetworkQueue(float x, float y, Sparse_array<component::cnetwork_queue_t> &network, uint16_t idOfShip);
61 
62  protected:
63  private:
64  };
65 }
66 
67 #endif //R_TYPE_CONTROLSYSTEM_H
Sparse_array
Class that handle Element of type Component like a vector which can be holed.
Definition: SparseArray.hpp:22
System
Namespace for systems.
Definition: DirectionSystem.hpp:24
System::ControlSystem::addToNetworkQueue
void addToNetworkQueue(float x, float y, Sparse_array< component::cnetwork_queue_t > &network, uint16_t idOfShip)
A method to add a task for the server through the network queue.
Definition: ControlSystem.cpp:50
Registry
Class that handle ECS.
Definition: Registry.hpp:22
System::ControlSystem::ControlSystem
ControlSystem()
Construct a new Control System object.
Definition: ControlSystem.cpp:22
System::ControlSystem
ControlSystem class that handles the control of all the entities.
Definition: ControlSystem.hpp:27
System::ControlSystem::operator()
void operator()(Registry &registry, Sparse_array< component::ckeyboard_t > &keyboards, Sparse_array< component::cnetwork_queue_t > &network, Sparse_array< component::csceneid_t > &scenesId, Sparse_array< component::cclient_network_id > &clientNetworkId)
Function that will be automaticaly called while the client is working (on loop)
Definition: ControlSystem.cpp:26