Inherits DD::Image::BaseLockGuard.
Public Member Functions | |
Guard (Lock &m) | |
Guard (Lock *m) | |
~Guard () | |
Additional Inherited Members | |
Protected Member Functions inherited from DD::Image::BaseLockGuard | |
BaseLockGuard (Lock &m) | |
Protected Attributes inherited from DD::Image::BaseLockGuard | |
Lock & | _lock |
This wrapper class locks a lock in it's constructor, and unlocks it upon destruction. This is convienent if your function has many exit points or you are using exceptions, creating a Guard as a local variable will cause the compiler to insert the unlock call everywhere it is needed.
|
inline |
The constructor calls m.lock()
|
inline |
You can also construct it with a pointer to a lock.
|
inline |
Calls unlock() on the lock passed to the constructor.
©2021 The Foundry Visionmongers, Ltd. All Rights Reserved. |