DWFCore::DWFSemaphore Class Reference
[Platform-specific Class and Function Declarations]

#include "dwfcore/win32/Semaphore.h"

Inheritance diagram for DWFCore::DWFSemaphore:

Inheritance graph
[legend]
Collaboration diagram for DWFCore::DWFSemaphore:

Collaboration graph
[legend]
List of all members.

Detailed Description

A synchronization object for counted, shared resources for Microsoft Windows platforms.

Since:
1.0.1
Note:
This class contains platform-specific data structures but yet still may be used in portable applications via the DWFSynchronization interface.

Definition at line 64 of file win32/Semaphore.h.

Public Member Functions

_DWFCORE_API DWFSemaphore (unsigned int nCount) throw ()
virtual _DWFCORE_API ~DWFSemaphore () throw ()
_DWFCORE_API void init () throw ( DWFException )
_DWFCORE_API void destroy () throw ( DWFException )
_DWFCORE_API void lock () throw ( DWFException )
_DWFCORE_API bool trylock () throw ( DWFException )
_DWFCORE_API void unlock () throw ( DWFException )


Constructor & Destructor Documentation

_DWFCORE_API DWFCore::DWFSemaphore::DWFSemaphore unsigned int  nCount  )  throw ()
 

Constructor

Parameters:
nCount The maximum number of thread locks that can be obtained from the object.
Exceptions:
None 

virtual _DWFCORE_API DWFCore::DWFSemaphore::~DWFSemaphore  )  throw () [virtual]
 

Destructor

Exceptions:
None 


Member Function Documentation

_DWFCORE_API void DWFCore::DWFSemaphore::destroy  )  throw ( DWFException ) [virtual]
 

Destroy the synchronization object. A client must always invoke this method after using this object.

Implements DWFCore::DWFSynchronization.

_DWFCORE_API void DWFCore::DWFSemaphore::init  )  throw ( DWFException ) [virtual]
 

Initialize the synchronization object. A client must always invoke this method before using this object.

Exceptions:
None 

Implements DWFCore::DWFSynchronization.

_DWFCORE_API void DWFCore::DWFSemaphore::lock  )  throw ( DWFException ) [virtual]
 

Blocking call to acquire ownership of the synchronization object.

Exceptions:
DWFException 

Implements DWFCore::DWFSynchronization.

_DWFCORE_API bool DWFCore::DWFSemaphore::trylock  )  throw ( DWFException ) [virtual]
 

Non-blocking call to acquire ownership of the synchronization object. If the object cannot be locked, this method must return immediately.

Returns:
true if the object lock was acquired, false if the call would block waiting for the lock.
Exceptions:
DWFException 

Implements DWFCore::DWFSynchronization.

_DWFCORE_API void DWFCore::DWFSemaphore::unlock  )  throw ( DWFException ) [virtual]
 

Relinquish ownership of the locked synchronization object.

Exceptions:
DWFException 

Implements DWFCore::DWFSynchronization.


The documentation for this class was generated from the following file:
Generated on Tue Jan 6 22:39:44 2009 for Autodesk DWF Core Library by  doxygen 1.4.5