Equalizer 1.0

co::base::Lockable< D, L > Class Template Reference

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

#include <lockable.h>

Inheritance diagram for co::base::Lockable< D, L >:
Collaboration diagram for co::base::Lockable< D, L >:

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

Detailed Description

template<typename D, class L = Lock>
class co::base::Lockable< D, L >

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 34 of file lockable.h.


Constructor & Destructor Documentation

template<typename D, class L = Lock>
co::base::Lockable< D, L >::Lockable ( ) [inline, explicit]

Construct a new lockable data structure.

Version:
1.0

Definition at line 38 of file lockable.h.

template<typename D, class L = Lock>
co::base::Lockable< D, L >::Lockable ( const D &  value) [inline, explicit]

Construct and initialize a new data structure.

Version:
1.0

Definition at line 41 of file lockable.h.


Member Function Documentation

template<typename D, class L = Lock>
D* co::base::Lockable< D, L >::operator-> ( ) [inline]

Access the held data.

Version:
1.0

Definition at line 44 of file lockable.h.

template<typename D, class L = Lock>
const D* co::base::Lockable< D, L >::operator-> ( ) const [inline]

Access the held data.

Version:
1.0

Definition at line 47 of file lockable.h.

template<typename D, class L = Lock>
Lockable& co::base::Lockable< D, L >::operator= ( const D &  rhs) [inline]

Assign another value to the data.

Version:
1.0

Definition at line 53 of file lockable.h.

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

Definition at line 50 of file lockable.h.


The documentation for this class was generated from the following file:
Generated on Sun May 8 2011 19:11:09 for Equalizer 1.0 by  doxygen 1.7.3