29 unsigned int data2, data3;
30 unsigned int b1, b2, b3, b4, b5, b6, b7, b8;
31 int result = sscanf(str.c_str(),
32 "%08lx-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x",
33 &data1, &data2, &data3,
34 &b1, &b2, &b3, &b4, &b5, &b6, &b7, &b8);
59 static const int buf_length = 128;
60 char buffer[buf_length];
62 "%08lx-%04hx-%04hx-%02x%02x-%02x%02x%02x%02x%02x%02x",
63 _data1, _data2, _data3,
64 _b1, _b2, _b3, _b4, _b5, _b6, _b7, _b8);
65 nassertr((
int)strlen(buffer) < buf_length,
string());
67 return string(buffer);
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void output(std::ostream &out) const
Outputs a hex representation of the GUID.
std::string format_string() const
Returns a hex representation of the GUID.
bool parse_string(const std::string &str)
Parses the hex representation in the indicated string and stores it in the WindowsGuid object.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.