diff options
Diffstat (limited to '')
-rw-r--r-- | src/uuid.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/uuid.cpp b/src/uuid.cpp index 69af5b4..d34a989 100644 --- a/src/uuid.cpp +++ b/src/uuid.cpp | |||
@@ -45,6 +45,16 @@ Bu::String Bu::Uuid::toString() | |||
45 | return mb.getString(); | 45 | return mb.getString(); |
46 | } | 46 | } |
47 | 47 | ||
48 | Bu::String Bu::Uuid::toUrn() | ||
49 | { | ||
50 | return "urn:uuid:" + toString(); | ||
51 | } | ||
52 | |||
53 | int Bu::Uuid::getVersion() | ||
54 | { | ||
55 | return (data[6]&((8|4|2|1)<<4))>>4; | ||
56 | } | ||
57 | |||
48 | #define msb( i ) (1<<(7-i)) | 58 | #define msb( i ) (1<<(7-i)) |
49 | 59 | ||
50 | void Bu::Uuid::clear() | 60 | void Bu::Uuid::clear() |