SUMO - Simulation of Urban MObility
|
An abstract class for encapsulating mutex implementations. More...
#include <AbstractMutex.h>
Data Structures | |
class | ScopedLocker |
A mutex encapsulator which locks/unlocks the given mutex on construction/destruction, respectively. More... |
Public Member Functions | |
AbstractMutex () | |
Constructor. | |
virtual void | lock ()=0 |
Locks the mutex. | |
virtual void | unlock ()=0 |
Unlocks the mutex. | |
virtual | ~AbstractMutex () |
Destructor. |
An abstract class for encapsulating mutex implementations.
This class defines access to a mutex. The implementation may differ.
Within gui-applications, FXMutexes may be used while this is improper for command-line applications. Normally, they do not need mutexes unless a synchronized communication with an external application is established. In these cases, a further class should be implemented.
Definition at line 49 of file AbstractMutex.h.
|
inline |
Constructor.
Definition at line 52 of file AbstractMutex.h.
|
inlinevirtual |
Destructor.
Definition at line 56 of file AbstractMutex.h.
|
pure virtual |
Locks the mutex.
Implemented in MFXMutex.
Referenced by MsgHandler::addRetriever(), MsgHandler::beginProcessMsg(), MsgHandler::cleanupOnEnd(), MsgHandler::clear(), MsgHandler::endProcessMsg(), MsgHandler::inform(), MsgHandler::removeRetriever(), and AbstractMutex::ScopedLocker::ScopedLocker().
|
pure virtual |
Unlocks the mutex.
Implemented in MFXMutex.
Referenced by MsgHandler::addRetriever(), MsgHandler::beginProcessMsg(), MsgHandler::cleanupOnEnd(), MsgHandler::clear(), MsgHandler::endProcessMsg(), MsgHandler::inform(), MsgHandler::removeRetriever(), and AbstractMutex::ScopedLocker::~ScopedLocker().