Changeset 32780 in vbox for trunk/include/VBox/com
- Timestamp:
- Sep 27, 2010 7:00:22 PM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 66229
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/com/Guid.h
r30681 r32780 7 7 8 8 /* 9 * Copyright (C) 2006-20 07Oracle Corporation9 * Copyright (C) 2006-2010 Oracle Corporation 10 10 * 11 11 * This file is part of VirtualBox Open Source Edition (OSE), as … … 168 168 } 169 169 170 operator bool() const171 {172 return !isEmpty();173 }174 175 170 bool operator==(const Guid &that) const { return ::RTUuidCompare (&uuid, &that.uuid) == 0; } 176 171 bool operator==(const GUID &guid) const { return ::RTUuidCompare (&uuid, (PRTUUID) &guid) == 0; } … … 180 175 bool operator<(const GUID &guid) const { return ::RTUuidCompare (&uuid, (PRTUUID) &guid) < 0; } 181 176 182 /* to pass instances as IN_GUID parameters to interface methods */ 183 operator const GUID&() const 184 { 185 return *(GUID *) &uuid; 186 } 187 188 /* to directly pass instances to RTPrintf("%RTuuid") */ 189 PRTUUID ptr() 190 { 191 return &uuid; 177 /* to directly copy the contents to a GUID, or for passing it as 178 * an input parameter of type (const GUID *), the compiler converts */ 179 const GUID &ref() const 180 { 181 return *(const GUID *)&uuid; 192 182 } 193 183 194 184 /* to pass instances to printf-like functions */ 195 PCRTUUID raw() const 196 { 197 return &uuid; 198 } 199 200 /* to pass instances to RTUuid*() as a constant argument */ 201 operator const RTUUID*() const 202 { 203 return &uuid; 185 const PCRTUUID raw() const 186 { 187 return (PCRTUUID)&uuid; 204 188 } 205 189 … … 311 295 } 312 296 313 314 /* work around error C2593 of the stupid MSVC 7.x ambiguity resolver */315 WORKAROUND_MSVC7_ERROR_C2593_FOR_BOOL_OP (Guid)316 317 297 } /* namespace com */ 318 298
Note:
See TracChangeset
for help on using the changeset viewer.