LibreOffice Module sd (master) 1
|
A simple base implementation for reference-counted components. More...
#include <simplereferencecomponent.hxx>
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 |
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.
SimpleReferenceComponent::SimpleReferenceComponent | ( | ) |
Definition at line 29 of file simplereferencecomponent.cxx.
References m_nCount.
|
protectedvirtual |
Definition at line 35 of file simplereferencecomponent.cxx.
References m_nCount, and mbDisposed.
|
privatedelete |
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().
void SimpleReferenceComponent::Dispose | ( | ) |
Definition at line 61 of file simplereferencecomponent.cxx.
References disposing(), and mbDisposed.
Referenced by release(), sd::AnnotationTag::~AnnotationTag(), and sd::MotionPathTag::~MotionPathTag().
|
protectedvirtual |
Reimplemented in sd::MotionPathTag, sd::AnnotationTag, sd::FuText, and sd::SmartTag.
Definition at line 70 of file simplereferencecomponent.cxx.
Referenced by Dispose().
|
inline |
Definition at line 46 of file simplereferencecomponent.hxx.
References mbDisposed.
|
privatedelete |
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().
|
private |
Definition at line 54 of file simplereferencecomponent.hxx.
Referenced by acquire(), release(), and ~SimpleReferenceComponent().
|
private |
Definition at line 59 of file simplereferencecomponent.hxx.
Referenced by Dispose(), isDisposed(), release(), and ~SimpleReferenceComponent().