Civilization
Binary.hpp
1 // Generated by dia2code
2 #ifndef SHARED__BINARY__H
3 #define SHARED__BINARY__H
4 
5 #include <memory>
6 #include <string>
7 #include <stdlib.h>
8 
9 namespace shared {
10  class Player;
11 }
12 
13 #include "Player.hpp"
14 
15 namespace shared {
16 
18  class Binary {
19  // Operations
20  public:
21  static void send (std::shared_ptr<Player> player, std::string serializedData, bool answerRequired = true);
22  static std::string receive (std::shared_ptr<Player> player, std::istream& alreadyReceived, size_t totalSize);
23  template <typename T> static void castToBinary (T& data, std::string& serializedData);
24  template <typename T> static void castToObject (std::string receivedData, T& data);
25  // Setters and Getters
26  };
27 
28 };
29 
30 #endif
class Binary -
Definition: Binary.hpp:18