Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class 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:

Inheritance graph
[legend]
Collaboration diagram for mysqlpp::Lockable:

Collaboration graph
[legend]
List of all members.

Protected Member Functions

 Lockable (bool is_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:
Generated on Wed Jul 11 15:35:21 2007 for MySQL++ by doxygen 1.3.5