diff options
author | Mike Buland <eichlan@xagasoft.com> | 2009-10-28 13:43:48 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2009-10-28 13:43:48 +0000 |
commit | 3166bd631a093f42ea44a4b0f4d914cf51518bd4 (patch) | |
tree | 999682383da45c96e05ddf23a33290928031c34f /src/uuid.h | |
parent | baaf14f63872ccfab3cb20f72a5cbb56d8cce8a4 (diff) | |
download | libbu++-3166bd631a093f42ea44a4b0f4d914cf51518bd4.tar.gz libbu++-3166bd631a093f42ea44a4b0f4d914cf51518bd4.tar.bz2 libbu++-3166bd631a093f42ea44a4b0f4d914cf51518bd4.tar.xz libbu++-3166bd631a093f42ea44a4b0f4d914cf51518bd4.zip |
Uuid now has a default gen function that will generate a uuid using the best,
easiest method available. On linux right now, this means that it uses the
kernel /proc interface. I'll have to add some fallbacks to this...
Diffstat (limited to 'src/uuid.h')
-rw-r--r-- | src/uuid.h | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -8,14 +8,21 @@ | |||
8 | #ifndef BU_UUID_H | 8 | #ifndef BU_UUID_H |
9 | #define BU_UUID_H | 9 | #define BU_UUID_H |
10 | 10 | ||
11 | #include "bu/fstring.h" | ||
12 | |||
11 | namespace Bu | 13 | namespace Bu |
12 | { | 14 | { |
13 | class Uuid | 15 | class Uuid |
14 | { | 16 | { |
15 | public: | 17 | public: |
16 | Uuid(); | 18 | Uuid(); |
19 | Uuid( const Uuid &src ); | ||
17 | virtual ~Uuid(); | 20 | virtual ~Uuid(); |
18 | 21 | ||
22 | Bu::FString toRawString(); | ||
23 | Bu::FString toString(); | ||
24 | |||
25 | static Uuid gen(); | ||
19 | static Uuid genV1(); | 26 | static Uuid genV1(); |
20 | static Uuid genV2(); | 27 | static Uuid genV2(); |
21 | static Uuid genV3(); | 28 | static Uuid genV3(); |
@@ -25,7 +32,7 @@ namespace Bu | |||
25 | void clear(); | 32 | void clear(); |
26 | 33 | ||
27 | private: | 34 | private: |
28 | unsigned char data[8]; | 35 | unsigned char data[16]; |
29 | }; | 36 | }; |
30 | }; | 37 | }; |
31 | 38 | ||