00001 #ifndef PROTON_UUID_HPP
00002 #define PROTON_UUID_HPP
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #include "./internal/export.hpp"
00026 #include "./byte_array.hpp"
00027
00028 #include <string>
00029 #include <iosfwd>
00030
00033
00034 namespace proton {
00035
00037 class uuid : public byte_array<16> {
00038 public:
00040 PN_CPP_EXTERN static uuid copy();
00041
00044 PN_CPP_EXTERN static uuid copy(const char* bytes);
00045
00052 PN_CPP_EXTERN static uuid random();
00053
00056 PN_CPP_EXTERN std::string str() const;
00057 };
00058
00061 PN_CPP_EXTERN std::ostream& operator<<(std::ostream&, const uuid&);
00062
00065 inline std::string to_string(const uuid& u) { return u.str(); }
00066
00067 }
00068
00069 #endif // PROTON_UUID_HPP