ParCompMark::Lock Class Reference

#include <PCMLock.h>

Inheritance diagram for ParCompMark::Lock:

Inheritance graph
[legend]
List of all members.

Detailed Description

Lock interface.

Provides lock, trylock and unlock methods.

Definition at line 46 of file PCMLock.h.


Public Member Functions

Constructors & destructor
 Lock ()
 Default constructor.
virtual ~Lock ()
 The destructor.
Getters & setters
const bool & getLocked () const
 Getter of mLocked.
Methods
virtual void lock ()=0
 Lock the lock.
virtual bool trylock ()=0
 Try locking the lock.
virtual void unlock ()=0
 Unlock the lock.

Protected Attributes

Variables
bool mLocked
 Indicates that the lock is locked.

Constructor & Destructor Documentation

ParCompMark::Lock::Lock (  )  [inline]

Default constructor.

Definition at line 177 of file PCMLock.h.

ParCompMark::Lock::~Lock (  )  [inline, virtual]

The destructor.

This class has virtual destructor.

Definition at line 186 of file PCMLock.h.


Member Function Documentation

const bool & ParCompMark::Lock::getLocked (  )  const [inline]

Getter of mLocked.

Returns value of mLocked.

Returns:
The value of mLocked

Definition at line 197 of file PCMLock.h.

Referenced by ParCompMarkTest::TestMutex::test_constructor(), ParCompMarkTest::TestMutex::test_lock(), ParCompMarkTest::TestMutex::test_trylock(), and ParCompMarkTest::TestMutex::test_unlock().

virtual void ParCompMark::Lock::lock (  )  [pure virtual]

Lock the lock.

Implemented in ParCompMark::DummyLock, and ParCompMark::Mutex.

virtual bool ParCompMark::Lock::trylock (  )  [pure virtual]

Try locking the lock.

Returns:
True if the locking was successful.

Implemented in ParCompMark::DummyLock, and ParCompMark::Mutex.

virtual void ParCompMark::Lock::unlock (  )  [pure virtual]

Unlock the lock.

Implemented in ParCompMark::DummyLock, and ParCompMark::Mutex.


Member Data Documentation

bool ParCompMark::Lock::mLocked [protected]

Indicates that the lock is locked.

Remarks:
This is own attribute of this class.

Definition at line 70 of file PCMLock.h.


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