Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members

TSE3::Impl::MutexImpl Class Reference

Mutex implementation base class. More...

#include <Mutex.h>

Inheritance diagram for TSE3::Impl::MutexImpl:

Inheritance graph
[legend]
List of all members.

Public Member Functions

virtual ~MutexImpl ()
virtual void lock ()=0
virtual void unlock ()=0
virtual bool locked ()=0

Detailed Description

Mutex implementation base class.

This class provides an abtract interface for a mutex implementation.

The NullMutexImpl class inherits from this base class, and provides a 'null' implementation: performing no lock or unlock operations.

This class provides a way of specifying mutex behaviour in a platform independant manner.

If you want to use TSE3 in a thread-safe manner then you will need to implement a MutexImpl class and pass it to the Mutex class.

A MutexImpl is created in an unlocked state.

Author:
Pete Goodliffe
Version:
3.00
See also:
Mutex


Constructor & Destructor Documentation

virtual TSE3::Impl::MutexImpl::~MutexImpl  )  [inline, virtual]
 


Member Function Documentation

virtual void TSE3::Impl::MutexImpl::lock  )  [pure virtual]
 

Locks the mutex.

If the mutex implementation is already locked by a different thread, then this thread will block until the previous one unlocks the mutex.

A single thread can lock the mutex multiple times. However, subsequent calls to lock have no effect. There must be the same number of calls to unlock before the MutexImpl is unlocked, though.

See also:
unlock

Implemented in TSE3::Impl::NullMutexImpl.

virtual void TSE3::Impl::MutexImpl::unlock  )  [pure virtual]
 

Unlocks the mutex. To unlock the mutex fully, as many unlocks must be called as locks.

If the MutexImpl is already unlocked, then nothing will happen.

See also:
lock

Implemented in TSE3::Impl::NullMutexImpl.

virtual bool TSE3::Impl::MutexImpl::locked  )  [pure virtual]
 

Returns true if the MutexImpl is locked, false otherwise.

See also:
lock

unlock

Implemented in TSE3::Impl::NullMutexImpl.


The documentation for this class was generated from the following file:
Generated on Wed May 25 14:47:59 2005 for TSE3 by doxygen 1.3.2