LibreOffice Module chart2 (master) 1
Public Member Functions | Private Member Functions | Private Attributes | List of all members
apphelper::CloseableLifeTimeManager Class Referencefinal

#include <LifeTime.hxx>

Inheritance diagram for apphelper::CloseableLifeTimeManager:
[legend]
Collaboration diagram for apphelper::CloseableLifeTimeManager:
[legend]

Public Member Functions

 CloseableLifeTimeManager (css::util::XCloseable *pCloseable, css::lang::XComponent *pComponent)
 
virtual ~CloseableLifeTimeManager () override
 
bool impl_isDisposedOrClosed (bool bAssert=true)
 
bool g_close_startTryClose (bool bDeliverOwnership)
 
void g_close_isNeedToCancelLongLastingCalls (bool bDeliverOwnership, css::util::CloseVetoException const &ex)
 
void g_close_endTryClose (bool bDeliverOwnership)
 
void g_close_endTryClose_doClose ()
 
void g_addCloseListener (const css::uno::Reference< css::util::XCloseListener > &xListener)
 
- Public Member Functions inherited from apphelper::LifeTimeManager
 LifeTimeManager (css::lang::XComponent *pComponent)
 
virtual ~LifeTimeManager ()
 
bool impl_isDisposed (bool bAssert=true)
 
bool dispose ()
 

Private Member Functions

virtual bool impl_canStartApiCall () override
 
virtual void impl_apiCallCountReachedNull (std::unique_lock< std::mutex > &rGuard) override
 
void impl_setOwnership (bool bDeliverOwnership, bool bMyVeto)
 
void impl_doClose (std::unique_lock< std::mutex > &rGuard)
 

Private Attributes

css::util::XCloseable * m_pCloseable
 
::osl::Condition m_aEndTryClosingCondition
 
bool volatile m_bClosed
 
bool volatile m_bInTryClose
 
bool volatile m_bOwnership
 

Additional Inherited Members

- Public Attributes inherited from apphelper::LifeTimeManager
std::mutex m_aAccessMutex
 
::comphelper::OInterfaceContainerHelper4< css::util::XCloseListener > m_aCloseListeners
 
::comphelper::OInterfaceContainerHelper4< css::util::XModifyListener > m_aModifyListeners
 
::comphelper::OInterfaceContainerHelper4< css::document::XStorageChangeListener > m_aStorageChangeListeners
 
::comphelper::OInterfaceContainerHelper4< css::lang::XEventListener > m_aEventListeners
 
::comphelper::OInterfaceContainerHelper4< css::view::XSelectionChangeListener > m_aSelectionChangeListeners
 
- Protected Member Functions inherited from apphelper::LifeTimeManager
virtual SAL_DLLPRIVATE bool impl_canStartApiCall ()
 
virtual SAL_DLLPRIVATE void impl_apiCallCountReachedNull (std::unique_lock< std::mutex > &)
 
SAL_DLLPRIVATE void impl_registerApiCall (bool bLongLastingCall)
 
SAL_DLLPRIVATE void impl_unregisterApiCall (std::unique_lock< std::mutex > &rGuard, bool bLongLastingCall)
 
- Protected Attributes inherited from apphelper::LifeTimeManager
css::lang::XComponent * m_pComponent
 
::osl::Condition m_aNoAccessCountCondition
 
sal_Int32 m_nAccessCount
 
bool volatile m_bDisposed
 
bool volatile m_bInDispose
 
::osl::Condition m_aNoLongLastingCallCountCondition
 
sal_Int32 m_nLongLastingCallCount
 

Detailed Description

Definition at line 72 of file LifeTime.hxx.

Constructor & Destructor Documentation

◆ CloseableLifeTimeManager()

apphelper::CloseableLifeTimeManager::CloseableLifeTimeManager ( css::util::XCloseable *  pCloseable,
css::lang::XComponent *  pComponent 
)

Definition at line 155 of file LifeTime.cxx.

References m_aEndTryClosingCondition, m_bClosed, m_bInTryClose, and m_bOwnership.

◆ ~CloseableLifeTimeManager()

apphelper::CloseableLifeTimeManager::~CloseableLifeTimeManager ( )
overridevirtual

Definition at line 166 of file LifeTime.cxx.

Member Function Documentation

◆ g_addCloseListener()

void apphelper::CloseableLifeTimeManager::g_addCloseListener ( const css::uno::Reference< css::util::XCloseListener > &  xListener)

◆ g_close_endTryClose()

void apphelper::CloseableLifeTimeManager::g_close_endTryClose ( bool  bDeliverOwnership)

◆ g_close_endTryClose_doClose()

void apphelper::CloseableLifeTimeManager::g_close_endTryClose_doClose ( )

◆ g_close_isNeedToCancelLongLastingCalls()

void apphelper::CloseableLifeTimeManager::g_close_isNeedToCancelLongLastingCalls ( bool  bDeliverOwnership,
css::util::CloseVetoException const &  ex 
)

◆ g_close_startTryClose()

bool apphelper::CloseableLifeTimeManager::g_close_startTryClose ( bool  bDeliverOwnership)

◆ impl_apiCallCountReachedNull()

void apphelper::CloseableLifeTimeManager::impl_apiCallCountReachedNull ( std::unique_lock< std::mutex > &  rGuard)
overrideprivatevirtual

Reimplemented from apphelper::LifeTimeManager.

Definition at line 297 of file LifeTime.cxx.

References impl_doClose(), m_bOwnership, and m_pCloseable.

◆ impl_canStartApiCall()

bool apphelper::CloseableLifeTimeManager::impl_canStartApiCall ( )
overrideprivatevirtual

◆ impl_doClose()

void apphelper::CloseableLifeTimeManager::impl_doClose ( std::unique_lock< std::mutex > &  rGuard)
private

◆ impl_isDisposedOrClosed()

bool apphelper::CloseableLifeTimeManager::impl_isDisposedOrClosed ( bool  bAssert = true)

Definition at line 170 of file LifeTime.cxx.

References apphelper::LifeTimeManager::impl_isDisposed(), and m_bClosed.

Referenced by g_close_startTryClose().

◆ impl_setOwnership()

void apphelper::CloseableLifeTimeManager::impl_setOwnership ( bool  bDeliverOwnership,
bool  bMyVeto 
)
private

Definition at line 292 of file LifeTime.cxx.

References m_bOwnership.

Referenced by g_close_endTryClose(), and g_close_isNeedToCancelLongLastingCalls().

Member Data Documentation

◆ m_aEndTryClosingCondition

::osl::Condition apphelper::CloseableLifeTimeManager::m_aEndTryClosingCondition
private

◆ m_bClosed

bool volatile apphelper::CloseableLifeTimeManager::m_bClosed
private

◆ m_bInTryClose

bool volatile apphelper::CloseableLifeTimeManager::m_bInTryClose
private

◆ m_bOwnership

bool volatile apphelper::CloseableLifeTimeManager::m_bOwnership
private

◆ m_pCloseable

css::util::XCloseable* apphelper::CloseableLifeTimeManager::m_pCloseable
private

Definition at line 74 of file LifeTime.hxx.

Referenced by g_close_startTryClose(), impl_apiCallCountReachedNull(), and impl_doClose().


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