7class WeArtMessageSerializer {
9 const char separator =
':';
11 static constexpr unsigned long long int HashStringToInt(
const char* str,
unsigned long long int hash = 0) {
12 return (*str == 0) ? hash : 101 * HashStringToInt(str + 1) + *str;
18 static WeArtMessage* createMessage(std::string& ID);
23 std::string Serialize(WeArtMessage* message);
28 uint8* Serialize(std::string text);
33 WeArtMessage* Deserialize(std::string data);
41 std::string Deserialize(uint8* byteData,
int byteCount);