17 #ifndef UUIDGENERATOR_HPP_
18 #define UUIDGENERATOR_HPP_
24 #include <boost/uuid/uuid.hpp>
25 #include <boost/uuid/uuid_io.hpp>
26 #include <boost/uuid/name_generator.hpp>
27 #include <boost/uuid/random_generator.hpp>
34 boost::uuids::basic_random_generator<boost::mt19937> gen;
35 boost::uuids::uuid uuid = gen();
42 boost::uuids::basic_random_generator<boost::mt19937> gen;
43 boost::uuids::uuid uuid = gen();
44 std::int32_t rand = (uuid.data[12] << 24) | (uuid.data[13] << 16)
45 | (uuid.data[14] << 8) | (uuid.data[15]);
50 boost::uuids::basic_random_generator<boost::mt19937> gen;
51 boost::uuids::uuid uuid = gen();
54 uuid_s.assign(ss.str());
58 namespace buuids = boost::uuids;
60 buuids::name_generator generator(seed);
61 buuids::uuid uuid = generator(data);
65 uuid_s.assign(ss.str());
static std::int32_t generateRandomInt()
static void generateUuid(std::string &uuid_s)
static void generateUuid(std::string &uuid_s, std::string data)
static std::string generateUuid()