Mutex.
More...
#include <Mutex.h>
List of all members.
Public Member Functions |
| Mutex () |
| ~Mutex () |
bool | initialize () |
| Create the underlying mutex.
|
bool | shutdown () |
| Destroy the underlying mutex.
|
bool | lock () const |
| Lock the mutex.
|
bool | unlock () const |
| Unlock the mutex.
|
Private Attributes |
bool | m_initialized |
pthread_mutex_t | m_mutex |
| pthread mutex, this is 'mutable' so that 'const' functions can be used.
|
Detailed Description
Mutex.
Definition at line 44 of file Mutex.h.
Constructor & Destructor Documentation
ArgusSamples::Mutex::Mutex |
( |
| ) |
|
ArgusSamples::Mutex::~Mutex |
( |
| ) |
|
ArgusSamples::Mutex::Mutex |
( |
Mutex & |
other | ) |
|
|
private |
Hide copy constructor and assignment operator.
Member Function Documentation
pthread_mutex_t* ArgusSamples::Mutex::getPThreadMutex |
( |
| ) |
const |
|
inlineprivate |
bool ArgusSamples::Mutex::initialize |
( |
| ) |
|
Create the underlying mutex.
This method must be called before any other methods.
Definition at line 45 of file Mutex.cpp.
bool ArgusSamples::Mutex::lock |
( |
| ) |
const |
Lock the mutex.
This method is declared const
for convenience.
Definition at line 69 of file Mutex.cpp.
const Mutex& ArgusSamples::Mutex::operator= |
( |
const Mutex & |
| ) |
|
|
private |
bool ArgusSamples::Mutex::shutdown |
( |
| ) |
|
Destroy the underlying mutex.
After this call, this object can no longer be used (until and unless a future call to initialize()
). Calling this method if the object is not initialized generates no error, but silently returns.
Definition at line 57 of file Mutex.cpp.
bool ArgusSamples::Mutex::unlock |
( |
| ) |
const |
Unlock the mutex.
This method is declared const
for convenience.
Definition at line 80 of file Mutex.cpp.
Friends And Related Function Documentation
Member Data Documentation
bool ArgusSamples::Mutex::m_initialized |
|
private |
pthread_mutex_t ArgusSamples::Mutex::m_mutex |
|
mutableprivate |
pthread mutex, this is 'mutable' so that 'const' functions can be used.
Definition at line 77 of file Mutex.h.
The documentation for this class was generated from the following files: