RTT::OS::MutexTryLock Class Reference

A MutexTryLock tries to lock an Mutex object on construction and if successful, unlocks it on destruction of the MutexTryLock. More...

#include <rtt/os/MutexLock.hpp>

List of all members.

Public Member Functions

 MutexTryLock (OS::MutexInterface &mutex)
 Try to lock a Mutex object.
bool isSuccessful ()
 Return if the locking of the Mutex was succesfull.
 ~MutexTryLock ()
 Releases, if any, a lock on the previously try-locked Mutex.

Protected Attributes

OS::MutexInterface_mutex
 The Mutex to lock and unlock.

Detailed Description

A MutexTryLock tries to lock an Mutex object on construction and if successful, unlocks it on destruction of the MutexTryLock.

Use isSuccessful() to check whether the attempt succeeded.

Definition at line 87 of file MutexLock.hpp.


Constructor & Destructor Documentation

RTT::OS::MutexTryLock::MutexTryLock ( OS::MutexInterface mutex  )  [inline]

Try to lock a Mutex object.

Parameters:
mutex The Mutex which should be attempted to be locked

Definition at line 97 of file MutexLock.hpp.


Member Function Documentation

bool RTT::OS::MutexTryLock::isSuccessful (  )  [inline]

Return if the locking of the Mutex was succesfull.

Returns:
true when the Mutex is locked

Definition at line 107 of file MutexLock.hpp.

Referenced by RTT::DataObjectPriorityGet< T >::Get(), and RTT::DataObjectPrioritySet< T >::Set().


The documentation for this class was generated from the following file:
Generated on Thu Dec 23 13:22:47 2010 for Orocos Real-Time Toolkit by  doxygen 1.6.3