| 1492 | |
| 1493 | |
| 1494 | bool SerializerService::unwrapGenome(std::vector<uint8_t>& output, ClusteredDataDescription const& input) |
| 1495 | { |
| 1496 | if (input.clusters.size() != 1) { |
| 1497 | return false; |
| 1498 | } |
| 1499 | auto cluster = input.clusters.front(); |
| 1500 | if (cluster.cells.size() != 1) { |
| 1501 | return false; |
| 1502 | } |
| 1503 | auto cell = cluster.cells.front(); |
| 1504 | if (cell.getCellFunctionType() != CellFunction_Constructor) { |
| 1505 | return false; |
| 1506 | } |
| 1507 | output = std::get<ConstructorDescription>(*cell.cellFunction).genome; |
| 1508 | return true; |
| 1509 | } |
nothing calls this directly
no test coverage detected