Thread portable class


Gate portable class


Timer class


Pool class


Terimber 2.0


About C++


Downloads Products & Services Support Clients Open Source About



Home / Open source / Terimber 2.0

mutex Class Reference

class supports mutex More...

#include <primitives.h>

List of all members.

Public Types

typedef CRITICAL_SECTION _HANDLE_

Public Member Functions

 mutex ()
 constructor
 ~mutex ()
 destructor
bool lock () const
 locks mutex NB!!! can be used in the const member function
void unlock () const
 unlocks mutex NB!!! can be used in the const member function
bool trylock () const
 tries to locks mutex NB!!! can be used in the const member function
 operator _HANDLE_ * ()
 operator const _HANDLE_ * () const
 returns const handle

Private Member Functions

 mutex (const mutex &x)
 copy constructor
mutexoperator= (const mutex &x)
 assign operator

Private Attributes

_HANDLE_ _handle
 handle of mutex resource


Detailed Description

class supports mutex

Definition at line 40 of file primitives.h.


Member Typedef Documentation

typedef CRITICAL_SECTION mutex::_HANDLE_

Definition at line 51 of file primitives.h.


Constructor & Destructor Documentation

mutex::mutex ( const mutex x  )  [private]

copy constructor

BEGIN_TERIMBER_NAMESPACE mutex::mutex (  ) 

constructor

Definition at line 55 of file primitives.cpp.

References _handle.

mutex::~mutex (  ) 

destructor

Definition at line 68 of file primitives.cpp.

References _handle.


Member Function Documentation

mutex& mutex::operator= ( const mutex x  )  [private]

assign operator

bool mutex::lock (  )  const

locks mutex NB!!! can be used in the const member function

Definition at line 79 of file primitives.cpp.

References _handle.

Referenced by mutex_keeper::lock(), keylocker::lock(), and mutex_keeper::mutex_keeper().

void mutex::unlock (  )  const

unlocks mutex NB!!! can be used in the const member function

Definition at line 92 of file primitives.cpp.

References _handle.

Referenced by keylocker::lock(), mutex_keeper::unlock(), keylocker::unlock(), and mutex_keeper::~mutex_keeper().

bool mutex::trylock (  )  const

tries to locks mutex NB!!! can be used in the const member function

Definition at line 103 of file primitives.cpp.

References _handle.

Referenced by mutex_keeper::mutex_keeper().

mutex::operator _HANDLE_ * (  )  [inline]

Definition at line 72 of file primitives.h.

References _handle.

mutex::operator const _HANDLE_ * (  )  const [inline]

returns const handle

Definition at line 77 of file primitives.h.

References _handle.


Member Data Documentation

_HANDLE_ mutex::_handle [mutable, private]

handle of mutex resource

Definition at line 82 of file primitives.h.

Referenced by lock(), mutex(), operator _HANDLE_ *(), operator const _HANDLE_ *(), trylock(), unlock(), and ~mutex().


The documentation for this class was generated from the following files:


© Copyright Terimber 2003-.