9#ifndef IMPKERNEL_WEAK_POINTER_H
10#define IMPKERNEL_WEAK_POINTER_H
12#include <IMP/kernel_config.h>
13#include "internal/PointerBase.h"
15IMPKERNEL_BEGIN_NAMESPACE
33struct UncheckedWeakPointer
34 : IMP::internal::PointerBase<IMP::internal::WeakPointerTraits<O>> {
35 typedef IMP::internal::PointerBase<IMP::internal::WeakPointerTraits<O>> P;
37 UncheckedWeakPointer(
const Any& o)
39 UncheckedWeakPointer() {}
41 UncheckedWeakPointer<O>& operator=(
const IMP::internal::PointerBase<OT>& o) {
46 UncheckedWeakPointer<O>& operator=(OT* o) {
50#if(defined(BOOST_NO_CXX11_NULLPTR) || defined(BOOST_NO_NULLPTR)) && \
52 UncheckedWeakPointer<O>& operator=(std::nullptr_t o) {
57 UncheckedWeakPointer<O>& operator=(
const P& o) {
78 : IMP::internal::PointerBase<IMP::internal::CheckedWeakPointerTraits<O>> {
79 typedef IMP::internal::PointerBase<IMP::internal::CheckedWeakPointerTraits<O>> P;
81 WeakPointer(
const Any& o)
85 WeakPointer<O>& operator=(
const IMP::internal::PointerBase<OT>& o) {
90 WeakPointer<O>& operator=(OT* o) {
94#if(defined(BOOST_NO_CXX11_NULLPTR) || defined(BOOST_NO_NULLPTR)) && \
96 WeakPointer<O>& operator=(std::nullptr_t o) {
101 WeakPointer<O>& operator=(
const P& o) {
107#if !defined(IMP_DOXYGEN) && !defined(SWIG)
114inline std::ostream& operator<<(std::ostream& out, WeakPointer<T> o) {
115 out << Showable(o.get());
120IMPKERNEL_END_NAMESPACE
Helper class to aid in output of IMP classes to streams.
A weak pointer to an Object or RefCountedObject.