xmltooling 1.5.6

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- Class List
- Class Hierarchy
- Class Members

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. More...
void | assign (Lockable *lockee=0, bool lock=true)
| Optionally locks an object and stores it for later release. More...
| ~Locker ()
| Destructor releases lock on held pointer, if any.

## Detailed Description

RAII wrapper for lockable objects to ensure lock release.

## Constructor & Destructor Documentation

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

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