45 #ifndef vtkWeakPointer_h
46 #define vtkWeakPointer_h
85 return static_cast<T*
>(this->
Object);
89 return static_cast<T*
>(this->
Object);
97 return static_cast<T*
>(this->
Object);
106 return *
static_cast<T*
>(this->
Object);
114 return static_cast<T*
>(this->
Object);
123 #if defined(__HP_aCC) || defined(__IBMCPP__)
124 # define VTK_WEAK_POINTER_DEFINE_OPERATOR_WORKAROUND(op) \
125 bool operator op (NullPointerOnly*) const \
127 return ::operator op (*this, 0); \
130 class NullPointerOnly {};
132 VTK_WEAK_POINTER_DEFINE_OPERATOR_WORKAROUND(==)
133 VTK_WEAK_POINTER_DEFINE_OPERATOR_WORKAROUND(!=)
134 VTK_WEAK_POINTER_DEFINE_OPERATOR_WORKAROUND(<)
135 VTK_WEAK_POINTER_DEFINE_OPERATOR_WORKAROUND(<=)
136 VTK_WEAK_POINTER_DEFINE_OPERATOR_WORKAROUND(>)
137 VTK_WEAK_POINTER_DEFINE_OPERATOR_WORKAROUND(>=)
138 # undef VTK_WEAK_POINTER_DEFINE_OPERATOR_WORKAROUND
149 #define VTK_WEAK_POINTER_DEFINE_OPERATOR(op) \
152 operator op (const vtkWeakPointer<T>& l, const vtkWeakPointer<T>& r) \
154 return (l.GetPointer() op r.GetPointer()); \
157 inline bool operator op (T* l, const vtkWeakPointer<T>& r) \
159 return (l op r.GetPointer()); \
162 inline bool operator op (const vtkWeakPointer<T>& l, T* r) \
164 return (l.GetPointer() op r); \
176 #undef VTK_WEAK_POINTER_DEFINE_OPERATOR
181 inline ostream& operator << (ostream& os, const vtkWeakPointer<T>& p)
183 return os << static_cast<const vtkWeakPointerBase&>(p);
vtkWeakPointerBase & operator=(vtkObjectBase *r)
vtkWeakPointer(const vtkWeakPointerBase &r)
vtkWeakPointer & operator=(const vtkWeakPointerBase &r)
vtkWeakPointer(T *r, const NoReference &n)
a weak reference to a vtkObject.
Non-templated superclass for vtkWeakPointer.
vtkWeakPointer & operator=(T *r)
#define VTK_WEAK_POINTER_DEFINE_OPERATOR(op)