Low-Level C++ SDK  v1.3.0
Loading...
Searching...
No Matches
WeArtMessageSerializer.h
Go to the documentation of this file.
1#pragma once
2
3#include "WeArtMessages.h"
4#include <sstream>
5
7class WeArtMessageSerializer {
8public:
9 const char separator = ':';
10
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;
13 }
14
18 WeArtMessage* Deserialize(std::string data);
19
20private:
21
22 std::string extractID(std::string& data);
23
27 WeArtMessage* createMessage(std::string& ID);
28};