MCPcopy Create free account
hub / github.com/chrxh/alien / unwrapGenome

Method unwrapGenome

source/PersisterInterface/SerializerService.cpp:1494–1509  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1492
1493
1494bool 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}

Callers

nothing calls this directly

Calls 2

sizeMethod · 0.80
getCellFunctionTypeMethod · 0.45

Tested by

no test coverage detected