#include <access.h>
Public Member Functions | |
exclusive_lock (Exclusive *object) | |
Create an instance of an exclusive object reference. | |
~exclusive_lock () | |
Destroy reference to exclusively locked object, release lock. | |
bool | operator! () |
Test if the reference holds an active lock. | |
operator bool () | |
Test if the reference holds an active lock. | |
void | release (void) |
Release a held lock programatically. |
This object initiates an exclusive lock for the object being referenced when it is instanciated, and releases the exclusive lock when it is destroyed. You would pass the pointer an object that has the Exclusive as a base class.
Definition at line 123 of file access.h.
ucc::exclusive_lock::exclusive_lock | ( | Exclusive * | object | ) |
Create an instance of an exclusive object reference.
object | containing Exclusive base class protocol to lock. |
ucc::exclusive_lock::operator bool | ( | ) | [inline] |
bool ucc::exclusive_lock::operator! | ( | ) | [inline] |
void ucc::exclusive_lock::release | ( | void | ) |
Release a held lock programatically.
This can be used to de-reference the object being exclusively locked without having to wait for the destructor to be called when the exclusive_lock falls out of scope.