A class that allows sharing the same mutex among different objects. More...
Public Member Functions | |
ResourceMutexHolder () | |
Constructor. More... | |
ResourceMutexHolder (const ResourceMutexHolder &other) throw () | |
Copy constructor. More... | |
~ResourceMutexHolder () throw () | |
Destructor. More... | |
QMutex & | operator* () const throw () |
Overload of the dereference operator. More... | |
QMutex * | operator-> () const throw () |
Overload of the dereference operator (->) More... | |
ResourceMutexHolder & | operator= (const ResourceMutexHolder &other) throw () |
Copy operator. More... | |
bool | operator== (const ResourceMutexHolder &other) const throw () |
Comparison operator. More... | |
Detailed Description
A class that allows sharing the same mutex among different objects.
This class takes care of keeping the number of references to the mutex and of deleting it when no one references it anymore. The mutex is always recursive
Definition at line 84 of file resource.h.
Constructor & Destructor Documentation
Constructor.
Definition at line 27 of file resource.cpp.
ResourceMutexHolder | ( | const ResourceMutexHolder & | other | ) | |
throw | ( | ||||
) |
Copy constructor.
Copies of ResourceMutexHolder share the same internal QMutex object
- Parameters
-
other the object to copy
Definition at line 35 of file resource.cpp.
~ResourceMutexHolder | ( | ) | ||
throw | ( | |||
) |
Destructor.
Definition at line 59 of file resource.cpp.
Member Function Documentation
|
inline |
Overload of the dereference operator.
- Returns
- the instance of the the resource mutex
Definition at line 131 of file resource.h.
|
inline |
Overload of the dereference operator (->)
- Returns
- the pointer (the language then knows that that pointer should be dereferenced)
Definition at line 142 of file resource.h.
ResourceMutexHolder & operator= | ( | const ResourceMutexHolder & | other | ) | |
throw | ( | ||||
) |
Copy operator.
Copies of ResourceMutexHolder share the same internal QMutex object
- Parameters
-
other the object to copy
Definition at line 41 of file resource.cpp.
|
inline |
Comparison operator.
Two instances of this class are equal if they refer to the same QMutex object
- Parameters
-
other the object to compare with us
- Returns
- true if this instance is equal to other
Definition at line 121 of file resource.h.
The documentation for this class was generated from the following files:
- configuration/include/resource.h
- configuration/src/resource.cpp