- Main Page
- Namespaces
- Classes
- Files
- Directories
- Related Pages

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# Exponent::Threading::CCriticalSection Class Reference

Inheritance diagram for Exponent::Threading::CCriticalSection:

List of all members.

## Detailed Description

A wrapper around a cross platform critical section.

Date:
  07/08/2005

Author:
  Paul Chana

Version:
  1.0.0 Initial version

Note:
  All contents of this source code are copyright 2005 Exp Digital Uk.
  This source file is covered by the licence conditions of the Infinity API. You should have recieved a copy
  with the source code. If you didnt, please refer to http://www.expdigital.co.uk All content is the Intellectual property of Exp Digital Uk.
  Certain sections of this code may come from other sources. They are credited where applicable.
  If you have comments, suggestions or bug reports please visit http://support.expdigital.co.uk

Id
  CCriticalSection.hpp,v 1.5 2007/02/08 21:06:44 paul Exp

Definition at line 30 of file CCriticalSection.hpp.

## Public Member Functions

- CCriticalSection ()
- void enterCriticalSection (void) const
- void leaveCriticalSection (void) const
- bool tryToEnterCriticalSection (const long spinTimeInMilliseconds) const
- virtual ~CCriticalSection ()

## Protected Attributes

- CRITICAL_SECTION * m_criticalSection

## Constructor & Destructor Documentation

Exponent::Threading::CCriticalSection::CCriticalSection | ( |  | ) |

Construction

virtual Exponent::Threading::CCriticalSection::~CCriticalSection | ( |  | ) | `[virtual]`

Destruction

## Member Function Documentation

void Exponent::Threading::CCriticalSection::enterCriticalSection | ( | void |  | ) | const

Enter the critical section

void Exponent::Threading::CCriticalSection::leaveCriticalSection | ( | void |  | ) | const

Leave a critical section

bool Exponent::Threading::CCriticalSection::tryToEnterCriticalSection | ( | const long | spinTimeInMilliseconds | ) | const

Try to enter a critical section, with a specified wait time

Parameters:

  | spinTimeInMilliseconds | Amount of time to wait between checks to enter critical section

Return values:

  | bool | True if entered correctly, false otherwise

## Member Data Documentation

CRITICAL_SECTION* Exponent::Threading::CCriticalSection::m_criticalSection`[protected]`

The ciritical section

Definition at line 78 of file CCriticalSection.hpp.