uuid.hpp 395 B

1234567891011121314151617181920
  1. #pragma once
  2. #include <string>
  3. #include <random>
  4. #include <sstream>
  5. #include <iomanip>
  6. namespace smartbotic::common {
  7. class UUID {
  8. public:
  9. static std::string generate();
  10. static std::string generatePrefixed(const std::string& prefix);
  11. static bool isValid(const std::string& uuid);
  12. private:
  13. static thread_local std::mt19937_64 generator_;
  14. };
  15. } // namespace smartbotic::common