Argus Camera Sample Argus Camera Sample

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Private Member Functions | Private Attributes | Friends
ArgusSamples::Mutex Class Reference

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 Member Functions

| Mutex (Mutex &other)
| Hide copy constructor and assignment operator.
const Mutex & | operator= (const Mutex &)
pthread_mutex_t * | getPThreadMutex () const

## Private Attributes

bool | m_initialized
pthread_mutex_t | m_mutex
| pthread mutex, this is 'mutable' so that 'const' functions can be used.

## Friends

class | ConditionVariable

## Detailed Description

Mutex.

Definition at line 44 of file Mutex.h.

## Constructor & Destructor Documentation

ArgusSamples::Mutex::Mutex | ( |  | ) |

Definition at line 35 of file Mutex.cpp.

ArgusSamples::Mutex::~Mutex | ( |  | ) |

Definition at line 40 of file Mutex.cpp.

ArgusSamples::Mutex::Mutex | ( | Mutex & | other | ) |

private

Hide copy constructor and assignment operator.

## Member Function Documentation

pthread_mutex_t* ArgusSamples::Mutex::getPThreadMutex | ( |  | ) | const

inline private

Definition at line 87 of file Mutex.h.

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

friend class ConditionVariable

friend

Definition at line 85 of file Mutex.h.

## Member Data Documentation

bool ArgusSamples::Mutex::m_initialized

private

Definition at line 73 of file Mutex.h.

pthread_mutex_t ArgusSamples::Mutex::m_mutex

mutable private

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:

- common/Mutex.h
- common/Mutex.cpp