mbo::CCriticalSectionImpl Class Reference

Critical Section Implementation. More...

#include <MboSynch.h>

Inheritance diagram for mbo::CCriticalSectionImpl:

Inheritance graph
{mbo::ICriticalSection\n||+ ~ICriticalSection()\l+ Enter()\l+ Leave()\l+ GetLock()\l+ GetLevel()\l}
[legend]
Collaboration diagram for mbo::CCriticalSectionImpl:

Collaboration graph
{mbo::ICriticalSection\n||+ ~ICriticalSection()\l+ Enter()\l+ Leave()\l+ GetLock()\l+ GetLevel()\l}
[legend]

List of all members.

Public Member Functions

 CCriticalSectionImpl ()
virtual ~CCriticalSectionImpl ()
virtual void Enter () const
virtual void Leave () const
virtual CLock GetLock () const
virtual unsigned long GetLevel () const


Detailed Description

Critical Section Implementation.

Definition at line 871 of file MboSynch.h.


Constructor & Destructor Documentation

mbo::CCriticalSectionImpl::CCriticalSectionImpl (  )  [inline]

Construct a Critical Section

Definition at line 877 of file MboSynch.h.

00878     {
00879         InitializeCriticalSection(&m_cs);
00880     }

virtual mbo::CCriticalSectionImpl::~CCriticalSectionImpl (  )  [inline, virtual]

destructor

Definition at line 884 of file MboSynch.h.

00885     {
00886         DeleteCriticalSection(&m_cs);
00887     }


Member Function Documentation

virtual void mbo::CCriticalSectionImpl::Enter (  )  const [inline, virtual]

Enter the lock

Implements mbo::ICriticalSection.

Definition at line 891 of file MboSynch.h.

00892     {
00893         EnterCriticalSection(&m_cs);
00894     }

virtual void mbo::CCriticalSectionImpl::Leave (  )  const [inline, virtual]

Leave the lock

Implements mbo::ICriticalSection.

Definition at line 898 of file MboSynch.h.

00899     {
00900         LeaveCriticalSection(&m_cs);
00901     }

virtual CLock mbo::CCriticalSectionImpl::GetLock (  )  const [inline, virtual]

Get Lock for Critical Section

Returns:
CLockSingle

Implements mbo::ICriticalSection.

Definition at line 906 of file MboSynch.h.

00907     {
00908         return CLock(this);
00909     }

virtual unsigned long mbo::CCriticalSectionImpl::GetLevel (  )  const [inline, 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.

Definition at line 916 of file MboSynch.h.

00917     {
00918         assert((DWORD)m_cs.OwningThread == GetCurrentThreadId() && m_cs.LockCount >= 0);
00919         return static_cast<unsigned long>(m_cs.RecursionCount);
00920     }


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