diff options
Diffstat (limited to 'include/erebos')
-rw-r--r-- | include/erebos/uuid.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/include/erebos/uuid.h b/include/erebos/uuid.h index 9b615f8..e67677a 100644 --- a/include/erebos/uuid.h +++ b/include/erebos/uuid.h @@ -1,15 +1,22 @@ #pragma once #include <array> +#include <optional> #include <string> namespace erebos { struct UUID { - explicit UUID(std::string); + UUID(): uuid({}) {} + explicit UUID(const std::string &); explicit operator std::string() const; + static std::optional<UUID> fromString(const std::string &); + static bool fromString(const std::string &, UUID &); + + static UUID generate(); + bool operator==(const UUID &) const; bool operator!=(const UUID &) const; |