Lines Matching defs:SharedPtr

93 class SharedPtr;
101 * SharedPtr is smart pointer for managing shared ownership to a pointer.
103 * destructed when last SharedPtr is destroyed.
105 * SharedPtr can also be NULL.
108 class SharedPtr
111 SharedPtr (void);
112 SharedPtr (const SharedPtr<T>& other);
113 explicit SharedPtr (T* ptr);
116 SharedPtr (T* ptr, Deleter deleter);
119 explicit SharedPtr (const SharedPtr<Y>& other);
122 explicit SharedPtr (const WeakPtr<Y>& other);
124 ~SharedPtr (void);
127 SharedPtr& operator= (const SharedPtr<Y>& other);
128 SharedPtr& operator= (const SharedPtr<T>& other);
131 SharedPtr& operator= (const WeakPtr<Y>& other);
139 void swap (SharedPtr<T>& other);
144 operator SharedPtr<Y> (void) const;
157 friend class SharedPtr;
163 * WeakPtr manages weak references to objects owned by SharedPtr. Shared
165 * differs from SharedPtr by not affecting the lifetime of the managed
168 * WeakPtr can be converted back to SharedPtr but that operation can fail
179 explicit WeakPtr (const SharedPtr<T>& other);
183 WeakPtr& operator= (const SharedPtr<T>& other);
185 SharedPtr<T> lock (void);
194 friend class SharedPtr<T>;
197 // SharedPtr template implementation.
203 inline SharedPtr<T>::SharedPtr (void)
213 * Ownership of the pointer will be transferred to SharedPtr and future
214 * SharedPtr's initialized or assigned from this SharedPtr.
220 inline SharedPtr<T>::SharedPtr (T* ptr)
243 * Ownership of the pointer will be transferred to SharedPtr and future
244 * SharedPtr's initialized or assigned from this SharedPtr.
256 inline SharedPtr<T>::SharedPtr (T* ptr, Deleter deleter)
276 * \brief Initialize shared pointer from another SharedPtr.
280 inline SharedPtr<T>::SharedPtr (const SharedPtr<T>& other)
288 * \brief Initialize shared pointer from another SharedPtr.
295 inline SharedPtr<T>::SharedPtr (const SharedPtr<Y>& other)
310 inline SharedPtr<T>::SharedPtr (const WeakPtr<Y>& other)
318 inline SharedPtr<T>::~SharedPtr (void)
326 * \return Reference to this SharedPtr.
335 inline SharedPtr<T>& SharedPtr<T>::operator= (const SharedPtr<Y>& other)
355 * \return Reference to this SharedPtr.
361 inline SharedPtr<T>& SharedPtr<T>::operator= (const SharedPtr<T>& other)
381 * \return Reference to this SharedPtr.
389 * If WeakPtr references same pointer as SharedPtr this call will always
396 inline SharedPtr<T>& SharedPtr<T>::operator= (const WeakPtr<Y>& other)
402 SharedPtr<T> sharedOther(other);
416 inline SharedPtr<T>::operator SharedPtr<Y> (void) const
418 return SharedPtr<Y>(*this);
428 inline bool operator== (const SharedPtr<T>& a, const SharedPtr<U>& b) throw()
440 inline bool operator!= (const SharedPtr<T>& a, const SharedPtr<U>& b) throw()
447 inline void SharedPtr<T>::swap (SharedPtr<T>& other)
454 /** Swap operator for SharedPtr's. */
456 inline void swap (SharedPtr<T>& a, SharedPtr<T>& b)
467 inline void SharedPtr<T>::clear (void)
475 inline void SharedPtr<T>::acquireFromWeak (const WeakPtr<T>& weakRef)
504 inline void SharedPtr<T>::acquire (void)
514 inline void SharedPtr<T>::release (void)
561 inline WeakPtr<T>::WeakPtr (const SharedPtr<T>& other)
607 inline WeakPtr<T>& WeakPtr<T>::operator= (const SharedPtr<T>& other)