eq::base::Lockable< D > Class Template Reference

A convenience structure to hold data together with a lock for access. More...

#include <lockable.h>

Inheritance diagram for eq::base::Lockable< D >:
Inheritance graph
[legend]
Collaboration diagram for eq::base::Lockable< D >:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 Lockable ()
 Construct a new lockable data structure.
 Lockable (const D &value)
 Construct and initialize a new data structure.
D * operator-> ()
 Access the held data.
const D * operator-> () const
 Access the held data.
bool operator== (const D &rhs) const
Lockableoperator= (const D &rhs)
 Assign another value to the data.

Public Attributes

data
Lock lock

Detailed Description

template<typename D>
class eq::base::Lockable< D >

A convenience structure to hold data together with a lock for access.

Locking the data still has to be done manually, e.g, using a ScopedMutex.

Definition at line 33 of file lockable.h.


Constructor & Destructor Documentation

template<typename D>
eq::base::Lockable< D >::Lockable (  )  [inline, explicit]

Construct a new lockable data structure.

Version:
1.0

Definition at line 37 of file lockable.h.

template<typename D>
eq::base::Lockable< D >::Lockable ( const D &  value  )  [inline, explicit]

Construct and initialize a new data structure.

Version:
1.0

Definition at line 40 of file lockable.h.


Member Function Documentation

template<typename D>
D* eq::base::Lockable< D >::operator-> (  )  [inline]

Access the held data.

Version:
1.0

Definition at line 43 of file lockable.h.

template<typename D>
const D* eq::base::Lockable< D >::operator-> (  )  const [inline]

Access the held data.

Version:
1.0

Definition at line 46 of file lockable.h.

template<typename D>
bool eq::base::Lockable< D >::operator== ( const D &  rhs  )  const [inline]
Returns:
true if the data is equal to the rhs object.
Version:
1.0

Definition at line 49 of file lockable.h.

template<typename D>
Lockable& eq::base::Lockable< D >::operator= ( const D &  rhs  )  [inline]

Assign another value to the data.

Version:
1.0

Definition at line 52 of file lockable.h.


The documentation for this class was generated from the following file:
Generated on Sat Feb 6 13:08:03 2010 for Equalizer 0.9.1 by  doxygen 1.6.1