Add cereal serialize() to VendorProfile, PrinterModel, Preset, and Semver

This commit is contained in:
ExPikaPaka
2026-06-18 08:34:27 +02:00
parent 2ab9e14525
commit 517fa29d6f
3 changed files with 66 additions and 2 deletions

View File

@@ -190,6 +190,15 @@ public:
os << self.to_string();
return os;
}
// cereal: round-trip through the string representation
template<class Archive>
std::string save_minimal(const Archive&) const { return to_string(); }
template<class Archive>
void load_minimal(const Archive&, const std::string& s) {
if (auto v = Semver::parse(s)) *this = std::move(*v);
}
private:
semver_t ver;