I'm working in a manager class, that holds string representing paths. From this strings, I'd like to have a boost.uuid using a code like this:
m_log->addMessage("Generating UUID from path",ZEL_APPENDER,LOGLEVEL_DEBUG);
boost::uuids::string_generator str_gen;
boost::uuids::uuid generatedUUID = str_gen(full_path);
assert(generatedUUID.is_nil() == false);
char msg[500];
snprintf(msg,500,"Successfully generated UUID %s from path",boost::uuids::to_string(generatedUUID).c_str());
m_log->addMessage(msg,ZEL_APPENDER,LOGLEVEL_DEBUG);
But unfortunatelly, I found that generated string is always the same, even if full_path is diferent.
Also, when I try with an ultra simple example like this:
string s1("helloworld");
boost::uuids::string_generator str_gen;
boost::uuids::uuid generatedUUID = str_gen(s1);
cout << "s1: " << boost::uuids::to_string(generatedUUID) << endl;
Boost throws a runtime exception saying that string is invalid. Could you help me? The only source of documentation I've found is here
Thanks in advance.