diff options
author | Roman Smrž <roman.smrz@seznam.cz> | 2021-05-09 15:20:30 +0200 |
---|---|---|
committer | Roman Smrž <roman.smrz@seznam.cz> | 2021-05-09 19:34:01 +0200 |
commit | d563500c915de2f0a652513af03f101c99715db3 (patch) | |
tree | 735c0dd4d3b62737170b5328b455b74ea60f3822 /include/erebos/identity.h | |
parent | 00e52ec8ee38a85737c093d90ebfba5069829608 (diff) |
SharedType: type trait instead of member functions and typedef
Diffstat (limited to 'include/erebos/identity.h')
-rw-r--r-- | include/erebos/identity.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/include/erebos/identity.h b/include/erebos/identity.h index f7b17b8..d0b60d5 100644 --- a/include/erebos/identity.h +++ b/include/erebos/identity.h @@ -1,9 +1,12 @@ #pragma once +#include <erebos/state.h> #include <erebos/storage.h> namespace erebos { +using std::optional; + class Identity { public: @@ -14,6 +17,7 @@ public: static std::optional<Identity> load(const Ref &); static std::optional<Identity> load(const std::vector<Ref> &); + std::vector<Ref> store() const; std::vector<Ref> store(const Storage & st) const; std::optional<std::string> name() const; @@ -47,8 +51,6 @@ public: static Builder create(const Storage &); Builder modify() const; - static const UUID sharedTypeId; - private: struct Priv; std::shared_ptr<const Priv> p; @@ -56,4 +58,6 @@ private: Identity(std::shared_ptr<const Priv> && p); }; +DECLARE_SHARED_TYPE(optional<Identity>) + } |