![]() |
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. More... | |
virtual void | lock ()=0 |
Locks the mutex. More... | |
virtual void | unlock ()=0 |
Unlocks the mutex. More... | |
virtual | ~AbstractMutex () |
Destructor. More... | |
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 42 of file AbstractMutex.h.
|
inline |
Constructor.
Definition at line 45 of file AbstractMutex.h.
|
inlinevirtual |
|
pure virtual |
Locks the mutex.
Implemented in MFXMutex.
Referenced by MsgHandler::addRetriever(), MsgHandler::beginProcessMsg(), MsgHandler::cleanupOnEnd(), MsgHandler::clear(), MsgHandler::endProcessMsg(), MsgHandler::inform(), MsgHandler::removeRetriever(), AbstractMutex::ScopedLocker::ScopedLocker(), and ~AbstractMutex().
|
pure virtual |
Unlocks the mutex.
Implemented in MFXMutex.
Referenced by MsgHandler::addRetriever(), MsgHandler::beginProcessMsg(), MsgHandler::cleanupOnEnd(), MsgHandler::clear(), MsgHandler::endProcessMsg(), MsgHandler::inform(), MsgHandler::removeRetriever(), ~AbstractMutex(), and AbstractMutex::ScopedLocker::~ScopedLocker().