LibreOffice Module tools (master) 1
Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
tools::WeakBase Class Reference

derive your implementation classes from this class if you want them to support weak references More...

#include <weakbase.h>

Collaboration diagram for tools::WeakBase:
[legend]

Public Member Functions

 WeakBase ()
 
virtual ~WeakBase ()
 
void clearWeak ()
 clears the reference pointer in all living weak references for this instance. More...
 

Private Member Functions

WeakConnectiongetWeakConnection ()
 

Private Attributes

rtl::Reference< WeakConnectionmpWeakConnection
 

Friends

template<typename T >
class WeakReference
 

Detailed Description

derive your implementation classes from this class if you want them to support weak references

Definition at line 135 of file weakbase.h.

Constructor & Destructor Documentation

◆ WeakBase()

tools::WeakBase::WeakBase ( )
inline

Definition at line 140 of file weakbase.h.

◆ ~WeakBase()

tools::WeakBase::~WeakBase ( )
virtual

Definition at line 25 of file ref.cxx.

References mpWeakConnection.

Member Function Documentation

◆ clearWeak()

void tools::WeakBase::clearWeak ( )
inline

clears the reference pointer in all living weak references for this instance.

Further created weak references will also be invalid. You should call this method in the d'tor of your derived classes for an early invalidate of all living weak references while your object is already inside it d'tor.

Definition at line 145 of file weakbase.hxx.

References mpWeakConnection.

◆ getWeakConnection()

WeakConnection * tools::WeakBase::getWeakConnection ( )
inlineprivate

Definition at line 151 of file weakbase.hxx.

References mpWeakConnection.

Friends And Related Function Documentation

◆ WeakReference

template<typename T >
friend class WeakReference
friend

Definition at line 137 of file weakbase.h.

Member Data Documentation

◆ mpWeakConnection

rtl::Reference<WeakConnection> tools::WeakBase::mpWeakConnection
private

Definition at line 152 of file weakbase.h.

Referenced by clearWeak(), getWeakConnection(), and ~WeakBase().


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