IMP
2.3.1
The Integrative Modeling Platform
|
A smart pointer to a ref-counted Object that is a class member. More...
#include <IMP/base/Pointer.h>
Inherits PointerBase< internal::PointerMemberTraits< O > >.
A smart pointer to a ref-counted Object that is a class member.
A smart pointer to a reference counted Object, which is meant to be stored as a class member. This class is identical to Pointer, but in addition, Object::set_was_used(true) will be called so you don't get warnings about unused objects once the object is stored in the owning class.
[in] | O | The type of IMP::RefCounted-derived object to point to |
Public Types | |
typedef internal::PointerBase < internal::PointerMemberTraits < O > > | P |
Public Member Functions | |
template<class Any > | |
PointerMember (const Any &o) | |
O * | get () const |
get the raw pointer to the object More... | |
template<class OT > | |
base::PointerMember< O > & | operator= (const internal::PointerBase< OT > &o) |
template<class OT > | |
base::PointerMember< O > & | operator= (OT *o) |
base::PointerMember< O > & | operator= (const P &o) |
O * | release () |
Relinquish control of the raw pointer stored in the PointerMember. More... | |
O* IMP::base::PointerMember< O >::get | ( | ) | const |
get the raw pointer to the object
O* IMP::base::PointerMember< O >::release | ( | ) |
Relinquish control of the raw pointer stored in the PointerMember.
Relinquish control of the raw pointer stored in the PointerMember. Use this to safely return objects allocated within functions. The reference count of the object will be decreased by one, but even it it becomes 0, the object will not be destroyed.