LibreOffice Module comphelper (master) 1
Public Member Functions | List of all members
comphelper::OContextEntryGuard Class Reference

helper class for guarding the entry into OCommonAccessibleComponent methods. More...

#include <accessiblecontexthelper.hxx>

Inheritance diagram for comphelper::OContextEntryGuard:
[legend]
Collaboration diagram for comphelper::OContextEntryGuard:
[legend]

Public Member Functions

 OContextEntryGuard (OCommonAccessibleComponent *_pContext)
 constructs the guard More...
 

Detailed Description

helper class for guarding the entry into OCommonAccessibleComponent methods.

The class has two responsibilities:


This makes it your first choice (hopefully :) for guarding any interface method implementations of you derived class.

Definition at line 45 of file accessiblecontexthelper.hxx.

Constructor & Destructor Documentation

◆ OContextEntryGuard()

comphelper::OContextEntryGuard::OContextEntryGuard ( OCommonAccessibleComponent _pContext)
inline

constructs the guard

The given context (it's mutex, respectively) is locked, and an exception is thrown if the context is not alive anymore. In the latter case, of course, the mutex is freed, again.

Parameters
_pContextthe context which shall be guarded @precond <arg>_pContext</arg> != NULL

Definition at line 61 of file accessiblecontexthelper.hxx.

References comphelper::OCommonAccessibleComponent::ensureAlive().


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