| 1679 | } // namespace |
| 1680 | |
| 1681 | std::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 | |
| 1694 | void Model::restore(const std::string& image, const Store& store) { |
| 1695 | Img m{image}; |
no test coverage detected