Robot Devastation
MockNetworkEventListener.hpp
1 // Authors: see AUTHORS.md at project root.
2 // CopyPolicy: released under the terms of the LGPLv2.1, see LICENSE at project root.
3 // URL: https://github.com/asrob-uc3m/robotDevastation
4 
5 #ifndef _RD_MOCK_NETWORK_EVENT_LISTENER_HPP_
6 #define _RD_MOCK_NETWORK_EVENT_LISTENER_HPP_
7 
8 #include <vector>
9 
10 #include "NetworkEventListener.hpp"
11 #include "Player.hpp"
12 
13 namespace rd {
14 
27 {
28  public:
30 
31  virtual bool onDataArrived(const std::vector<Player> & players);
32 
33  int getDataArrived() const;
34  void resetDataArrived();
35 
36  const std::vector<Player> & getStoredPlayers() const;
37 
38 
39  private:
40  int data_arrived;
41  std::vector<Player> stored_players;
42 };
43 
44 
45 
46 }
47 
48 #endif // _RD_MOCK_NETWORK_EVENT_LISTENER_HPP_
rd
The main, catch-all namespace for Robot Devastation.
Definition: groups.dox:4
rd::MockNetworkEventListener
Dummy NetworkEventListener used for testing.
Definition: MockNetworkEventListener.hpp:26
rd::NetworkEventListener
Interface for objects that can be notified of input events by the NetworkManager.
Definition: NetworkEventListener.hpp:18