aboutsummaryrefslogtreecommitdiff
path: root/src/uuid.h
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2012-03-25 20:00:08 +0000
committerMike Buland <eichlan@xagasoft.com>2012-03-25 20:00:08 +0000
commit469bbcf0701e1eb8a6670c23145b0da87357e178 (patch)
treeb5b062a16e46a6c5d3410b4e574cd0cc09057211 /src/uuid.h
parentee1b79396076edc4e30aefb285fada03bb45e80d (diff)
downloadlibbu++-469bbcf0701e1eb8a6670c23145b0da87357e178.tar.gz
libbu++-469bbcf0701e1eb8a6670c23145b0da87357e178.tar.bz2
libbu++-469bbcf0701e1eb8a6670c23145b0da87357e178.tar.xz
libbu++-469bbcf0701e1eb8a6670c23145b0da87357e178.zip
Code is all reorganized. We're about ready to release. I should write up a
little explenation of the arrangement.
Diffstat (limited to 'src/uuid.h')
-rw-r--r--src/uuid.h56
1 files changed, 0 insertions, 56 deletions
diff --git a/src/uuid.h b/src/uuid.h
deleted file mode 100644
index 261f653..0000000
--- a/src/uuid.h
+++ /dev/null
@@ -1,56 +0,0 @@
1/*
2 * Copyright (C) 2007-2011 Xagasoft, All rights reserved.
3 *
4 * This file is part of the libbu++ library and is released under the
5 * terms of the license contained in the file LICENSE.
6 */
7
8#ifndef BU_UUID_H
9#define BU_UUID_H
10
11#include "bu/string.h"
12
13namespace Bu
14{
15 class Uuid
16 {
17 public:
18 Uuid();
19 Uuid( const Uuid &src );
20 Uuid( const Bu::String &sSrc );
21 virtual ~Uuid();
22
23 Bu::String toRawString() const;
24 Bu::String toString() const;
25 Bu::String toUrn() const;
26
27 int getVersion();
28
29 static Uuid gen();
30 static Uuid genV1();
31 static Uuid genV2();
32 static Uuid genV3();
33 static Uuid genV4();
34 static Uuid genV5();
35
36 void clear();
37
38 bool operator==( const Uuid &rhs ) const;
39
40 private:
41 void set( const Bu::String &sSrc );
42 unsigned char data[16];
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 );
54};
55
56#endif