diff options
Diffstat (limited to '')
-rw-r--r-- | src/unstable/uuid.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/unstable/uuid.h b/src/unstable/uuid.h index db4c85b..73b34bc 100644 --- a/src/unstable/uuid.h +++ b/src/unstable/uuid.h | |||
@@ -14,6 +14,8 @@ namespace Bu | |||
14 | { | 14 | { |
15 | class Uuid | 15 | class Uuid |
16 | { | 16 | { |
17 | friend Bu::ArchiveBase &operator>>( Bu::ArchiveBase &ar, Uuid &u ); | ||
18 | friend Bu::ArchiveBase &operator<<( Bu::ArchiveBase &ar, const Uuid &u ); | ||
17 | public: | 19 | public: |
18 | Uuid(); | 20 | Uuid(); |
19 | Uuid( const Uuid &src ); | 21 | Uuid( const Uuid &src ); |
@@ -34,11 +36,12 @@ namespace Bu | |||
34 | static Uuid genV5(); | 36 | static Uuid genV5(); |
35 | 37 | ||
36 | void clear(); | 38 | void clear(); |
39 | void set( const Bu::String &sSrc ); | ||
37 | 40 | ||
38 | bool operator==( const Uuid &rhs ) const; | 41 | bool operator==( const Uuid &rhs ) const; |
42 | Uuid &operator=( const Bu::String &rhs ) { set( rhs ); return *this; } | ||
39 | 43 | ||
40 | private: | 44 | private: |
41 | void set( const Bu::String &sSrc ); | ||
42 | unsigned char data[16]; | 45 | unsigned char data[16]; |
43 | }; | 46 | }; |
44 | 47 | ||
@@ -51,6 +54,9 @@ namespace Bu | |||
51 | template<> uint32_t __calcHashCode<Uuid>( const Uuid &k ); | 54 | template<> uint32_t __calcHashCode<Uuid>( const Uuid &k ); |
52 | template<> bool __cmpHashKeys<Uuid>( | 55 | template<> bool __cmpHashKeys<Uuid>( |
53 | const Uuid &a, const Uuid &b ); | 56 | const Uuid &a, const Uuid &b ); |
57 | |||
58 | Bu::ArchiveBase &operator>>( Bu::ArchiveBase &ar, Uuid &u ); | ||
59 | Bu::ArchiveBase &operator<<( Bu::ArchiveBase &ar, const Uuid &u ); | ||
54 | }; | 60 | }; |
55 | 61 | ||
56 | #endif | 62 | #endif |