aboutsummaryrefslogtreecommitdiff
path: root/src/unstable/uuid.h
diff options
context:
space:
mode:
authorMike Buland <mbuland@penny-arcade.com>2022-04-20 14:04:47 -0700
committerMike Buland <mbuland@penny-arcade.com>2022-04-20 14:04:47 -0700
commitfd56cdd21a7c9c944ad189cf91ff24d3c2b0f975 (patch)
treef16f7e7f54399ef9c753beb87069eed8122dbccb /src/unstable/uuid.h
parentd10e6a5ca0905f0ef2836cd98aebfb48e7f1e8a3 (diff)
downloadlibbu++-fd56cdd21a7c9c944ad189cf91ff24d3c2b0f975.tar.gz
libbu++-fd56cdd21a7c9c944ad189cf91ff24d3c2b0f975.tar.bz2
libbu++-fd56cdd21a7c9c944ad189cf91ff24d3c2b0f975.tar.xz
libbu++-fd56cdd21a7c9c944ad189cf91ff24d3c2b0f975.zip
Gradually moving to better archive structure.
It's dragging other new API changes along with it, including use of Blob and Text.
Diffstat (limited to '')
-rw-r--r--src/unstable/uuid.h15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/unstable/uuid.h b/src/unstable/uuid.h
index d61a928..902942e 100644
--- a/src/unstable/uuid.h
+++ b/src/unstable/uuid.h
@@ -9,10 +9,11 @@
9#define BU_UUID_H 9#define BU_UUID_H
10 10
11#include "bu/util.h" 11#include "bu/util.h"
12#include "bu/string.h" 12#include "bu/blob.h"
13 13
14namespace Bu 14namespace Bu
15{ 15{
16 class Archive;
16 class Uuid 17 class Uuid
17 { 18 {
18 friend Bu::Archive &operator>>( Bu::Archive &ar, Uuid &u ); 19 friend Bu::Archive &operator>>( Bu::Archive &ar, Uuid &u );
@@ -20,12 +21,12 @@ namespace Bu
20 public: 21 public:
21 Uuid(); 22 Uuid();
22 Uuid( const Uuid &src ); 23 Uuid( const Uuid &src );
23 Uuid( const Bu::String &sSrc ); 24 Uuid( const Bu::Blob &sSrc );
24 virtual ~Uuid(); 25 virtual ~Uuid();
25 26
26 Bu::String toRawString() const; 27 Bu::Blob toRawBlob() const;
27 Bu::String toString() const; 28 Bu::Blob toBlob() const;
28 Bu::String toUrn() const; 29 Bu::Blob toUrn() const;
29 30
30 enum Type 31 enum Type
31 { 32 {
@@ -43,11 +44,11 @@ namespace Bu
43 DEPRECATED static Uuid gen() { return generate(); } 44 DEPRECATED static Uuid gen() { return generate(); }
44 45
45 void clear(); 46 void clear();
46 void set( const Bu::String &sSrc ); 47 void set( const Bu::Blob &sSrc );
47 48
48 bool operator==( const Uuid &rhs ) const; 49 bool operator==( const Uuid &rhs ) const;
49 bool operator!=( const Uuid &rhs ) const; 50 bool operator!=( const Uuid &rhs ) const;
50 Uuid &operator=( const Bu::String &rhs ) { set( rhs ); return *this; } 51 Uuid &operator=( const Bu::Blob &rhs ) { set( rhs ); return *this; }
51 Uuid &operator=( const Uuid &rhs ); 52 Uuid &operator=( const Uuid &rhs );
52 53
53 private: 54 private: