| 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 | }} |
nothing calls this directly
no test coverage detected