14 #ifndef __INLUCDED__SCOPIRA_TOOL_UUID_H_ 15 #define __INLUCDED__SCOPIRA_TOOL_UUID_H_ 17 #include <scopira/tool/export.h> 18 #include <scopira/tool/platform.h> 19 #include <scopira/tool/export.h> 20 #include <scopira/tool/mutex.h> 21 #include <scopira/tool/flow.h> 22 #include <scopira/tool/random.h> 23 #include <scopira/tool/linconrandom.h> 25 #if (defined(PLATFORM_linux) || defined(PLATFORM_osx)) && !defined(PLATFORM_DONT_USE_LIBUUID) 26 #define PLATFORM_E2UUID 29 #ifdef PLATFORM_E2UUID 30 #include <uuid/uuid.h> 49 #ifdef PLATFORM_E2UUID 67 uuid(
void) { ::uuid_clear(dm_id); }
80 void set_zero(
void) { ::uuid_clear(dm_id); }
85 bool is_zero(
void)
const { return ::uuid_is_null(dm_id) != 0; }
88 bool operator == (
const uuid &rhs)
const { return ::uuid_compare(dm_id, rhs.dm_id) == 0; }
90 bool operator != (
const uuid &rhs)
const { return ::uuid_compare(dm_id, rhs.dm_id) != 0; }
92 bool operator < (
const uuid &rhs)
const { return ::uuid_compare(dm_id, rhs.dm_id) < 0; }
110 #ifdef PLATFORM_win32 128 uuid(
void) { dm_id = GUID_NULL; }
141 void set_zero(
void) { dm_id = GUID_NULL; }
146 bool is_zero(
void)
const {
return *
this ==
uuid(); }
149 bool operator == (
const uuid &rhs)
const {
return IsEqualGUID(dm_id, rhs.dm_id) == TRUE; }
151 bool operator != (
const uuid &rhs)
const {
return IsEqualGUID(dm_id, rhs.dm_id) == FALSE; }
161 SCOPIRA_EXPORT std::string
as_string(
void)
const;
171 #if !defined(PLATFORM_E2UUID) && !defined(PLATFORM_win32) 194 SCOPIRA_EXPORT
uuid(
void);
201 SCOPIRA_EXPORT
uuid(
const char *s);
212 SCOPIRA_EXPORT
bool is_zero(
void)
const;
215 SCOPIRA_EXPORT
bool operator == (
const uuid &rhs)
const;
217 SCOPIRA_EXPORT
bool operator != (
const uuid &rhs)
const;
219 SCOPIRA_EXPORT
bool operator < (
const uuid &rhs)
const;
227 SCOPIRA_EXPORT std::string
as_string(
void)
const;
245 #if !defined(PLATFORM_E2UUID) && !defined(PLATFORM_win32) 251 #if !defined(PLATFORM_E2UUID) && !defined(PLATFORM_win32) 258 SCOPIRA_EXPORT
void next(
uuid &out);
Definition: archiveflow.h:20