libapt-pkg-dev  v0.9.7.5ubuntu5.4
Debian+Ubuntu APT Package Management
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
WeakPointable Class Reference

Class for objects providing support for weak pointers. More...

#include <weakptr.h>

Inheritance diagram for WeakPointable:
Collaboration diagram for WeakPointable:

Public Member Functions

 ~WeakPointable ()
 Deconstruct the object, set all weak pointers to NULL. More...
 
void AddWeakPointer (WeakPointable **weakptr)
 Add a new weak pointer. More...
 
void RemoveWeakPointer (WeakPointable **weakptr)
 Remove the weak pointer from the list of weak pointers. More...
 

Private Attributes

std::set< WeakPointable ** > pointers
 

Detailed Description

Class for objects providing support for weak pointers.

This class allows for the registration of certain pointers as weak, which will cause them to be set to NULL when the destructor of the object is called.

Constructor & Destructor Documentation

WeakPointable::~WeakPointable ( )
inline

Deconstruct the object, set all weak pointers to NULL.

References pointers.

Member Function Documentation

void WeakPointable::AddWeakPointer ( WeakPointable **  weakptr)
inline

Add a new weak pointer.

References pointers.

void WeakPointable::RemoveWeakPointer ( WeakPointable **  weakptr)
inline

Remove the weak pointer from the list of weak pointers.

References pointers.

Member Data Documentation

std::set<WeakPointable**> WeakPointable::pointers
private

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