18 #include "uuid/uuid.h" 21 static char const*
fmt_Guid =
"%08lX-%04hX-%04hX-%02hhX%02hhX-%02hhX%02hhX%02hhX%02hhX%02hhX%02hhX";
28 ::uuid_generate_random(me_);
29 unsigned int* d1 =
reinterpret_cast<unsigned int*
>(me_);
30 unsigned short* d2 =
reinterpret_cast<unsigned short*
>(me_ + 4);
31 unsigned short* d3 =
reinterpret_cast<unsigned short*
>(me_ + 6);
35 for (
int i = 0;
i < 8; ++
i) {
61 char const dash =
'-';
62 size_t const iSize = 8;
63 size_t const sSize = 4;
64 size_t const cSize = 2;
66 Data1 = strtol(source.substr(offset, iSize).c_str(),
nullptr, 16);
68 assert(dash == source[offset++]);
69 Data2 = strtol(source.substr(offset, sSize).c_str(),
nullptr, 16);
71 assert(dash == source[offset++]);
72 Data3 = strtol(source.substr(offset, sSize).c_str(),
nullptr, 16);
74 assert(dash == source[offset++]);
75 Data4[0] = strtol(source.substr(offset, cSize).c_str(),
nullptr, 16);
77 Data4[1] = strtol(source.substr(offset, cSize).c_str(),
nullptr, 16);
79 assert(dash == source[offset++]);
80 Data4[2] = strtol(source.substr(offset, cSize).c_str(),
nullptr, 16);
82 Data4[3] = strtol(source.substr(offset, cSize).c_str(),
nullptr, 16);
84 Data4[4] = strtol(source.substr(offset, cSize).c_str(),
nullptr, 16);
86 Data4[5] = strtol(source.substr(offset, cSize).c_str(),
nullptr, 16);
88 Data4[6] = strtol(source.substr(offset, cSize).c_str(),
nullptr, 16);
90 Data4[7] = strtol(source.substr(offset, cSize).c_str(),
nullptr, 16);
92 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.