Home | History | Annotate | Download | only in wtf

Lines Matching refs:RefPtr

21 // RefPtr and PassRefPtr are documented at http://webkit.org/coding/RefPtr.html
39 template<typename T> class RefPtr {
42 ALWAYS_INLINE RefPtr() : m_ptr(0) { }
43 ALWAYS_INLINE RefPtr(T* ptr) : m_ptr(ptr) { refIfNotNull(ptr); }
44 ALWAYS_INLINE RefPtr(const RefPtr& o) : m_ptr(o.m_ptr) { refIfNotNull(m_ptr); }
45 template<typename U> RefPtr(const RefPtr<U>& o) : m_ptr(o.get()) { refIfNotNull(m_ptr); }
48 template<typename U> RefPtr(const PassRefPtr<U>&);
49 template<typename U> RefPtr(const NonNullPassRefPtr<U>&);
52 ALWAYS_INLINE RefPtr(PlacementNewAdoptType) { }
55 RefPtr(HashTableDeletedValueType) : m_ptr(hashTableDeletedValue()) { }
58 ALWAYS_INLINE ~RefPtr() { derefIfNotNull(m_ptr); }
71 typedef T* (RefPtr::*UnspecifiedBoolType);
72 operator UnspecifiedBoolType() const { return m_ptr ? &RefPtr::m_ptr : 0; }
74 RefPtr& operator=(const RefPtr&);
75 RefPtr& operator=(T*);
76 RefPtr& operator=(const PassRefPtr<T>&);
77 RefPtr& operator=(const NonNullPassRefPtr<T>&);
79 RefPtr& operator=(std::nullptr_t) { clear(); return *this; }
81 template<typename U> RefPtr& operator=(const RefPtr<U>&);
82 template<typename U> RefPtr& operator=(const PassRefPtr<U>&);
83 template<typename U> RefPtr& operator=(const NonNullPassRefPtr<U>&);
85 void swap(RefPtr&);
93 template<typename T> template<typename U> inline RefPtr<T>::RefPtr(const PassRefPtr<U>& o)
98 template<typename T> template<typename U> inline RefPtr<T>::RefPtr(const NonNullPassRefPtr<U>& o)
103 template<typename T> inline void RefPtr<T>::clear()
110 template<typename T> inline RefPtr<T>& RefPtr<T>::operator=(const RefPtr<T>& o)
120 template<typename T> template<typename U> inline RefPtr<T>& RefPtr<T>::operator=(const RefPtr<U>& o)
130 template<typename T> inline RefPtr<T>& RefPtr<T>::operator=(T* optr)
139 template<typename T> inline RefPtr<T>& RefPtr<T>::operator=(const PassRefPtr<T>& o)
147 template<typename T> inline RefPtr<T>& RefPtr<T>::operator=(const NonNullPassRefPtr<T>& o)
155 template<typename T> template<typename U> inline RefPtr<T>& RefPtr<T>::operator=(const PassRefPtr<U>& o)
163 template<typename T> template<typename U> inline RefPtr<T>& RefPtr<T>::operator=(const NonNullPassRefPtr<U>& o)
171 template<class T> inline void RefPtr<T>::swap(RefPtr<T>& o)
176 template<class T> inline void swap(RefPtr<T>& a, RefPtr<T>& b)
181 template<typename T, typename U> inline bool operator==(const RefPtr<T>& a, const RefPtr<U>& b)
186 template<typename T, typename U> inline bool operator==(const RefPtr<T>& a, U* b)
191 template<typename T, typename U> inline bool operator==(T* a, const RefPtr<U>& b)
196 template<typename T, typename U> inline bool operator!=(const RefPtr<T>& a, const RefPtr<U>& b)
201 template<typename T, typename U> inline bool operator!=(const RefPtr<T>& a, U* b)
206 template<typename T, typename U> inline bool operator!=(T* a, const RefPtr<U>& b)
211 template<typename T, typename U> inline RefPtr<T> static_pointer_cast(const RefPtr<U>& p)
213 return RefPtr<T>(static_cast<T*>(p.get()));
216 template<typename T, typename U> inline RefPtr<T> const_pointer_cast(const RefPtr<U>& p)
218 return RefPtr<T>(const_cast<T*>(p.get()));
221 template<typename T> inline T* getPtr(const RefPtr<T>& p)
228 using WTF::RefPtr;