Lines Matching refs:other
28 AutoPtr(T* other);
30 AutoPtr(const AutoPtr<T>& other);
32 AutoPtr(AutoPtr<T>&& other);
36 AutoPtr& operator=(T* other);
38 AutoPtr& operator=(const AutoPtr<T>& other);
40 AutoPtr& operator=(AutoPtr<T>&& other);
42 void MoveTo(T** other);
54 inline bool operator==(T* other) const;
56 inline bool operator==(const AutoPtr<T>& other) const;
58 inline bool operator!=(T* other) const;
60 inline bool operator!=(const AutoPtr<T>& other) const;
62 inline bool operator>(T* other) const;
64 inline bool operator>(const AutoPtr<T>& other) const;
66 inline bool operator<(T* other) const;
68 inline bool operator<(const AutoPtr<T>& other) const;
70 inline bool operator<=(T* other) const;
72 inline bool operator<=(const AutoPtr<T>& other) const;
74 inline bool operator>=(T* other) const;
76 inline bool operator>=(const AutoPtr<T>& other) const;
83 AutoPtr<T>::AutoPtr(T* other)
84 : mPtr(other)
92 AutoPtr<T>::AutoPtr(const AutoPtr<T>& other)
93 : mPtr(other.mPtr)
101 AutoPtr<T>::AutoPtr(AutoPtr<T>&& other)
102 : mPtr(other.mPtr)
104 other.mPtr = nullptr;
116 AutoPtr<T>& AutoPtr<T>::operator=(T* other)
118 if (mPtr == other) return *this;
120 if (other != nullptr) {
121 other->AddRef();
126 mPtr = other;
131 AutoPtr<T>& AutoPtr<T>::operator=(const AutoPtr<T>& other)
133 if (mPtr == other.mPtr) return *this;
135 if (other.mPtr != nullptr) {
136 other.mPtr->AddRef();
141 mPtr = other.mPtr;
146 AutoPtr<T>& AutoPtr<T>::operator=(AutoPtr<T>&& other)
151 mPtr = other.mPtr;
152 other.mPtr = nullptr;
157 void AutoPtr<T>::MoveTo(T** other)
159 if (other != nullptr) {
160 *other = mPtr;
196 bool AutoPtr<T>::operator==(T* other) const
198 return mPtr == other;
202 bool AutoPtr<T>::operator==(const AutoPtr<T>& other) const
204 return mPtr == other.mPtr;
208 bool AutoPtr<T>::operator!=(T* other) const
210 return mPtr != other;
214 bool AutoPtr<T>::operator!=(const AutoPtr<T>& other) const
216 return mPtr != other.mPtr;
220 bool AutoPtr<T>::operator>(T* other) const
222 return mPtr > other;
226 bool AutoPtr<T>::operator>(const AutoPtr<T>& other) const
228 return mPtr > other.mPtr;
232 bool AutoPtr<T>::operator<(T* other) const
234 return mPtr < other;
238 bool AutoPtr<T>::operator<(const AutoPtr<T>& other) const
240 return mPtr < other.mPtr;
244 bool AutoPtr<T>::operator<=(T* other) const
246 return mPtr <= other;
250 bool AutoPtr<T>::operator<=(const AutoPtr<T>& other) const
252 return mPtr <= other.mPtr;
256 bool AutoPtr<T>::operator>=(T* other) const
258 return mPtr >= other;
262 bool AutoPtr<T>::operator>=(const AutoPtr<T>& other) const
264 return mPtr >= other.mPtr;