29 #include <boost/uuid/uuid.hpp> 30 #include <boost/uuid/uuid_generators.hpp> 31 #include <boost/uuid/uuid_io.hpp> 40 ss << boost::uuids::random_generator()();
45 static boost::atomic<uint32>
idNumber(1);
47 return idNumber.fetch_add(1, boost::memory_order_relaxed);
55 str +=
"0123456789"[i % 10];
59 std::reverse(str.begin(), str.end());
A class holding an UTF-8 string.
UString generateIDNumberString()
Utility functions for generating unique IDs.
static boost::atomic< uint64 > idNumberString(1)
static boost::atomic< uint32 > idNumber(1)
static UString uint64ToString(uint64 i)
Helper header to include boost::atomic.
UString generateIDRandomString()
uint32 generateIDNumber()