18 #include "uuid/uuid.h" 22 "%08lX-%04hX-%04hX-%02hhX%02hhX-%02hhX%02hhX%02hhX%02hhX%02hhX%02hhX";
29 ::uuid_generate_time(me_);
30 unsigned int* d1 =
reinterpret_cast<unsigned int*
>(me_);
31 unsigned short* d2 =
reinterpret_cast<unsigned short*
>(me_+4);
32 unsigned short* d3 =
reinterpret_cast<unsigned short*
>(me_+6);
36 for(
int i = 0;
i < 8; ++
i){
43 ::snprintf(text,
sizeof(text),
53 char const dash =
'-';
54 size_t const iSize = 8;
55 size_t const sSize = 4;
56 size_t const cSize = 2;
58 Data1 = strtol(source.substr(offset, iSize).c_str(), 0, 16);
60 assert(dash == source[offset++]);
61 Data2 = strtol(source.substr(offset, sSize).c_str(), 0, 16);
63 assert(dash == source[offset++]);
64 Data3 = strtol(source.substr(offset, sSize).c_str(), 0, 16);
66 assert(dash == source[offset++]);
67 Data4[0] = strtol(source.substr(offset, cSize).c_str(), 0, 16);
69 Data4[1] = strtol(source.substr(offset, cSize).c_str(), 0, 16);
71 assert(dash == source[offset++]);
72 Data4[2] = strtol(source.substr(offset, cSize).c_str(), 0, 16);
74 Data4[3] = strtol(source.substr(offset, cSize).c_str(), 0, 16);
76 Data4[4] = strtol(source.substr(offset, cSize).c_str(), 0, 16);
78 Data4[5] = strtol(source.substr(offset, cSize).c_str(), 0, 16);
80 Data4[6] = strtol(source.substr(offset, cSize).c_str(), 0, 16);
82 Data4[7] = strtol(source.substr(offset, cSize).c_str(), 0, 16);
84 assert(source.size() ==
offset);
static char const * fmt_Guid
void init()
initialize a new Guid
static std::string const source("source")
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e g
std::string const toString() const
Automatic conversion from string reprentation.
bool operator<(Guid const &g) const
Smaller operator.
Guid const & fromString(std::string const &s)
Automatic conversion to string representation.