Scopira
20080306
|
#include <uuid.h>
Public Member Functions | |
uuid (void) | |
Constructor. Builds a "zero" UUID (one with all zeros) | |
uuid (const char *s) | |
void | set_zero (void) |
bool | is_zero (void) const |
bool | operator== (const uuid &rhs) const |
comparator | |
bool | operator!= (const uuid &rhs) const |
comparator | |
bool | operator< (const uuid &rhs) const |
comparator | |
bool | load (scopira::tool::itflow_i &in) |
Serialization - yes, non-virtual. | |
void | save (scopira::tool::otflow_i &out) const |
Serialization - yes, non-virtual. | |
std::string | as_string (void) const |
return a nice string representation | |
bool | parse_string (const std::string &s) |
parse the string into this object, return false if failed | |
Friends | |
class | scopira::tool::uuid_generator |
scopira::tool::oflow_i & | operator<< (scopira::tool::oflow_i &o, const scopira::tool::uuid &id) |
Output operator for uuids. | |
A universally unique identifier. You can print this out (for debugging purposes), do comparison tests and serialize it to stream. That's it. This class is heavily inline and includes two seperate implementations.
Generic implementation: broken.
scopira::tool::uuid::uuid | ( | const char * | s | ) |
Construct the UUID from the given string. Particularly useful in global, static, constant-like objects.
bool scopira::tool::uuid::is_zero | ( | void | ) | const |
Is this UUID a "zero" uuid?
void scopira::tool::uuid::set_zero | ( | void | ) |
Sets this uuid to be a zero UUID, the "null" of UUIDs.