LibreOffice: cppu::OWeakObject Class Reference

LibreOffice LibreOffice 5.2 SDK C/C++ API Reference

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
cppu::OWeakObject Class Reference

Base class to implement an UNO object supporting weak references, i.e. More...

`#include <weak.hxx>`

Inheritance diagram for cppu::OWeakObject:

## Public Member Functions
| OWeakObject ()
| Default Constructor. More...
| OWeakObject (const OWeakObject &rObj)
| Dummy copy constructor. More...
OWeakObject & | operator= (const OWeakObject &)
| Dummy assignment operator. More...
virtual css::uno::Any | queryInterface (const css::uno::Type &rType) SAL_OVERRIDE throw (css::uno::RuntimeException, std::exception)
| Basic queryInterface() implementation supporting com::sun::star::uno::XWeak and com::sun::star::uno::XInterface. More...
virtual void | acquire () SAL_OVERRIDE throw ()
| increasing m_refCount More...
virtual void | release () SAL_OVERRIDE throw ()
| decreasing m_refCount More...
virtual css::uno::Reference< css::uno::XAdapter > | queryAdapter () SAL_OVERRIDE throw (css::uno::RuntimeException, std::exception)
| XWeak::queryAdapter() implementation. More...
| operator css::uno::Reference< css::uno::XInterface > ()
| Cast operator to XInterface reference. More...

## Protected Member Functions
virtual | ~OWeakObject ()
| Virtual dtor. More...
void | disposeWeakConnectionPoint ()
| disposes and resets m_pWeakConnectionPoint More...

## Protected Attributes
oslInterlockedCount | m_refCount
| reference count. More...

## Friends
class | OWeakConnectionPoint

## Detailed Description

Base class to implement an UNO object supporting weak references, i.e.

the object can be held weakly (by a css::uno::WeakReference). This implementation copes with reference counting. Upon last release(), the virtual dtor is called.

Derive:

Inherit from this class and delegate acquire()/ release() calls.

## Constructor & Destructor Documentation

virtual cppu::OWeakObject::~OWeakObject | ( |  | ) |
| protectedvirtual

Virtual dtor.

Attention
  Despite the fact that a RuntimeException is allowed to be thrown, you must not throw any exception upon destruction!

cppu::OWeakObject::OWeakObject | ( |  | ) |
| inline

Default Constructor.

Sets the reference count to zero.

cppu::OWeakObject::OWeakObject | ( | const OWeakObject & | rObj | ) |
| inline

Dummy copy constructor.

Set the reference count to zero.

Parameters

  rObj | dummy param

## Member Function Documentation

virtual void cppu::OWeakObject::acquire | ( |  | ) |
throw | ( |
| ) |  |
| virtual

increasing m_refCount

Reimplemented in cppu::WeakAggImplHelper13< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12, Ifc13 >, cppu::WeakAggImplHelper12< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12 >, cppu::WeakAggImplHelper11< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11 >, cppu::WeakAggImplHelper10< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10 >, cppu::WeakAggImplHelper9< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9 >, cppu::WeakAggImplHelper8< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8 >, cppu::WeakAggImplHelper7< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7 >, cppu::WeakAggImplHelper6< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6 >, cppu::WeakAggImplHelper5< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5 >, cppu::WeakAggImplHelper1< Ifc1 >, cppu::WeakAggImplHelper4< Ifc1, Ifc2, Ifc3, Ifc4 >, cppu::WeakAggImplHelper3< Ifc1, Ifc2, Ifc3 >, cppu::WeakAggImplHelper2< Ifc1, Ifc2 >, cppu::WeakImplHelper13< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12, Ifc13 >, cppu::WeakImplHelper12< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12 >, cppu::WeakImplHelper11< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11 >, cppu::WeakImplHelper10< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10 >, cppu::WeakImplHelper9< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9 >, cppu::WeakImplHelper8< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8 >, cppu::WeakImplHelper7< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7 >, cppu::WeakImplHelper6< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6 >, cppu::WeakImplHelper5< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5 >, cppu::WeakImplHelper1< Ifc1 >, cppu::WeakImplHelper4< Ifc1, Ifc2, Ifc3, Ifc4 >, cppu::WeakImplHelper3< Ifc1, Ifc2, Ifc3 >, cppu::WeakImplHelper2< Ifc1, Ifc2 >, cppu::OComponentHelper, and cppu::OWeakAggObject.

void cppu::OWeakObject::disposeWeakConnectionPoint | ( |  | ) |
| protected

disposes and resets m_pWeakConnectionPoint

Precondition
  m_refCount equals 0

cppu::OWeakObject::operator css::uno::Reference< css::uno::XInterface > | ( |  | ) |
| inline

Cast operator to XInterface reference.

