16 static constexpr unsigned long long int HashStringToInt(
const char* str,
unsigned long long int hash = 0) {
93 std::string messageID = message->
getID();
94 std::vector<std::string> serializedValues = message->
getValues();
97 serializedValues.insert(serializedValues.begin(), messageID);
100 std::stringstream ss;
101 auto it = serializedValues.begin();
103 for (; it != serializedValues.end(); it++) {
116 uint8* byteData =
reinterpret_cast<uint8*
>(&text[0]);
123 std::vector<std::string> strings;
124 std::istringstream dataStream(data);
126 while (getline(dataStream, s,
separator)) {
127 strings.push_back(s);
131 std::string messageID = strings[0];
136 strings.erase(strings.begin());
146 std::string text = std::string(
reinterpret_cast<char*
>(byteData));
Message to the middleware to disconnect.
Definition: WeArtMessages.h:201
Message to the middleware to exit the connection.
Definition: WeArtMessages.h:192
Message to the middleware to set the force of the effect.
Definition: WeArtMessages.h:264
Message to the middleware to set the temperature of the effect.
Definition: WeArtMessages.h:211
Message to the middleware to set the texture of the effect.
Definition: WeArtMessages.h:322
Message to middleware to start the connection.
Definition: WeArtMessages.h:135
Message to the middleware to stop the temperature of the effect.
Definition: WeArtMessages.h:299
Message to middleware to stop the connection.
Definition: WeArtMessages.h:165
Message to the middleware to stop the temperature of the effect.
Definition: WeArtMessages.h:241
Message to the middleware to stop the texture of the effect.
Definition: WeArtMessages.h:369
Generic Tracking message, contains information on closure and abduction (based on tracking type)
Definition: WeArtMessages.h:392
Generic Weart message.
Definition: WeArtMessages.h:94
virtual void setValues(std::vector< std::string > &values)=0
virtual std::string getID()=0
virtual std::vector< std::string > getValues()=0
Serializer for communication with the middleware.
Definition: WeArtMessageSerializer.h:10
const char separator
Definition: WeArtMessageSerializer.h:13
static WeArtMessage * createMessage(std::string &ID)
Definition: WeArtMessageSerializer.h:20
uint8 * Serialize(std::string text)
Definition: WeArtMessageSerializer.h:112
std::string Deserialize(uint8 *byteData, int byteCount)
Definition: WeArtMessageSerializer.h:144
WeArtMessage * Deserialize(std::string data)
Definition: WeArtMessageSerializer.h:121
static constexpr unsigned long long int HashStringToInt(const char *str, unsigned long long int hash=0)
Definition: WeArtMessageSerializer.h:16
std::string Serialize(WeArtMessage *message)
Definition: WeArtMessageSerializer.h:88