13 #if defined(__cplusplus)
14 #if defined(SDK_ARCH_32BITS) && defined(SDK_ARCH_ARM)
22 #if defined(__cplusplus)
26 #define SDK_DECLARE_IID(name) \
27 static const SDK_NAMESPACE::Uuid name##_uuid_ = #name; \
28 inline const SDK_NAMESPACE::Uuid& name::IID() { return name##_uuid_; }
30 #define SDK_IMPLEMENT_IID(name) public: \
31 static const SDK_NAMESPACE::Uuid& IID();
34 #define SDK_END_INTERFACE(name)
37 typedef char UuidChar[48];
38 typedef UuidChar Uuid;
51 #define UuidUInt64(uuid) (reinterpret_cast<SDKUInt64*>(uuid))
52 #define UuidConstUInt64(uuid) (reinterpret_cast<const SDKUInt64*>(uuid))
54 #if defined(__cplusplus)
56 #if defined(SDK_ARCH_32BITS) && defined(SDK_ARCH_ARM)
57 inline bool IsEqualUuid(
const Uuid& uuid1,
const Uuid& uuid2) {
60 return memcmp(&uuid1, &uuid2, SDK_ARRAY_LENGTH(uuid1)) == 0;
65 inline bool IsNullUuid(
const Uuid & uuid) {
66 return memcmp(&uuid, &
UuidNull, SDK_ARRAY_LENGTH(uuid)) == 0;
71 inline void CopyUuid(
const Uuid& uuid1, Uuid& uuid2) {
72 memcpy(&uuid2, &uuid1, SDK_ARRAY_LENGTH(uuid1));
75 inline bool IsEqualUuid(
const Uuid& uuid1,
const Uuid& uuid2) {
78 return ((UuidConstUInt64(uuid1)[0] == UuidConstUInt64(uuid2)[0]) &&
79 (UuidConstUInt64(uuid1)[1] == UuidConstUInt64(uuid2)[1]) &&
80 (UuidConstUInt64(uuid1)[2] == UuidConstUInt64(uuid2)[2]) &&
81 (UuidConstUInt64(uuid1)[3] == UuidConstUInt64(uuid2)[3]) &&
82 (UuidConstUInt64(uuid1)[4] == UuidConstUInt64(uuid2)[4]) &&
83 (UuidConstUInt64(uuid1)[5] == UuidConstUInt64(uuid2)[5]));
87 inline bool IsNullUuid(
const Uuid& uuid) {
88 return ((UuidConstUInt64(uuid)[0] == 0) &&
89 (UuidConstUInt64(uuid)[1] == 0) &&
90 (UuidConstUInt64(uuid)[2] == 0) &&
91 (UuidConstUInt64(uuid)[3] == 0) &&
92 (UuidConstUInt64(uuid)[4] == 0) &&
93 (UuidConstUInt64(uuid)[5] == 0));
98 inline void CopyUuid(
const Uuid& uuid1, Uuid& uuid2) {
99 UuidUInt64(uuid2)[0] = UuidConstUInt64(uuid1)[0];
100 UuidUInt64(uuid2)[1] = UuidConstUInt64(uuid1)[1];
101 UuidUInt64(uuid2)[2] = UuidConstUInt64(uuid1)[2];
102 UuidUInt64(uuid2)[3] = UuidConstUInt64(uuid1)[3];
103 UuidUInt64(uuid2)[4] = UuidConstUInt64(uuid1)[4];
104 UuidUInt64(uuid2)[5] = UuidConstUInt64(uuid1)[5];
110 #if defined(__cplusplus)
114 #endif // SDK_UUID_H_