summaryrefslogtreecommitdiff
path: root/src/uuid.h
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2011-07-27 17:20:12 +0000
committerMike Buland <eichlan@xagasoft.com>2011-07-27 17:20:12 +0000
commitd061fe55de758aafdec3b1ef378d83e0bee94242 (patch)
tree1e71ea327b77a1bb264b303db99f9d6499bf4649 /src/uuid.h
parent663c6d9c9113a92fc3c79b51ea986ff30189868d (diff)
downloadlibbu++-d061fe55de758aafdec3b1ef378d83e0bee94242.tar.gz
libbu++-d061fe55de758aafdec3b1ef378d83e0bee94242.tar.bz2
libbu++-d061fe55de758aafdec3b1ef378d83e0bee94242.tar.xz
libbu++-d061fe55de758aafdec3b1ef378d83e0bee94242.zip
More features for uuids, including hashing and comparison.
Diffstat (limited to 'src/uuid.h')
-rw-r--r--src/uuid.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/uuid.h b/src/uuid.h
index 1ffecc2..261f653 100644
--- a/src/uuid.h
+++ b/src/uuid.h
@@ -35,10 +35,22 @@ namespace Bu
35 35
36 void clear(); 36 void clear();
37 37
38 bool operator==( const Uuid &rhs ) const;
39
38 private: 40 private:
39 void set( const Bu::String &sSrc ); 41 void set( const Bu::String &sSrc );
40 unsigned char data[16]; 42 unsigned char data[16];
41 }; 43 };
44
45 template<typename T>
46 uint32_t __calcHashCode( const T &k );
47
48 template<typename T>
49 bool __cmpHashKeys( const T &a, const T &b );
50
51 template<> uint32_t __calcHashCode<Uuid>( const Uuid &k );
52 template<> bool __cmpHashKeys<Uuid>(
53 const Uuid &a, const Uuid &b );
42}; 54};
43 55
44#endif 56#endif