Returns
  XInterface reference

OWeakObject& cppu::OWeakObject::operator= | ( | const OWeakObject & |  | ) |
| inline

Dummy assignment operator.

Does not affect reference count.

Returns
  this OWeakObject

virtual css::uno::Reference< css::uno::XAdapter > cppu::OWeakObject::queryAdapter | ( |  | ) |
throw | ( | css::uno::RuntimeException,
|  | std::exception
| ) |  |
| virtual

XWeak::queryAdapter() implementation.

Returns
  a com::sun::star::uno::XAdapter reference

virtual css::uno::Any cppu::OWeakObject::queryInterface | ( | const css::uno::Type & | rType | ) |
throw | ( | css::uno::RuntimeException,
|  | std::exception
| ) |  |
| virtual

Basic queryInterface() implementation supporting com::sun::star::uno::XWeak and com::sun::star::uno::XInterface.

Parameters

  rType | demanded type

Returns
  demanded type or empty any

Reimplemented in cppu::WeakAggImplHelper13< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12, Ifc13 >, cppu::WeakAggImplHelper12< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12 >, cppu::WeakAggImplHelper11< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11 >, cppu::WeakAggImplHelper10< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10 >, cppu::WeakAggImplHelper9< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9 >, cppu::WeakAggImplHelper8< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8 >, cppu::WeakAggImplHelper7< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7 >, cppu::WeakAggImplHelper6< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6 >, cppu::WeakAggImplHelper5< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5 >, cppu::WeakAggImplHelper1< Ifc1 >, cppu::WeakAggImplHelper4< Ifc1, Ifc2, Ifc3, Ifc4 >, cppu::WeakAggImplHelper3< Ifc1, Ifc2, Ifc3 >, cppu::WeakAggImplHelper2< Ifc1, Ifc2 >, cppu::WeakImplHelper13< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12, Ifc13 >, cppu::WeakImplHelper12< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12 >, cppu::WeakImplHelper11< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11 >, cppu::WeakImplHelper10< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10 >, cppu::WeakImplHelper9< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9 >, cppu::WeakImplHelper8< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8 >, cppu::WeakImplHelper7< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7 >, cppu::WeakImplHelper6< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6 >, cppu::WeakImplHelper5< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5 >, cppu::WeakImplHelper1< Ifc1 >, cppu::WeakImplHelper4< Ifc1, Ifc2, Ifc3, Ifc4 >, cppu::WeakImplHelper3< Ifc1, Ifc2, Ifc3 >, cppu::WeakImplHelper2< Ifc1, Ifc2 >, cppu::OWeakAggObject, and cppu::OComponentHelper.

virtual void cppu::OWeakObject::release | ( |  | ) |
throw | ( |
| ) |  |
| virtual

decreasing m_refCount

Reimplemented in cppu::WeakAggImplHelper13< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12, Ifc13 >, cppu::WeakAggImplHelper12< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12 >, cppu::WeakAggImplHelper11< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11 >, cppu::WeakAggImplHelper10< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10 >, cppu::WeakAggImplHelper9< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9 >, cppu::WeakAggImplHelper8< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8 >, cppu::WeakAggImplHelper7< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7 >, cppu::WeakAggImplHelper6< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6 >, cppu::WeakAggImplHelper5< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5 >, cppu::WeakAggImplHelper1< Ifc1 >, cppu::WeakAggImplHelper4< Ifc1, Ifc2, Ifc3, Ifc4 >, cppu::WeakAggImplHelper3< Ifc1, Ifc2, Ifc3 >, cppu::WeakAggImplHelper2< Ifc1, Ifc2 >, cppu::WeakImplHelper13< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12, Ifc13 >, cppu::WeakImplHelper12< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12 >, cppu::WeakImplHelper11< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11 >, cppu::WeakImplHelper10< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10 >, cppu::WeakImplHelper9< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9 >, cppu::WeakImplHelper8< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8 >, cppu::WeakImplHelper7< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7 >, cppu::WeakImplHelper6< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6 >, cppu::WeakImplHelper5< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5 >, cppu::WeakImplHelper1< Ifc1 >, cppu::WeakImplHelper4< Ifc1, Ifc2, Ifc3, Ifc4 >, cppu::WeakImplHelper3< Ifc1, Ifc2, Ifc3 >, cppu::WeakImplHelper2< Ifc1, Ifc2 >, cppu::OComponentHelper, and cppu::OWeakAggObject.

## Friends And Related Function Documentation

friend class OWeakConnectionPoint
| friend

## Member Data Documentation

oslInterlockedCount cppu::OWeakObject::m_refCount
| protected

reference count.

Attention
  Don't modify manually! Use acquire() and release().

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

- cppuhelper/weak.hxx