LibreOffice Module sd (master) 1
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
sd::SimpleReferenceComponent Class Reference

A simple base implementation for reference-counted components. More...

#include <simplereferencecomponent.hxx>

Inheritance diagram for sd::SimpleReferenceComponent:
[legend]

Public Member Functions

 SimpleReferenceComponent ()
 
void acquire ()
 @ATTENTION The results are undefined if, for any individual instance of SimpleReferenceComponent, the total number of calls to acquire() exceeds the total number of calls to release() by a platform dependent amount (which, hopefully, is quite large). More...
 
void release ()
 
void Dispose ()
 
bool isDisposed () const
 

Protected Member Functions

virtual void disposing ()
 
virtual ~SimpleReferenceComponent ()
 

Private Member Functions

 SimpleReferenceComponent (SimpleReferenceComponent const &)=delete
 
void operator= (SimpleReferenceComponent const &)=delete
 

Private Attributes

oslInterlockedCount m_nCount
 
bool mbDisposed
 

Detailed Description

A simple base implementation for reference-counted components.

acts like sal::SimpleReferenceObject but calls the virtual disposing() methods before the ref count switches from 1 to zero.

Definition at line 30 of file simplereferencecomponent.hxx.

Constructor & Destructor Documentation

◆ SimpleReferenceComponent() [1/2]

SimpleReferenceComponent::SimpleReferenceComponent ( )

Definition at line 29 of file simplereferencecomponent.cxx.

References m_nCount.

◆ ~SimpleReferenceComponent()

SimpleReferenceComponent::~SimpleReferenceComponent ( )
protectedvirtual

Definition at line 35 of file simplereferencecomponent.cxx.

References m_nCount, and mbDisposed.

◆ SimpleReferenceComponent() [2/2]

sd::SimpleReferenceComponent::SimpleReferenceComponent ( SimpleReferenceComponent const &  )
privatedelete

Member Function Documentation

◆ acquire()

void SimpleReferenceComponent::acquire ( )

@ATTENTION The results are undefined if, for any individual instance of SimpleReferenceComponent, the total number of calls to acquire() exceeds the total number of calls to release() by a platform dependent amount (which, hopefully, is quite large).

Definition at line 41 of file simplereferencecomponent.cxx.

References m_nCount.

Referenced by sd::MotionPathTag::acquire().

◆ Dispose()

void SimpleReferenceComponent::Dispose ( )

◆ disposing()

void SimpleReferenceComponent::disposing ( )
protectedvirtual

Reimplemented in sd::MotionPathTag, sd::AnnotationTag, sd::FuText, and sd::SmartTag.

Definition at line 70 of file simplereferencecomponent.cxx.

Referenced by Dispose().

◆ isDisposed()

bool sd::SimpleReferenceComponent::isDisposed ( ) const
inline

Definition at line 46 of file simplereferencecomponent.hxx.

References mbDisposed.

◆ operator=()

void sd::SimpleReferenceComponent::operator= ( SimpleReferenceComponent const &  )
privatedelete

◆ release()

void SimpleReferenceComponent::release ( )

Definition at line 43 of file simplereferencecomponent.cxx.

References Dispose(), m_nCount, mbDisposed, and TOOLS_WARN_EXCEPTION.

Referenced by sd::MotionPathTag::release().

Member Data Documentation

◆ m_nCount

oslInterlockedCount sd::SimpleReferenceComponent::m_nCount
private

Definition at line 54 of file simplereferencecomponent.hxx.

Referenced by acquire(), release(), and ~SimpleReferenceComponent().

◆ mbDisposed

bool sd::SimpleReferenceComponent::mbDisposed
private

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