LibreOffice
LibreOffice 24.8 SDK C/C++ API Reference
 
Loading...
Searching...
No Matches
osl::ClearableGuard< T > Class Template Reference

Object lifetime scoped mutex object or interface lock with unlock. More...

#include <mutex.hxx>

Inheritance diagram for osl::ClearableGuard< T >:
osl::ResettableGuard< T >

Public Member Functions

 ClearableGuard (T *pT_)
 Acquires the object specified as parameter.
 
 ClearableGuard (T &t)
 Acquires the object specified as parameter.
 
 ~ClearableGuard ()
 Releases the mutex or interface if not already released by clear().
 
void clear ()
 Releases the mutex or interface.
 

Protected Attributes

T * pT
 

Detailed Description

template<class T>
class osl::ClearableGuard< T >

Object lifetime scoped mutex object or interface lock with unlock.

Use this if you can't use scoped code blocks and Guard.

See also
ClearableMutexGuard, Guard

Constructor & Destructor Documentation

◆ ClearableGuard() [1/2]

template<class T>
osl::ClearableGuard< T >::ClearableGuard ( T * pT_)
inline

Acquires the object specified as parameter.

◆ ClearableGuard() [2/2]

template<class T>
osl::ClearableGuard< T >::ClearableGuard ( T & t)
inline

Acquires the object specified as parameter.

◆ ~ClearableGuard()

template<class T>
osl::ClearableGuard< T >::~ClearableGuard ( )
inline

Releases the mutex or interface if not already released by clear().

Member Function Documentation

◆ clear()

template<class T>
void osl::ClearableGuard< T >::clear ( )
inline

Releases the mutex or interface.

Member Data Documentation

◆ pT

template<class T>
T* osl::ClearableGuard< T >::pT
protected

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