diff options
author | Roman Smrž <roman.smrz@seznam.cz> | 2019-12-21 21:42:20 +0100 |
---|---|---|
committer | Roman Smrž <roman.smrz@seznam.cz> | 2019-12-21 21:42:20 +0100 |
commit | f94443c63dfd63300e5bd29889935fd1f451175e (patch) | |
tree | 7722cfdac0ed76ff7f1fd525abb2ab15e0b0c998 /include/erebos/identity.h | |
parent | d084c069be38b6f3ad74912ca629403d9fdaec58 (diff) |
Identity storage and modification
Diffstat (limited to 'include/erebos/identity.h')
-rw-r--r-- | include/erebos/identity.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/include/erebos/identity.h b/include/erebos/identity.h index 7b66d82..f57a12e 100644 --- a/include/erebos/identity.h +++ b/include/erebos/identity.h @@ -12,6 +12,25 @@ public: std::optional<std::string> name() const; std::optional<Identity> owner() const; + std::optional<Ref> ref() const; + + class Builder + { + public: + Identity commit() const; + + void name(const std::string &); + void owner(const Identity &); + + private: + friend class Identity; + struct Priv; + const std::shared_ptr<Priv> p; + Builder(Priv * p): p(p) {} + }; + + static Builder create(const Storage &); + Builder modify() const; private: struct Priv; |