MCPcopy Create free account
hub / github.com/Niko1221/Strata / image

Method image

engine/src/split/src/model.cpp:1681–1692  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1679} // namespace
1680
1681std::string Model::image() const {
1682 Img m;
1683 m.put((uint32_t) 0x31474d49); // "IMG1"
1684 for (const CardW& cc : cards) {
1685 CardW& c = const_cast<CardW&>(cc);
1686 card_fields(c, [&](auto& v) { m.put(v); });
1687 m.put_vec(c.L);
1688 m.put_vec(c.ec_host_gu);
1689 m.put_vec(c.ec_host_dn);
1690 }
1691 return m.s;
1692}
1693
1694void Model::restore(const std::string& image, const Store& store) {
1695 Img m{image};

Callers 3

apiFunction · 0.45
dataUrlsFunction · 0.45

Calls 3

card_fieldsFunction · 0.85
put_vecMethod · 0.80
putMethod · 0.65

Tested by

no test coverage detected