MySQL++ Reference Manual

Main Page Namespace List Class Hierarchy Compound List File List Namespace Members Compound Members File Members

# mysqlpp::Lockable Class Reference

Interface allowing a class to declare itself as "lockable". More...

`#include <lockable.h>`

Inheritance diagram for mysqlpp::Lockable:

[legend]
Collaboration diagram for mysqlpp::Lockable:

[legend]
List of all members.

## Protected Methods
| Lockable (bool locked)
| Default constructor.
virtual | ~Lockable ()
| Destroy object.
virtual bool | lock ()
| Lock the object.
virtual void | unlock ()
| Unlock the object.
bool | locked () const
| Returns true if object is locked.
void | set_lock (bool b)
| Set the lock state. Protected, because this method is only for use by subclass assignment operators and the like.

## Detailed Description

Interface allowing a class to declare itself as "lockable".

A class derives from this one to acquire a standard interface for serializing operations that may not be thread-safe.

## Member Function Documentation

virtual bool mysqlpp::Lockable::lock | ( |  | ) | `[inline, protected, virtual]`

| Lock the object. Returns: true if object was already locked

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

- lockable.h