Unreal SDK  v1.2.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
10{
11public:
12 const char separator = ':';
13
14 static constexpr unsigned long long int HashStringToInt(const char* str, unsigned long long int hash = 0) {
15 return (*str == 0) ? hash : 101 * HashStringToInt(str + 1) + *str;
16 }
17
21 WeArtMessage* Deserialize(std::string data);
22
23private:
24
25 std::string extractID(std::string& data);
26
30 WeArtMessage* createMessage(std::string& ID);
31};
Generic Weart message.
Definition: WeArtMessages.h:178
Serializer for communication with the middleware.
Definition: WeArtMessageSerializer.h:10
const char separator
Definition: WeArtMessageSerializer.h:12
WeArtMessage * Deserialize(std::string data)
Deserializes a string into the corresponding message object.
Definition: WeArtMessageSerializer.cpp:6
static constexpr unsigned long long int HashStringToInt(const char *str, unsigned long long int hash=0)
Definition: WeArtMessageSerializer.h:14