Changeset 35034 in vbox for trunk/src/VBox/Main
- Timestamp:
- Dec 13, 2010 4:41:17 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/include/ConsoleImpl.h
r34906 r35034 313 313 * @sa SafeVMPtr, SafeVMPtrQuiet 314 314 */ 315 typedef AutoVMCallerBase 315 typedef AutoVMCallerBase<false, false> AutoVMCaller; 316 316 317 317 /** … … 320 320 * @note Temporarily locks the argument for writing. 321 321 */ 322 typedef AutoVMCallerBase 322 typedef AutoVMCallerBase<true, false> AutoVMCallerQuiet; 323 323 324 324 /** … … 328 328 * @note Temporarily locks the argument for writing. 329 329 */ 330 typedef AutoVMCallerBase 330 typedef AutoVMCallerBase<false, true> AutoVMCallerWeak; 331 331 332 332 /** … … 337 337 * @note Temporarily locks the argument for writing. 338 338 */ 339 typedef AutoVMCallerBase 339 typedef AutoVMCallerBase<true, true> AutoVMCallerQuietWeak; 340 340 341 341 /** 342 342 * Base template for SaveVMPtr and SaveVMPtrQuiet. 343 343 */ 344 template 345 class SafeVMPtrBase : public AutoVMCallerBase 344 template<bool taQuiet = false> 345 class SafeVMPtrBase : public AutoVMCallerBase<taQuiet, true> 346 346 { 347 typedef AutoVMCallerBase 347 typedef AutoVMCallerBase<taQuiet, true> Base; 348 348 public: 349 349 SafeVMPtrBase(Console *aThat) : Base(aThat), mpVM(NULL) 350 350 { 351 351 if (SUCCEEDED(Base::mRC)) 352 { 352 353 mpVM = aThat->mpVM; 354 if (!mpVM) 355 Base::mRC = E_FAIL; /** @todo use setError here. */ 356 } 353 357 } 354 358 /** Smart SaveVMPtr to PVM cast operator */ … … 381 385 * @sa SafeVMPtrQuiet, AutoVMCaller 382 386 */ 383 typedef SafeVMPtrBase 387 typedef SafeVMPtrBase<false> SafeVMPtr; 384 388 385 389 /** … … 398 402 * @sa SafeVMPtr, AutoVMCaller 399 403 */ 400 typedef SafeVMPtrBase 404 typedef SafeVMPtrBase<true> SafeVMPtrQuiet; 401 405 402 406 class SharedFolderData
Note:
See TracChangeset
for help on using the changeset viewer.