Public Member Functions | Private Attributes | List of all members
icl_core::logging::ScopedSemaphore Class Reference

Manages locking and unlocking of a mutes. More...

#include <ScopedSemaphore.h>

Inheritance diagram for icl_core::logging::ScopedSemaphore:
Inheritance graph
[legend]

Public Member Functions

bool isDecremented () const
 Check if the semaphore has been successfully decremented. More...
 
 operator bool () const
 Implicit conversion to bool. More...
 
 ScopedSemaphore (Semaphore &semaphore)
 Decrements the semaphore. More...
 
 ~ScopedSemaphore ()
 Increments the semaphore. More...
 

Private Attributes

bool m_is_decremented
 
Semaphorem_semaphore
 

Additional Inherited Members

- Protected Member Functions inherited from icl_core::Noncopyable
 Noncopyable ()
 
virtual ~Noncopyable ()
 

Detailed Description

Manages locking and unlocking of a mutes.

Locks or tries to lock a mutex in the constructor and unlocks it in the destructor.

Definition at line 50 of file ScopedSemaphore.h.

Constructor & Destructor Documentation

icl_core::logging::ScopedSemaphore::ScopedSemaphore ( Semaphore semaphore)
explicit

Decrements the semaphore.

Definition at line 30 of file ScopedSemaphore.cpp.

icl_core::logging::ScopedSemaphore::~ScopedSemaphore ( )

Increments the semaphore.

Definition at line 40 of file ScopedSemaphore.cpp.

Member Function Documentation

bool icl_core::logging::ScopedSemaphore::isDecremented ( ) const
inline

Check if the semaphore has been successfully decremented.

Definition at line 60 of file ScopedSemaphore.h.

icl_core::logging::ScopedSemaphore::operator bool ( ) const
inline

Implicit conversion to bool.

Definition at line 63 of file ScopedSemaphore.h.

Member Data Documentation

bool icl_core::logging::ScopedSemaphore::m_is_decremented
private

Definition at line 78 of file ScopedSemaphore.h.

Semaphore& icl_core::logging::ScopedSemaphore::m_semaphore
private

Definition at line 77 of file ScopedSemaphore.h.


The documentation for this class was generated from the following files:


fzi_icl_core
Author(s):
autogenerated on Mon Jun 10 2019 13:17:59