mbo::MutexList Class Reference

MutexList implementation. More...

#include <MboSynch.h>

Inheritance diagram for mbo::MutexList:

Inheritance graph
{mbo::IMutex\n||+ Enter()\l+ Try()\l+ GetLock()\l# GetHandle()\l# IncEntered()\l# DecEntered()\l}{mbo::ICriticalSection\n||+ ~ICriticalSection()\l+ Enter()\l+ Leave()\l+ GetLock()\l+ GetLevel()\l}
[legend]
Collaboration diagram for mbo::MutexList:

Collaboration graph
{mbo::IMutex\n||+ Enter()\l+ Try()\l+ GetLock()\l# GetHandle()\l# IncEntered()\l# DecEntered()\l}{mbo::ICriticalSection\n||+ ~ICriticalSection()\l+ Enter()\l+ Leave()\l+ GetLock()\l+ GetLevel()\l}
[legend]

List of all members.

Public Member Functions

 MutexList ()
virtual ~MutexList ()
virtual void Enter () const
virtual void Leave () const
virtual bool Try (DWORD nMilliseconds=0) const
virtual CLock GetLock () const
virtual unsigned long GetLevel () const

Protected Member Functions

virtual IncDecVal IncEntered () const
virtual IncDecVal DecEntered () const


Detailed Description

MutexList implementation.

This class collects MutexEntry instances which implement the IMutex interface. These lists are used internally be CLockMulti.

Note:
This class is distributed under the following license GNU Lesser General Public License, version 2.1.

Definition at line 1105 of file MboSynch.h.


Constructor & Destructor Documentation

mbo::MutexList::MutexList (  ) 

constructor

virtual mbo::MutexList::~MutexList (  )  [virtual]

destructor


Member Function Documentation

virtual void mbo::MutexList::Enter (  )  const [virtual]

Enter all mutexes (enter critical section)

Reimplemented from mbo::IMutex.

virtual void mbo::MutexList::Leave (  )  const [virtual]

Leave all mutexes (leave critical section)

Implements mbo::ICriticalSection.

virtual bool mbo::MutexList::Try ( DWORD  nMilliseconds = 0  )  const [virtual]

Try to enter all Mutexes in the list

When the all mutexes were entered the return value is true.

Parameters:
nMilliseconds time to try to enter in milliseconds
Returns:
whether or not all mutexes were entered

Implements mbo::IMutex.

virtual CLock mbo::MutexList::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.

Returns:
Lock for this Mutex

Implements mbo::IMutex.

virtual unsigned long mbo::MutexList::GetLevel (  )  const [virtual]

Returns:
Number of times CriticalSection is entered
Note:
This is only valie when the CriticalSection/Mutex is owned by the current thread.

Implements mbo::ICriticalSection.

virtual IncDecVal mbo::MutexList::IncEntered (  )  const [protected, virtual]

Inform that all mutexes were entered.

Implements mbo::IMutex.

virtual IncDecVal mbo::MutexList::DecEntered (  )  const [protected, virtual]

Inform that all mutexes were leaved.

Implements mbo::IMutex.


The documentation for this class was generated from the following file:
  Hosted on code.google.com  
© Marcus Börger
Generated on Fri Jan 18 21:21:13 2008 for MBO-lib by doxygen 1.5.4