00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034 #ifndef __XPLC_UUIDOPS_H__
00035 #define __XPLC_UUIDOPS_H__
00036
00037 #include <xplc/uuid.h>
00038
00039 #if !defined _SYS_GUID_OPERATOR_EQ_ && !defined _NO_SYS_GUID_OPERATOR_EQ_
00040 #define _SYS_GUID_OPERATOR_EQ_
00041
00045 inline int operator==(const UUID& uuid1, const UUID& uuid2) {
00046 return
00047 (&uuid1 == &uuid2) ||
00048 ((static_cast<const unsigned long*>(&uuid1.Data1)[0] == static_cast<const unsigned long*>(&uuid2.Data1)[0]) &&
00049 (static_cast<const unsigned long*>(&uuid1.Data1)[1] == static_cast<const unsigned long*>(&uuid2.Data1)[1]) &&
00050 (static_cast<const unsigned long*>(&uuid1.Data1)[2] == static_cast<const unsigned long*>(&uuid2.Data1)[2]) &&
00051 (static_cast<const unsigned long*>(&uuid1.Data1)[3] == static_cast<const unsigned long*>(&uuid2.Data1)[3]));
00052 }
00053
00057 inline int operator!=(const UUID& uuid1, const UUID& uuid2) {
00058 return
00059 (&uuid1 != &uuid2) &&
00060 ((static_cast<const unsigned long*>(&uuid1.Data1)[0] != static_cast<const unsigned long*>(&uuid2.Data1)[0]) ||
00061 (static_cast<const unsigned long*>(&uuid1.Data1)[1] != static_cast<const unsigned long*>(&uuid2.Data1)[1]) ||
00062 (static_cast<const unsigned long*>(&uuid1.Data1)[2] != static_cast<const unsigned long*>(&uuid2.Data1)[2]) ||
00063 (static_cast<const unsigned long*>(&uuid1.Data1)[3] != static_cast<const unsigned long*>(&uuid2.Data1)[3]));
00064 }
00065
00066 #endif
00067
00076 const UUID UuidFromString(const char* str);
00077
00086 char* UuidToString(const UUID& uuid, char* str);
00087
00088 #endif