MCPcopy Create free account
hub / github.com/Gecode/gecode / deserialize

Method deserialize

gecode/search/cpprofiler/message.hpp:371–409  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

369 }
370
371 void deserialize(char* data, size_t size) {
372 char *end = data + size;
373 msg.set_type(deserializeMsgType(data));
374 if (msg.isNode()) {
375 int32_t nid = deserializeInt(data);
376 int32_t rid = deserializeInt(data);
377 int32_t tid = deserializeInt(data);
378
379 msg.set_nodeUID({nid, rid, tid});
380
381 nid = deserializeInt(data);
382 rid = deserializeInt(data);
383 tid = deserializeInt(data);
384
385 msg.set_parentUID({nid, rid, tid});
386
387 msg.set_alt(deserializeInt(data));
388 msg.set_kids(deserializeInt(data));
389 msg.set_status(deserializeStatus(data));
390 }
391
392 msg.reset();
393
394 while (data != end) {
395 MessageMarshalling::Field f = deserializeField(data);
396 switch (f) {
397 case VERSION:
398 msg.set_version(deserializeInt(data)); break;
399 case LABEL:
400 msg.set_label(deserializeString(data)); break;
401 case NOGOOD:
402 msg.set_nogood(deserializeString(data)); break;
403 case INFO:
404 msg.set_info(deserializeString(data)); break;
405 default:
406 break;
407 }
408 }
409 }
410 };
411
412}}

Callers

nothing calls this directly

Calls 12

set_typeMethod · 0.80
isNodeMethod · 0.80
set_nodeUIDMethod · 0.80
set_parentUIDMethod · 0.80
set_altMethod · 0.80
set_kidsMethod · 0.80
set_statusMethod · 0.80
set_versionMethod · 0.80
set_labelMethod · 0.80
set_nogoodMethod · 0.80
set_infoMethod · 0.80
resetMethod · 0.45

Tested by

no test coverage detected