IMP  2.4.0
The Integrative Modeling Platform
Public Types | Public Member Functions | List of all members
IMP::base::WeakPointer< O > Struct Template Reference

#include <IMP/base/WeakPointer.h>

+ Inheritance diagram for IMP::base::WeakPointer< O >:

Detailed Description

template<class O>
struct IMP::base::WeakPointer< O >

WeakPointers do not do reference counting and do not claim ownership of the pointed object. As a result, they can be used to break cycles in reference counted pointers. For example, since an IMP::kernel::Model contains a reference counted pointer to an IMP::kernel::Particle, the IMP::kernel::Particle has a WeakPointer back to the kernel::Model.

This version of a WeakPointer only works on complete types, but adds additional checks of correct usage (eg that the Object has not bee previously freed) compared to UncheckedWeakPointer.

See Also

Definition at line 75 of file WeakPointer.h.

Public Types

typedef internal::PointerBase
< internal::CheckedWeakPointerTraits
< O > > 

Public Member Functions

template<class Any >
 WeakPointer (const Any &o)
template<class OT >
WeakPointer< O > & operator= (const internal::PointerBase< OT > &o)
template<class OT >
WeakPointer< O > & operator= (OT *o)
WeakPointer< O > & operator= (const P &o)

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