From 90021e1d335efac1017562c1d5dee43e99580319 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roman=20Smr=C5=BE?= Date: Wed, 22 Jul 2020 22:13:33 +0200 Subject: Local and shared state --- src/identity.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/identity.cpp') diff --git a/src/identity.cpp b/src/identity.cpp index 2396b9f..7364a8b 100644 --- a/src/identity.cpp +++ b/src/identity.cpp @@ -11,6 +11,8 @@ using std::nullopt; using std::runtime_error; using std::set; +const UUID Identity::sharedTypeId { "0c6c1fe0-f2d7-4891-926b-c332449f7871" }; + Identity::Identity(const Priv * p): p(p) {} Identity::Identity(shared_ptr && p): p(std::move(p)) {} @@ -32,6 +34,15 @@ optional Identity::load(const vector & refs) return nullopt; } +vector Identity::store(const Storage & st) const +{ + vector res; + res.reserve(p->data.size()); + for (const auto & x : p->data) + res.push_back(x.store(st)); + return res; +} + optional Identity::name() const { return p->name.get(); -- cgit v1.2.3