ParCompMark::Lock Class Reference
#include <PCMLock.h>
Inheritance diagram for ParCompMark::Lock:
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, virtual] |
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] |
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] |
Member Data Documentation
bool ParCompMark::Lock::mLocked [protected] |
The documentation for this class was generated from the following file: