The Support Kit Table of Contents | The Support Kit Index |
Derived from: none
Declared in: be/support/Autolock.h
Library: libbe.so
The BAutolock class provides an easy mechanism for automatically locking and unlocking a BLocker object or, more typically, a BLooper. All you need to do is allocate a BAutolock object on the stack and pass it a target BLocker or BLooper. You may want to make sure the lock is in place before proceeding:
BAutolock autolocker(myWindow); if ( autolocker.IsLocked() ) { . . . }
When the stack frame is destroyed, the BAutolock object unlocks the target object and then is itself destroyed.
|
Locks the target looper or locker object.
|
Unlocks the target BLooper or BLocker.
|
Returns true if the target BLooper or BLocker is locked, and false if not.
The Support Kit Table of Contents | The Support Kit Index |
Copyright © 2000 Be, Inc. All rights reserved..