1 #ifndef QPID_TYPES_UUID_H 2 #define QPID_TYPES_UUID_H 25 #include "qpid/types/ImportExport.h" 32 class QPID_TYPES_CLASS_EXTERN
Uuid 35 QPID_TYPES_EXTERN
static const size_t SIZE;
40 QPID_TYPES_EXTERN
Uuid(
bool unique=
false);
41 QPID_TYPES_EXTERN Uuid(
const Uuid&);
42 QPID_TYPES_EXTERN Uuid& operator=(
const Uuid&);
44 QPID_TYPES_EXTERN Uuid(
const unsigned char* data16);
45 QPID_TYPES_EXTERN Uuid(
const char* data16);
48 QPID_TYPES_EXTERN
void generate();
51 QPID_TYPES_EXTERN
void clear();
54 QPID_TYPES_EXTERN
bool isNull()
const;
55 QPID_TYPES_EXTERN
operator bool()
const;
56 QPID_TYPES_EXTERN
bool operator!()
const;
59 QPID_TYPES_EXTERN std::string str()
const;
61 QPID_TYPES_EXTERN
size_t size()
const;
62 QPID_TYPES_EXTERN
const unsigned char* data()
const;
64 friend QPID_TYPES_EXTERN
bool operator==(
const Uuid&,
const Uuid&);
65 friend QPID_TYPES_EXTERN
bool operator!=(
const Uuid&,
const Uuid&);
66 friend QPID_TYPES_EXTERN
bool operator<(
const Uuid&,
const Uuid&);
67 friend QPID_TYPES_EXTERN
bool operator>(
const Uuid&,
const Uuid&);
68 friend QPID_TYPES_EXTERN
bool operator<=(
const Uuid&,
const Uuid&);
69 friend QPID_TYPES_EXTERN
bool operator>=(
const Uuid&,
const Uuid&);
70 friend QPID_TYPES_EXTERN std::ostream& operator<<(std::ostream&, Uuid);
71 friend QPID_TYPES_EXTERN std::istream& operator>>(std::istream&, Uuid&);
74 QPID_TYPES_EXTERN
size_t hash()
const;
78 size_t operator()(
const Uuid& u)
const {
return u.
hash(); }
82 unsigned char bytes[16];
86 inline size_t hash_value(
const Uuid& uuid) {
return uuid.
hash(); }
89 QPID_TYPES_EXTERN
bool operator==(
const Uuid&,
const Uuid&);
91 QPID_TYPES_EXTERN
bool operator!=(
const Uuid&,
const Uuid&);
93 QPID_TYPES_EXTERN
bool operator<(
const Uuid&,
const Uuid&);
94 QPID_TYPES_EXTERN
bool operator>(
const Uuid&,
const Uuid&);
95 QPID_TYPES_EXTERN
bool operator<=(
const Uuid&,
const Uuid&);
96 QPID_TYPES_EXTERN
bool operator>=(
const Uuid&,
const Uuid&);
99 QPID_TYPES_EXTERN std::ostream& operator<<(std::ostream&,
Uuid);
102 QPID_TYPES_EXTERN std::istream& operator>>(std::istream&,
Uuid&);
QPID_TYPES_EXTERN size_t hash() const