Equalizer  1.2.1
Public Member Functions | Public Attributes
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.
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 36 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 40 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 43 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.1.5

Definition at line 52 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.1.5

Definition at line 55 of file lockable.h.

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

Access the held data.

Version:
1.0

Definition at line 46 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 49 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 61 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 58 of file lockable.h.


The documentation for this class was generated from the following file:
Generated on Fri Jun 8 2012 15:44:34 for Equalizer 1.2.1 by  doxygen 1.8.0