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::SharedLock Class Reference

RAII wrapper for a shared lock. More...

`#include <xmltooling/util/Threads.h>`

## Public Member Functions
| SharedLock (RWLock *lock, bool lockit=true)
| Locks and wraps the designated shared lock. More...
| SharedLock (const std::auto_ptr< RWLock > &lock, bool lockit=true)
| Locks and wraps the designated shared lock. More...
| SharedLock (const boost::scoped_ptr< RWLock > &lock, bool lockit=true)
| Locks and wraps the designated shared lock. More...
| ~SharedLock ()
| Unlocks the wrapped shared lock, if any.
RWLock * | release ()
| Releases control of the original shared lock and returns it without unlocking it. More...

## Detailed Description

RAII wrapper for a shared lock.

## Constructor & Destructor Documentation

xmltooling::SharedLock::SharedLock | ( | RWLock * | lock,
|  | bool | lockit = `true`
| ) |  |
| inline

Locks and wraps the designated shared lock.

Parameters

  lock | lock to acquire
  lockit | true if the lock should be acquired here, false if already acquired

xmltooling::SharedLock::SharedLock | ( | const std::auto_ptr< RWLock > & | lock,
|  | bool | lockit = `true`
| ) |  |
| inline

Locks and wraps the designated shared lock.

Parameters

  lock | lock to acquire
  lockit | true if the lock should be acquired here, false if already acquired

xmltooling::SharedLock::SharedLock | ( | const boost::scoped_ptr< RWLock > & | lock,
|  | bool | lockit = `true`
| ) |  |
| inline

Locks and wraps the designated shared lock.

Parameters

  lock | lock to acquire
  lockit | true if the lock should be acquired here, false if already acquired

## Member Function Documentation

RWLock* xmltooling::SharedLock::release | ( |  | ) |
| inline

Releases control of the original shared lock and returns it without unlocking it.

Returns
  the original shared lock

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

- xmltooling/util/Threads.h