Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef __XPLC_UUID_H__
00025 #define __XPLC_UUID_H__
00026
00027 #if defined(__GNUC__) && __GNUC__ > 3
00028 # pragma GCC system_header
00029 #endif
00030
00079 #if defined WIN32 || defined SOLARIS
00080 typedef unsigned long u_int32_t;
00081 typedef unsigned short u_int16_t;
00082 typedef unsigned char u_int8_t;
00083 #else
00084 #include <sys/types.h>
00085 #endif
00086
00088 #ifndef GUID_DEFINED
00089 #define GUID_DEFINED
00090
00094 typedef struct _GUID {
00096 u_int32_t Data1;
00097 u_int16_t Data2;
00098 u_int16_t Data3;
00099 u_int8_t Data4[8];
00101 } GUID;
00102 #endif
00103
00104 #ifndef UUID_DEFINED
00105 #define UUID_DEFINED
00106 typedef GUID UUID;
00107 #ifndef uuid_t
00108 #define uuid_t UUID
00109 #endif
00110 #endif
00111
00112
00114 static const UUID UUID_null = {0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}};
00115
00127 template<class T>
00128 struct XPLC_IID {
00129 };
00130
00134 #define DEFINE_IID(iface, u1, u2, u3, u4, u5, u6, u7, u8, u9, u10, u11) \
00135 static const UUID iface##_IID = u1, u2, u3, u4, u5, u6, u7, u8, u9, u10, u11; \
00136 template <> \
00137 struct XPLC_IID<iface> { \
00138 static const UUID& get() { \
00139 return iface##_IID; \
00140 } \
00141 }
00142
00143 #endif