xmltooling 3.2.4

Public Member Functions | List of all members
xmltooling::Locker Class Reference

RAII wrapper for lockable objects to ensure lock release. More...

`#include <xmltooling/Lockable.h>`

## Public Member Functions
| Locker (Lockable *lockee=0, bool lock=true)
| Optionally locks an object and stores it for later release.
void | assign (Lockable *lockee=0, bool lock=true)
| Optionally locks an object and stores it for later release.
| ~Locker ()
| Destructor releases lock on held pointer, if any.

## Detailed Description

RAII wrapper for lockable objects to ensure lock release.

## Constructor & Destructor Documentation

## ◆ Locker()

xmltooling::Locker::Locker | ( | Lockable * | lockee = 0,
|  | bool | lock = true )

Optionally locks an object and stores it for later release.

Parameters

  lockee | pointer to an object to hold, and optionally lock
  lock | true iff object is not yet locked

## Member Function Documentation

## ◆ assign()

void xmltooling::Locker::assign | ( | Lockable * | lockee = 0,
|  | bool | lock = true )

Optionally locks an object and stores it for later release.

If an object is already held, it is unlocked and detached.

Parameters

  lockee | pointer to an object to hold, and optionally lock
  lock | true iff object is not yet locked

The documentation for this class was generated from the following file:

- xmltooling/Lockable.h