#include <MboSynch.h>
Public Member Functions | |
CMutexImpl () | |
virtual | ~CMutexImpl () |
virtual void | Enter () const |
virtual void | Leave () const |
virtual bool | Try (DWORD nMilliseconds=0) const |
virtual CLock | GetLock () const |
virtual HANDLE | GetHandle () const |
virtual unsigned long | GetLevel () const |
Protected Member Functions | |
virtual IncDecVal | IncEntered () const |
virtual IncDecVal | DecEntered () const |
Protected Attributes | |
IncDecVal | m_lEntered |
This is a wrapper for WIN-API functions and thus invokes functions with a HANDLE.
Definition at line 978 of file MboSynch.h.
mbo::CMutexImpl::CMutexImpl | ( | ) |
Default constructor
virtual mbo::CMutexImpl::~CMutexImpl | ( | ) | [virtual] |
Destructor frees internal resources.
virtual void mbo::CMutexImpl::Enter | ( | ) | const [virtual] |
wait for mutex to be owned and increment ownership counter
Reimplemented from mbo::IMutex.
virtual void mbo::CMutexImpl::Leave | ( | ) | const [virtual] |
decrement ownership of mutex and release if ownership counter has value 0.
Implements mbo::ICriticalSection.
virtual bool mbo::CMutexImpl::Try | ( | DWORD | nMilliseconds = 0 |
) | const [virtual] |
Try to enter the mutex and return true if entered false if not.
nMilliseconds | time to try to enter in milliseconds |
Implements mbo::IMutex.
virtual CLock mbo::CMutexImpl::GetLock | ( | ) | const [virtual] |
Get lock for this mutex
The created lock will be returned as an object. That requires full return by value and invoking copy operators. But that is the only possible solution since we need a local copy that will be destructed locally - the sense of the lock.
Implements mbo::IMutex.
virtual HANDLE mbo::CMutexImpl::GetHandle | ( | ) | const [virtual] |
Internal function used to get the internally used HANDLE.
Reimplemented from mbo::IMutex.
virtual unsigned long mbo::CMutexImpl::GetLevel | ( | ) | const [virtual] |
Implements mbo::ICriticalSection.
virtual IncDecVal mbo::CMutexImpl::IncEntered | ( | ) | const [protected, virtual] |
Inform that the Mutex was entered.
Implements mbo::IMutex.
virtual IncDecVal mbo::CMutexImpl::DecEntered | ( | ) | const [protected, virtual] |
Inform that the Mutex was leaved.
Implements mbo::IMutex.
IncDecVal mbo::CMutexImpl::m_lEntered [mutable, protected] |
number of times Mutex was entered
Definition at line 1031 of file MboSynch.h.
Hosted on code.google.com | © Marcus Börger | Generated on Fri Jan 18 21:21:13 2008 for MBO-lib by ![]() |