svcore
1.9
|
#include <Serialiser.h>
Public Member Functions | |
Serialiser (QString id) | |
Construct a serialiser that takes the lock associated with the given id. More... | |
Serialiser (QString id, const std::atomic< bool > *cancelled) | |
Construct a cancellable serialiser that takes the lock associated with the given id. More... | |
~Serialiser () | |
Release the lock associated with the given id (if taken, rather than cancelled). More... | |
QString | getId () const |
Protected Attributes | |
QString | m_id |
const std::atomic< bool > * | m_cancelled |
bool | m_locked |
Static Protected Attributes | |
static QMutex | m_mapMutex |
static std::map< QString, QMutex * > | m_mutexMap |
Detailed Description
Definition at line 25 of file Serialiser.h.
Constructor & Destructor Documentation
Serialiser::Serialiser | ( | QString | id | ) |
Construct a serialiser that takes the lock associated with the given id.
That is, the constructor will only complete after all existing serialisers with the given id have been deleted.
Definition at line 27 of file Serialiser.cpp.
Serialiser::Serialiser | ( | QString | id, |
const std::atomic< bool > * | cancelled | ||
) |
Construct a cancellable serialiser that takes the lock associated with the given id.
That is, the constructor will only complete when all existing serialisers with the given id have been deleted, or when the (occasionally polled) bool flag pointed to by cancelled has been found to be true.
Definition at line 30 of file Serialiser.cpp.
References m_cancelled, m_id, m_locked, m_mapMutex, m_mutexMap, and SVCERR.
Serialiser::~Serialiser | ( | ) |
Release the lock associated with the given id (if taken, rather than cancelled).
Definition at line 66 of file Serialiser.cpp.
References m_id, m_locked, m_mapMutex, and m_mutexMap.
Member Function Documentation
|
inline |
Definition at line 50 of file Serialiser.h.
References m_id.
Member Data Documentation
|
protected |
Definition at line 53 of file Serialiser.h.
Referenced by getId(), Serialiser(), and ~Serialiser().
|
protected |
Definition at line 54 of file Serialiser.h.
Referenced by Serialiser().
|
protected |
Definition at line 55 of file Serialiser.h.
Referenced by Serialiser(), and ~Serialiser().
|
staticprotected |
Definition at line 56 of file Serialiser.h.
Referenced by Serialiser(), and ~Serialiser().
|
staticprotected |
Definition at line 57 of file Serialiser.h.
Referenced by Serialiser(), and ~Serialiser().
The documentation for this class was generated from the following files:
Generated by 1.8.11