summaryrefslogtreecommitdiff
path: root/src/identity.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/identity.cpp')
-rw-r--r--src/identity.cpp11
1 files changed, 11 insertions, 0 deletions
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<const Priv> && p): p(std::move(p)) {}
@@ -32,6 +34,15 @@ optional<Identity> Identity::load(const vector<Ref> & refs)
return nullopt;
}
+vector<Ref> Identity::store(const Storage & st) const
+{
+ vector<Ref> res;
+ res.reserve(p->data.size());
+ for (const auto & x : p->data)
+ res.push_back(x.store(st));
+ return res;
+}
+
optional<string> Identity::name() const
{
return p->name.get();