Changeset 41187 in vbox for trunk/src/VBox/Main/include
- Timestamp:
- May 7, 2012 3:12:10 PM (13 years ago)
- svn:sync-xref-src-repo-rev:
- 77813
- Location:
- trunk/src/VBox/Main/include
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/include/FramebufferImpl.h
r41184 r41187 7 7 8 8 /* 9 * Copyright (C) 2009 Oracle Corporation9 * Copyright (C) 2009-2012 Oracle Corporation 10 10 * 11 11 * This file is part of VirtualBox Open Source Edition (OSE), as … … 26 26 class ATL_NO_VTABLE Framebuffer : 27 27 public VirtualBoxBase, 28 public VirtualBoxSupportTranslation<Framebuffer>,29 28 VBOX_SCRIPTABLE_IMPL(IFramebuffer) 30 29 { -
trunk/src/VBox/Main/include/VirtualBoxBase.h
r41184 r41187 60 60 //////////////////////////////////////////////////////////////////////////////// 61 61 62 #if !defined 62 #if !defined(VBOX_WITH_XPCOM) 63 63 64 64 #include <atlcom.h> … … 136 136 }; 137 137 138 #endif /* !defined 138 #endif /* !defined(VBOX_WITH_XPCOM) */ 139 139 140 140 //////////////////////////////////////////////////////////////////////////////// … … 156 156 * @param expr Expression which should be true. 157 157 */ 158 #if defined 158 #if defined(DEBUG) 159 159 #define ComAssert(expr) Assert(expr) 160 160 #else … … 179 179 * 180 180 */ 181 #if defined 181 #if defined(DEBUG) 182 182 #define ComAssertFailed() AssertFailed() 183 183 #else … … 199 199 * @param a printf argument list (in parenthesis). 200 200 */ 201 #if defined 201 #if defined(DEBUG) 202 202 #define ComAssertMsg(expr, a) AssertMsg(expr, a) 203 203 #else … … 219 219 * @param vrc VBox status code. 220 220 */ 221 #if defined 221 #if defined(DEBUG) 222 222 #define ComAssertRC(vrc) AssertRC(vrc) 223 223 #else … … 234 234 * @param msg printf argument list (in parenthesis). 235 235 */ 236 #if defined 236 #if defined(DEBUG) 237 237 #define ComAssertMsgRC(vrc, msg) AssertMsgRC(vrc, msg) 238 238 #else … … 248 248 * @param rc COM result code 249 249 */ 250 #if defined 250 #if defined(DEBUG) 251 251 #define ComAssertComRC(rc) AssertComRC(rc) 252 252 #else … … 272 272 /** Special version of ComAssert that returns ret */ 273 273 #define ComAssertFailedRet(ret) \ 274 if (1) { ComAssertFailed(); { return (ret); } } else do {} while (0)274 do { ComAssertFailed(); return (ret); } while (0) 275 275 276 276 … … 280 280 /** Special version of ComAssertMsg that evaluates eval and breaks if expr fails */ 281 281 #define ComAssertMsgBreak(expr, a, eval) \ 282 if (1) 282 if (1) { ComAssertMsg(expr, a); if (!(expr)) { eval; break; } } else do {} while (0) 283 283 /** Special version of ComAssertRC that evaluates eval and breaks if vrc does not succeed */ 284 284 #define ComAssertRCBreak(vrc, eval) \ 285 if (1) 285 if (1) { ComAssertRC(vrc); if (!RT_SUCCESS(vrc)) { eval; break; } } else do {} while (0) 286 286 /** Special version of ComAssertFailed that evaluates eval and breaks */ 287 287 #define ComAssertFailedBreak(eval) \ 288 if (1) 288 if (1) { ComAssertFailed(); { eval; break; } } else do {} while (0) 289 289 /** Special version of ComAssertMsgFailed that evaluates eval and breaks */ 290 290 #define ComAssertMsgFailedBreak(msg, eval) \ 291 if (1) 291 if (1) { ComAssertMsgFailed (msg); { eval; break; } } else do {} while (0) 292 292 /** Special version of ComAssertComRC that evaluates eval and breaks if rc does not succeed */ 293 293 #define ComAssertComRCBreak(rc, eval) \ 294 if (1) 294 if (1) { ComAssertComRC(rc); if (!SUCCEEDED(rc)) { eval; break; } } else do {} while (0) 295 295 /** Special version of ComAssertComRC that just breaks if rc does not succeed */ 296 296 #define ComAssertComRCBreakRC(rc) \ 297 if (1) 297 if (1) { ComAssertComRC(rc); if (!SUCCEEDED(rc)) { break; } } else do {} while (0) 298 298 299 299 300 300 /** Special version of ComAssert that evaluates eval and throws it if expr fails */ 301 301 #define ComAssertThrow(expr, eval) \ 302 if (1) { ComAssert(expr); if (!(expr)) { throw (eval); } } else do {} while (0)302 do { ComAssert(expr); if (!(expr)) { throw (eval); } } while (0) 303 303 /** Special version of ComAssertRC that evaluates eval and throws it if vrc does not succeed */ 304 304 #define ComAssertRCThrow(vrc, eval) \ 305 if (1) { ComAssertRC(vrc); if (!RT_SUCCESS(vrc)) { throw (eval); } } else do {} while (0)305 do { ComAssertRC(vrc); if (!RT_SUCCESS(vrc)) { throw (eval); } } while (0) 306 306 /** Special version of ComAssertComRC that evaluates eval and throws it if rc does not succeed */ 307 307 #define ComAssertComRCThrow(rc, eval) \ 308 if (1) { ComAssertComRC(rc); if (!SUCCEEDED(rc)) { throw (eval); } } else do {} while (0)308 do { ComAssertComRC(rc); if (!SUCCEEDED(rc)) { throw (eval); } } while (0) 309 309 /** Special version of ComAssertComRC that just throws rc if rc does not succeed */ 310 310 #define ComAssertComRCThrowRC(rc) \ 311 if (1) { ComAssertComRC(rc); if (!SUCCEEDED(rc)) { throw rc; } } else do {} while (0)311 do { ComAssertComRC(rc); if (!SUCCEEDED(rc)) { throw rc; } } while (0) 312 312 /** Special version of ComAssert that throws eval */ 313 313 #define ComAssertFailedThrow(eval) \ 314 if (1) { ComAssertFailed(); { throw (eval); } } else do {} while (0)314 do { ComAssertFailed(); { throw (eval); } } while (0) 315 315 316 316 //////////////////////////////////////////////////////////////////////////////// … … 413 413 do { \ 414 414 if (RT_UNLIKELY(!(expr))) \ 415 return setError(E_INVALIDARG, tr 415 return setError(E_INVALIDARG, tr("Argument %s %s"), \ 416 416 #arg, Utf8StrFmt msg .c_str()); \ 417 417 } while (0) … … 427 427 return setError(E_POINTER, \ 428 428 tr("Output argument %s points to invalid memory location (%p)"), \ 429 #arg, (void *) 429 #arg, (void *)(arg)); \ 430 430 } while (0) 431 431 … … 712 712 /** 713 713 * Adds a limited caller. This method is equivalent to doing 714 * <tt>addCaller 714 * <tt>addCaller(aState, true)</tt>, but it is preferred because provides 715 715 * better self-descriptiveness. See #addCaller() for more info. 716 716 */ … … 829 829 * situations. This macro needs to be present inside (better at the very 830 830 * beginning) of the declaration of the class that inherits from 831 * VirtualBox SupportTranslation template, to make lupdate happy.831 * VirtualBoxTranslatable, to make lupdate happy. 832 832 */ 833 833 #define Q_OBJECT … … 849 849 public: 850 850 851 Shareable() : mData 851 Shareable() : mData(NULL), mIsShared(FALSE) {} 852 852 ~Shareable() { free(); } 853 853 … … 943 943 public: 944 944 945 Backupable() : Shareable<D> 945 Backupable() : Shareable<D>(), mBackupData(NULL) {} 946 946 947 947 void free()
Note:
See TracChangeset
for help on using the changeset viewer.