A weak pointer to an IMP::Object or IMP::RefCountedObject.
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::Model contains a reference counted pointer to an IMP::Particle, the IMP::Particle has a WeakPointer back to the Model.
| [in] | O | The type of IMP::Object-derived object to point to |
Inheritance diagram for IMP::WeakPointer< O >:Public Member Functions | |
| WeakPointer () | |
| initialize to NULL | |
| WeakPointer (O *o) | |
| O * | get () const |
| get the raw pointer | |
| operator O * () const | |
| convert to the raw pointer | |
| bool | operator! () const |
| Return true if the pointer is not NULL. | |
| const O & | operator* () const |
| O & | operator* () |
| O * | operator-> () |
| O * | operator-> () const |
| WeakPointer< O > & | operator= (O *o) |
| Set it from a possibly NULL pointer. | |
| IMP::WeakPointer< O >::WeakPointer | ( | O * | o | ) | [explicit] |
initialize from a pointer