// Copyright (C) 2022 Full Cycle Games // This file is part of the "Nazara Engine - Core module" // For conditions of distribution and use, see copyright notice in Config.hpp #pragma once #ifndef NAZARA_CORE_UUID_HPP #define NAZARA_CORE_UUID_HPP #include #include #include #include #include #include namespace Nz { class NAZARA_CORE_API Uuid { public: inline Uuid(); inline Uuid(const std::array uuid); Uuid(const Uuid&) = default; Uuid(Uuid&& generator) = default; ~Uuid() = default; inline bool IsNull() const; inline const std::array& ToArray() const; inline std::string ToString() const; std::array ToStringArray() const; Uuid& operator=(const Uuid&) = default; Uuid& operator=(Uuid&&) = default; static Uuid FromString(std::string_view str); static Uuid Generate(); private: std::array m_uuid; }; NAZARA_CORE_API std::ostream& operator<<(std::ostream& out, const Uuid& uuid); inline bool operator==(const Uuid& lhs, const Uuid& rhs); inline bool operator!=(const Uuid& lhs, const Uuid& rhs); inline bool operator<(const Uuid& lhs, const Uuid& rhs); inline bool operator<=(const Uuid& lhs, const Uuid& rhs); inline bool operator>(const Uuid& lhs, const Uuid& rhs); inline bool operator>=(const Uuid& lhs, const Uuid& rhs); } namespace Nz { inline bool Serialize(SerializationContext& context, const Uuid& value, TypeTag); inline bool Unserialize(SerializationContext& context, Uuid* value, TypeTag); } namespace std { template<> struct hash; } #include #endif // NAZARA_CORE_UUID_HPP