LibreOffice Module unotools (master) 1
Public Member Functions | Private Member Functions | Private Attributes | List of all members
utl::DisposableComponent Class Reference

is a class which controls lifetime of a UNO component via ->XComponent::dispose More...

#include <sharedunocomponent.hxx>

Public Member Functions

 DisposableComponent (const css::uno::Reference< css::uno::XInterface > &_rxComponent)
 constructs a ->DisposableComponent instance More...
 
 ~DisposableComponent ()
 disposes the component represented by the instance More...
 

Private Member Functions

 DisposableComponent (const DisposableComponent &)=delete
 
DisposableComponentoperator= (const DisposableComponent &)=delete
 

Private Attributes

css::uno::Reference< css::lang::XComponent > m_xComponent
 

Detailed Description

is a class which controls lifetime of a UNO component via ->XComponent::dispose

You'll usually never use this class directly, but only as parameter for a ->SharedUNOComponent class.

Definition at line 44 of file sharedunocomponent.hxx.

Constructor & Destructor Documentation

◆ DisposableComponent() [1/2]

utl::DisposableComponent::DisposableComponent ( const css::uno::Reference< css::uno::XInterface > &  _rxComponent)

constructs a ->DisposableComponent instance

Parameters
_rxComponentthe component whose life time should be controlled by the instance. Must not be <NULL>.

◆ ~DisposableComponent()

utl::DisposableComponent::~DisposableComponent ( )

disposes the component represented by the instance

The component is queried for ->XComponent(which must be supported), and ->XComponent::dispose is invoked. A failure of this invocation (e.g. a thrown exception) is silenced in release builds, and reported in debug builds.

Definition at line 51 of file sharedunocomponent.cxx.

References Exception, and TOOLS_WARN_EXCEPTION.

◆ DisposableComponent() [2/2]

utl::DisposableComponent::DisposableComponent ( const DisposableComponent )
privatedelete

Member Function Documentation

◆ operator=()

DisposableComponent & utl::DisposableComponent::operator= ( const DisposableComponent )
privatedelete

Member Data Documentation

◆ m_xComponent

css::uno::Reference< css::lang::XComponent > utl::DisposableComponent::m_xComponent
private

Definition at line 46 of file sharedunocomponent.hxx.


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